PowerPlatformConnectors/certified-connectors/CompanyConnect/apiDefinition.swagger.json

955 строки
26 KiB
JSON
Исходник Постоянная ссылка Обычный вид История

2020-01-29 09:58:48 +03:00
{
"swagger": "2.0",
"info": {
"title": "Company Connect",
"description": "InSpark Company Connect is a total package of smart apps & an automated provisioning mechanism, for the accelerated implementation of your personalized staff portals. Inside, information is quick and easy to find; You have direct access to primary work environments (inside and outside of Microsoft 365) and employees have device and location independent access. Company Connect gets the best out of the Office 365, with no restrictions.",
"version": "1.0",
"x-ms-api-annotation": {
"status": "Preview"
}
},
"tags": [],
"schemes": [
"https"
],
"host": "company-connect-api.azurewebsites.net",
"basePath": "/api",
"consumes": [],
"produces": [],
"responses": {},
"parameters": {},
"security": [
{
"oauth2_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"oauth2_auth": {
"type": "oauth2",
"flow": "accessCode",
"authorizationUrl": "https://login.windows.net/common/oauth2/authorize",
"tokenUrl": "https://login.windows.net/common/oauth2/authorize",
"scopes": {
"user_impersonation": "user_impersonation"
}
}
},
"definitions": {
"ConfirmPromptResult": {
"type": "object",
"properties": {
"result": {
"type": "boolean",
"title": "Result",
"description": "The boolean result",
"x-ms-visibility": "important"
},
"text": {
"type": "string",
"title": "Text",
"description": "The text content of the message",
"x-ms-visibility": "important"
}
},
"required": [
"text",
"result"
]
},
"ConversationReference": {
"type": "string",
"title": "Conversation Reference",
"description": "Reference to the current conversation",
"x-ms-visibility": "important"
},
"DialogSubscriptionRequest": {
"type": "object",
"properties": {
"appId": {
"type": "string",
"title": "LUIS App",
"description": "LUIS application",
"x-ms-visibility": "important",
"x-ms-dynamic-values": {
"operationId": "LuisApps_GetApps",
"value-path": "id",
"value-title": "name"
},
"x-ms-dynamic-list": {
"operationId": "LuisApps_GetApps",
"itemValuePath": "id",
"itemTitlePath": "name"
}
},
"intent": {
"type": "string",
"title": "Intent",
"description": "Intent used to start this dialog",
"x-ms-visibility": "important",
"x-ms-dynamic-values": {
"operationId": "LuisApps_GetIntents",
"value-path": "name",
"parameters": {
"appId": {
"parameter": "appId"
}
}
},
"x-ms-dynamic-list": {
"operationId": "LuisApps_GetIntents",
"itemValuePath": "name",
"parameters": {
"appId": {
"parameterReference": "body/appId"
}
}
}
},
"description": {
"type": "string",
"title": "Description",
"description": "Description to show to the user to describe the purpose of this dialog",
"x-ms-visibility": "important"
},
"callbackUrl": {
"type": "string",
"title": "",
"description": "callbackUrl",
"x-ms-visibility": "internal",
"x-ms-notification-url": true
}
},
"required": [
"appId",
"intent",
"description",
"callbackUrl"
]
},
"DynamicIntentSchema": {
"type": "object",
"x-ms-dynamic-schema": {
"operationId": "LuisApps_GetSchema",
"parameters": {
"appId": {
"parameter": "appId"
},
"intent": {
"parameter": "intent"
}
},
"value-path": "schema"
},
"x-ms-dynamic-properties": {
"operationId": "LuisApps_GetSchema",
"parameters": {
"appId": {
"parameterReference": "body/appId"
},
"intent": {
"parameterReference": "body/intent"
}
},
"itemValuePath": "schema"
}
},
"LuisApp": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"culture": {
"type": "string"
},
"usageScenario": {
"type": "string"
},
"domain": {
"type": "string"
},
"versionsCount": {
"type": "integer"
},
"createdDateTime": {
"type": "string"
},
"endpoints": {
"type": "object",
"properties": {
"PRODUCTION": {
"type": "object",
"properties": {
"versionId": {
"type": "string"
},
"directVersionPublish": {
"type": "boolean"
},
"endpointUrl": {
"type": "string"
},
"isStaging": {
"type": "boolean"
},
"assignedEndpointKey": {
"type": "null"
},
"region": {
"type": "null"
},
"endpointRegion": {
"type": "string"
},
"publishedDateTime": {
"type": "string"
},
"failedRegions": {
"type": "null"
}
}
},
"STAGING": {
"type": "object",
"properties": {
"versionId": {
"type": "string"
},
"directVersionPublish": {
"type": "boolean"
},
"endpointUrl": {
"type": "string"
},
"isStaging": {
"type": "boolean"
},
"assignedEndpointKey": {
"type": "null"
},
"region": {
"type": "null"
},
"endpointRegion": {
"type": "string"
},
"publishedDateTime": {
"type": "string"
},
"failedRegions": {
"type": "null"
}
}
}
}
},
"endpointHitsCount": {
"type": "integer"
},
"activeVersion": {
"type": "string"
}
}
},
"LuisIntent": {
"type": "object",
"properties": {
"customPrebuiltDomainName": {
"type": "string",
"description": "customPrebuiltDomainName"
},
"customPrebuiltModelName": {
"type": "string",
"description": "customPrebuiltModelName"
},
"id": {
"type": "string",
"description": "id"
},
"name": {
"type": "string",
"description": "name"
},
"typeId": {
"type": "integer",
"format": "int32",
"description": "typeId"
},
"readableType": {
"type": "string",
"description": "readableType"
}
}
},
"MessageActivity": {
"type": "object",
"properties": {
"text": {
"type": "string",
"title": "Text",
"description": "The text content of the message",
"x-ms-visibility": "important"
},
"conversationReference": {
"$ref": "#/definitions/ConversationReference"
}
},
"required": [
"text",
"conversationReference"
]
},
"PromptResult": {
"type": "object",
"properties": {
"text": {
"type": "string",
"title": "Text",
"description": "The text content of the message",
"x-ms-visibility": "important"
}
},
"required": [
"text"
]
},
"User": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "The name of the user",
"x-ms-visibility": "important"
},
"family_name": {
"type": "string",
"title": "Family Name",
"description": "The family name of the user",
"x-ms-visibility": "advanced"
},
"given_name": {
"type": "string",
"title": "Given Name",
"description": "The given name (first name) of the user",
"x-ms-visibility": "advanced"
},
"upn": {
"type": "string",
"title": "User Principal Name",
"description": "The User Principal Name of the user",
"x-ms-visibility": "important"
}
},
"required": [
"name",
"upn"
]
}
},
"paths": {
"/choicePrompt": {
"post": {
"operationId": "ChoicePrompt",
"summary": "Prompt user for a choice",
"description": "This operation is used to prompt the user for input.",
"deprecated": false,
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "request",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"callbackUri": {
"type": "string",
"x-ms-visibility": "internal",
"x-ms-notification-url": true
},
"prompt": {
"type": "string",
"title": "Prompt",
"description": "The prompt to send the user"
},
"choices": {
"type": "array",
"title": "Conversation Reference",
"description": "Reference to the current conversation",
"items": {
"type": "string",
"title": "Choice",
"x-ms-visibility": "important"
}
},
"conversationReference": {
"type": "string",
"title": "Conversation Reference",
"description": "Reference to the current conversation",
"x-ms-visibility": "important"
}
},
"required": [
"callbackUri",
"prompt",
"conversationReference"
]
}
}
],
"responses": {
"default": {
"description": "default"
}
}
},
"x-ms-notification-content": {
"schema": {
"$ref": "#/definitions/PromptResult"
}
}
},
"/confirmPrompt": {
"post": {
"operationId": "ConfirmPrompt",
"summary": "Prompt user to confirm",
"description": "This operation is used to prompt the user confirm",
"deprecated": false,
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "request",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"callbackUri": {
"type": "string",
"x-ms-visibility": "internal",
"x-ms-notification-url": true
},
"prompt": {
"type": "string",
"title": "Prompt",
"description": "The prompt to send the user"
},
"yesText": {
"type": "string",
"title": "Yes",
"description": "Yes text.",
"default": "Yes"
},
"noText": {
"type": "string",
"title": "No",
"description": "No text.",
"default": "No"
},
"conversationReference": {
"type": "string",
"title": "Conversation Reference",
"description": "Reference to the current conversation",
"x-ms-visibility": "important"
}
},
"required": [
"callbackUri",
"prompt",
"conversationReference"
]
}
}
],
"responses": {
"default": {
"description": "default"
}
}
},
"x-ms-notification-content": {
"schema": {
"$ref": "#/definitions/ConfirmPromptResult"
}
}
},
"/luisApps": {
"get": {
"operationId": "LuisApps_GetApps",
"summary": "Get LUIS apps",
"description": "Get all LUIS apps",
"x-ms-visibility": "internal",
"parameters": [],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/LuisApp"
}
}
}
}
}
},
"/luisApps/{appId}/intents": {
"get": {
"operationId": "LuisApps_GetIntents",
"summary": "Get intents",
"description": "Get all intents in the LUIS app",
"x-ms-visibility": "internal",
"parameters": [
{
"name": "appId",
"in": "path",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/LuisIntent"
}
}
}
}
}
},
"/luisApps/{appId}/intents/{intent}/schema": {
"get": {
"operationId": "LuisApps_GetSchema",
"summary": "Get Intent Schema",
"description": "Get the schema for an intent",
"deprecated": false,
"x-ms-visibility": "internal",
"tags": [
"LUIS Apps"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "appId",
"in": "path",
"type": "string",
"description": "",
"required": true
},
{
"name": "intent",
"in": "path",
"type": "string",
"description": "",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties":{
"schema": { }
}
}
}
}
}
},
"/proactiveDialogs": {
"post": {
"operationId": "ProactiveDialog_Subscribe",
"summary": "Start proactive dialog",
"description": "Starts a new dialog initiated by the bot",
"x-ms-trigger": "single",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"callbackUrl": {
"type": "string",
"title": "",
"description": "callbackUrl",
"x-ms-visibility": "internal",
"x-ms-notification-url": true
},
"title": {
"type": "string",
"title": "Title",
"description": "The title of this dialog",
"x-ms-visibility": "important"
}
},
"required": [
"callbackUrl",
"title"
]
}
}
],
"responses": {
"default": {
"description": "default"
}
}
},
"x-ms-notification-content": {
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/definitions/User"
},
"conversationReference": {
"$ref": "#/definitions/ConversationReference"
}
}
}
}
},
"/proactiveDialogs/{id}/start": {
"post": {
"operationId": "ProactiveDialog_Start",
"summary": "Start a proactive dialog with a user",
"description": "This operation is used start a proactive dialog with a user.",
"deprecated": false,
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "id",
"in": "path",
"type": "string",
"description": "The proactive dialog to start",
"required": true,
"x-ms-summary": "Dialog",
"x-ms-visibility": "important"
},
{
"name": "body",
"in": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"upn": {
"type": "string",
"title": "User Principal Name",
"description": "The user principal name of the user",
"x-ms-visibility": "important"
}
},
"required": [
"upn"
]
}
}
],
"responses": {
"default": {
"description": "default"
}
}
}
},
"/proactiveDialogs/{tenantId}/{id}": {
"delete": {
"operationId": "ProactiveDialog_Unsubscribe",
"summary": "Unsubscribe proactive dialog",
"description": "Unsubscribes a proactive dialog.",
"x-ms-visibility": "internal",
"parameters": [
{
"name": "tenantId",
"in": "path",
"type": "string",
"required": true
},
{
"name": "id",
"in": "path",
"type": "string",
"required": true
}
],
"responses": {
"default": {
"description": "default",
"schema": {}
}
}
}
},
"/reply": {
"post": {
"operationId": "Reply",
"summary": "Send a message to the user",
"description": "This operation is used to send a message to the user.",
"deprecated": false,
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "messageActivity",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MessageActivity"
}
}
],
"responses": {
"default": {
"description": "default"
}
}
}
},
"/smartDialogs": {
"post": {
"operationId": "SmartDialog_Subscribe",
"summary": "Start dialog",
"description": "Starts a new dialog when the given intent is used",
"x-ms-trigger": "single",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DialogSubscriptionRequest"
}
}
],
"responses": {
"default": {
"description": "default"
}
}
},
"x-ms-notification-content": {
"schema": {
"$ref": "#/definitions/DynamicIntentSchema"
}
}
},
"/smartDialogs/{tenantId}/{id}": {
"delete": {
"operationId": "SmartDialog_Unsubscribe",
"summary": "Unsubscribe dialog",
"description": "Unsubscribes a dialog.",
"x-ms-visibility": "internal",
"parameters": [
{
"name": "tenantId",
"in": "path",
"type": "string",
"required": true
},
{
"name": "id",
"in": "path",
"type": "string",
"required": true
}
],
"responses": {
"default": {
"description": "default"
}
}
}
},
"/smartSources": {
"post": {
"operationId": "SmartSource_Subscribe",
"summary": "Smart Source",
"description": "Register a new Smart Source for use in Connect web parts",
"x-ms-trigger": "single",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"callbackUrl": {
"type": "string",
"title": "",
"description": "callbackUrl",
"x-ms-visibility": "internal",
"x-ms-notification-url": true
},
"title": {
"type": "string",
"title": "Title",
"description": "The title for the user data option. The title is displayed in the configuration of My Starting Point.",
"x-ms-visibility": "important"
},
"category": {
"type": "string",
"title": "Category",
"description": "The category for the user data option. User data attribute options are grouped by category.",
"x-ms-visibility": "important"
},
"icon": {
"type": "string",
"title": "Icon",
"description": "The name of the icon to be used for the user data option. This can be any icon from the Office Fabric UI (see: https://developer.microsoft.com/en-us/fabric#/styles/web/icons)",
"x-ms-visibility": "advanced"
}
},
"required": [
"callbackUrl",
"title",
"category"
]
}
}
],
"responses": {
"default": {
"description": "default"
}
}
},
"x-ms-notification-content": {
"schema": {
"type": "object",
"properties": {
"upn": {
"type": "string",
"description": "upn"
}
}
}
}
},
"/smartSources/{tenantId}/{id}": {
"delete": {
"operationId": "SmartSource_Unsubscribe",
"summary": "Unsubscribe Smart Source",
"description": "Delete a smart source.",
"x-ms-visibility": "internal",
"parameters": [
{
"name": "tenantId",
"in": "path",
"type": "string",
"required": true
},
{
"name": "id",
"in": "path",
"type": "string",
"required": true
}
],
"responses": {
"default": {
"description": "default"
}
}
}
},
"/textPrompt": {
"post": {
"operationId": "TextPrompt",
"summary": "Prompt user for text",
"description": "This operation is used to prompt the user for input.",
"deprecated": false,
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "request",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"callbackUri": {
"type": "string",
"x-ms-visibility": "internal",
"x-ms-notification-url": true
},
"prompt": {
"type": "string",
"title": "Prompt",
"description": "The prompt to send the user."
},
"conversationReference": {
"type": "string",
"title": "Conversation Reference",
"description": "Reference to the current conversation",
"x-ms-visibility": "important"
}
},
"required": [
"callbackUri",
"prompt",
"conversationReference"
]
}
}
],
"responses": {
"default": {
"description": "default"
}
}
},
"x-ms-notification-content": {
"schema": {
"$ref": "#/definitions/PromptResult"
}
}
}
}
}