diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/common.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/common.json
new file mode 100644
index 000000000000..6d864b78286b
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/common.json
@@ -0,0 +1,237 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Microsoft Cognitive Language Service",
+ "description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.",
+ "version": "2021-07-15-preview"
+ },
+ "paths": {},
+ "definitions": {
+ "ErrorResponse": {
+ "type": "object",
+ "description": "Error response.",
+ "additionalProperties": false,
+ "properties": {
+ "error": {
+ "description": "The error object.",
+ "$ref": "#/definitions/Error"
+ }
+ }
+ },
+ "Error": {
+ "type": "object",
+ "description": "The error object.",
+ "additionalProperties": false,
+ "required": [
+ "code",
+ "message"
+ ],
+ "properties": {
+ "code": {
+ "description": "One of a server-defined set of error codes.",
+ "$ref": "#/definitions/ErrorCode"
+ },
+ "message": {
+ "type": "string",
+ "description": "A human-readable representation of the error."
+ },
+ "target": {
+ "type": "string",
+ "description": "The target of the error."
+ },
+ "details": {
+ "type": "array",
+ "description": "An array of details about specific errors that led to this reported error.",
+ "items": {
+ "$ref": "#/definitions/Error"
+ }
+ },
+ "innererror": {
+ "description": "An object containing more specific information than the current object about the error.",
+ "$ref": "#/definitions/InnerErrorModel"
+ }
+ }
+ },
+ "InnerErrorModel": {
+ "type": "object",
+ "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.",
+ "additionalProperties": false,
+ "required": [
+ "code",
+ "message"
+ ],
+ "properties": {
+ "code": {
+ "description": "One of a server-defined set of error codes.",
+ "$ref": "#/definitions/InnerErrorCode"
+ },
+ "message": {
+ "type": "string",
+ "description": "Error message."
+ },
+ "details": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Error details."
+ },
+ "target": {
+ "type": "string",
+ "description": "Error target."
+ },
+ "innererror": {
+ "description": "An object containing more specific information than the current object about the error.",
+ "$ref": "#/definitions/InnerErrorModel"
+ }
+ }
+ },
+ "ErrorCode": {
+ "type": "string",
+ "description": "Human-readable error code.",
+ "x-ms-enum": {
+ "name": "ErrorCode",
+ "modelAsString": true
+ },
+ "enum": [
+ "InvalidRequest",
+ "InvalidArgument",
+ "Unauthorized",
+ "Forbidden",
+ "NotFound",
+ "ProjectNotFound",
+ "OperationNotFound",
+ "AzureCognitiveSearchNotFound",
+ "AzureCognitiveSearchIndexNotFound",
+ "TooManyRequests",
+ "AzureCognitiveSearchThrottling",
+ "AzureCognitiveSearchIndexLimitReached",
+ "InternalServerError",
+ "ServiceUnavailable"
+ ]
+ },
+ "InnerErrorCode": {
+ "type": "string",
+ "description": "Human-readable error code.",
+ "x-ms-enum": {
+ "name": "InnerErrorCode",
+ "modelAsString": true
+ },
+ "enum": [
+ "InvalidRequest",
+ "InvalidParameterValue",
+ "KnowledgeBaseNotFound",
+ "AzureCognitiveSearchNotFound",
+ "AzureCognitiveSearchThrottling",
+ "ExtractionFailure"
+ ]
+ },
+ "Language": {
+ "type": "string",
+ "description": "Language of the text records. This is BCP-47 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default."
+ },
+ "StringIndexType": {
+ "type": "string",
+ "description": "Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets.",
+ "default": "TextElements_v8",
+ "enum": [
+ "TextElements_v8",
+ "UnicodeCodePoint",
+ "Utf16CodeUnit"
+ ],
+ "x-ms-enum": {
+ "name": "StringIndexType",
+ "modelAsString": true,
+ "values": [
+ {
+ "value": "TextElements_v8",
+ "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo."
+ },
+ {
+ "value": "UnicodeCodePoint",
+ "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python."
+ },
+ {
+ "value": "Utf16CodeUnit",
+ "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript."
+ }
+ ]
+ }
+ }
+ },
+ "parameters": {
+ "Endpoint": {
+ "name": "Endpoint",
+ "description": "Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).",
+ "x-ms-parameter-location": "client",
+ "required": true,
+ "type": "string",
+ "in": "path",
+ "x-ms-skip-url-encoding": true
+ },
+ "ProjectNameQueryParameter": {
+ "name": "projectName",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "description": "The name of the project to use.",
+ "x-ms-parameter-location": "method"
+ },
+ "ProjectNamePathParameter": {
+ "name": "projectName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "maxLength": 100,
+ "description": "The name of the project to use.",
+ "x-ms-parameter-location": "method"
+ },
+ "DeploymentNameQueryParameter": {
+ "name": "deploymentName",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "description": "The name of the specific deployment of the project to use.",
+ "x-ms-parameter-location": "method"
+ },
+ "DeploymentNamePathParameter": {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the specific deployment of the project to use.",
+ "x-ms-parameter-location": "method"
+ },
+ "ApiVersionParameter": {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "description": "Client API version."
+ },
+ "TopParameter": {
+ "name": "top",
+ "in": "query",
+ "description": "The maximum number of resources to return from the collection.",
+ "type": "integer",
+ "format": "int32",
+ "x-ms-parameter-location": "method"
+ },
+ "SkipParameter": {
+ "name": "skip",
+ "in": "query",
+ "description": "An offset into the collection of the first resource to be returned.",
+ "type": "integer",
+ "format": "int32",
+ "x-ms-parameter-location": "method"
+ },
+ "MaxPageSizeParameter": {
+ "name": "maxpagesize",
+ "in": "query",
+ "description": "The maximum number of resources to include in a single response.",
+ "type": "integer",
+ "format": "int32",
+ "x-ms-parameter-location": "method"
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/SuccessfulQueryKnowledgebases.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/SuccessfulQueryKnowledgebases.json
new file mode 100644
index 000000000000..2301273ad752
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/SuccessfulQueryKnowledgebases.json
@@ -0,0 +1,99 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "deploymentName": "production",
+ "knowledgeBaseQueryOptions": {
+ "question": "how long it takes to charge surface?",
+ "top": 3,
+ "userId": "sd53lsY=",
+ "confidenceScoreThreshold": 0.20,
+ "context": {
+ "previousQnaId": 9,
+ "previousUserQuery": "Where are QnA Maker quickstarts?"
+ },
+ "rankerType": "Default",
+ "filters": {
+ "metadataFilter": {
+ "metadata": [
+ {
+ "key": "category",
+ "value": "api"
+ },
+ {
+ "key": "editorial",
+ "value": "chitchat"
+ }
+ ],
+ "logicalOperation": "AND"
+ },
+ "sourceFilter": [
+ "filename1.pdf",
+ "https://www.wikipedia.org/microsoft"
+ ],
+ "logicalOperation": "AND"
+ },
+ "answerSpanRequest": {
+ "enable": true,
+ "confidenceScoreThreshold": 0.20,
+ "topAnswersWithSpan": 1
+ },
+ "includeUnstructuredSources": true
+ }
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "answers": [
+ {
+ "questions": [
+ "Power and charging"
+ ],
+ "answer": "Power and charging**\n\nIt takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.\n\nYou can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface.",
+ "confidenceScore": 0.65,
+ "id": 20,
+ "source": "surface-pro-4-user-guide-EN.pdf",
+ "metadata": {
+ "category": "api",
+ "editorial": "chitchat"
+ },
+ "dialog": {
+ "isContextOnly": false,
+ "prompts": [
+ {
+ "displayOrder": 1,
+ "qnaId": 23,
+ "displayText": "prompt1"
+ },
+ {
+ "displayOrder": 2,
+ "qnaId": 36,
+ "displayText": "prompt2"
+ }
+ ]
+ },
+ "answerSpan": {
+ "text": "two to four hours",
+ "confidenceScore": 0.30,
+ "offset": 33,
+ "length": 50
+ }
+ },
+ {
+ "questions": [
+ "Charge your Surface Pro 4"
+ ],
+ "answer": "**Charge your Surface Pro 4**\n\n1. Connect the two parts of the power cord.\n\n2. Connect the power cord securely to the charging port.\n\n3. Plug the power supply into an electrical outlet.",
+ "confidenceScore": 0.32,
+ "id": 13,
+ "source": "surface-pro-4-user-guide-EN.pdf"
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/SuccessfulQueryText.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/SuccessfulQueryText.json
new file mode 100644
index 000000000000..877ca59d290b
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/SuccessfulQueryText.json
@@ -0,0 +1,66 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "stringIndexType": "TextElements_v8",
+ "textQueryOptions": {
+ "question": "how long it takes to charge surface?",
+ "records": [
+ {
+ "id": "1",
+ "text": "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it."
+ },
+ {
+ "id": "2",
+ "text": "You can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface."
+ }
+ ],
+ "language": "en"
+ }
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "answers": [
+ {
+ "answer": "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.",
+ "confidenceScore": 0.93,
+ "id": "1",
+ "answerSpan": {
+ "text": "two to four hours",
+ "confidenceScore": 0,
+ "offset": 28,
+ "length": 45
+ },
+ "offset": 0,
+ "length": 224
+ },
+ {
+ "answer": "It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.",
+ "confidenceScore": 0.92,
+ "id": "1",
+ "answerSpan": {
+ "text": "two to four hours",
+ "confidenceScore": 0,
+ "offset": 8,
+ "length": 25
+ },
+ "offset": 20,
+ "length": 224
+ },
+ {
+ "answer": "It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.",
+ "confidenceScore": 0.05,
+ "id": "1",
+ "answerSpan": null,
+ "offset": 110,
+ "length": 244
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulCreateProject.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulCreateProject.json
new file mode 100644
index 000000000000..53ed64c5949d
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulCreateProject.json
@@ -0,0 +1,49 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "body": {
+ "description": "proj1 is a test project.",
+ "language": "en",
+ "settings": {
+ "defaultAnswer": "No good match found for your question in the Knowledgebase."
+ },
+ "multilingualResource": true
+ }
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "projectName": "proj1",
+ "description": "proj1 is a test project.",
+ "language": "en",
+ "settings": {
+ "defaultAnswer": "No good match found for your question in the Knowledgebase."
+ },
+ "multilingualResource": true,
+ "createdDateTime": "2021-05-01T15:13:22Z",
+ "lastModifiedDateTime": "2021-05-01T15:13:22Z",
+ "lastDeployedDateTime": "2021-05-01T15:13:22Z"
+ }
+ },
+ "201": {
+ "headers": {},
+ "body": {
+ "projectName": "proj1",
+ "description": "proj1 is a test project.",
+ "language": "en",
+ "settings": {
+ "defaultAnswer": "No good match found for your question in the Knowledgebase."
+ },
+ "multilingualResource": true,
+ "createdDateTime": "2021-05-01T15:13:22Z",
+ "lastModifiedDateTime": "2021-05-01T15:13:22Z",
+ "lastDeployedDateTime": "2021-05-01T15:13:22Z"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulDeleteProject.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulDeleteProject.json
new file mode 100644
index 000000000000..8d9aa7385a9d
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulDeleteProject.json
@@ -0,0 +1,12 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1"
+ },
+ "responses": {
+ "202": {}
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetProject.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetProject.json
new file mode 100644
index 000000000000..96b235bbd6d3
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetProject.json
@@ -0,0 +1,25 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "projectName": "proj1",
+ "description": "proj1 is a test project.",
+ "language": "en",
+ "settings": {
+ "defaultAnswer": "No good match found for your question in the Knowledgebase."
+ },
+ "createdDateTime": "2021-05-01T15:13:22Z",
+ "lastModifiedDateTime": "2021-05-01T15:13:22Z",
+ "lastDeployedDateTime": "2021-05-01T15:13:22Z"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetQnas.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetQnas.json
new file mode 100644
index 000000000000..783fc8c55498
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetQnas.json
@@ -0,0 +1,57 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "value": [
+ {
+ "id": 1,
+ "answer": "ans1",
+ "source": "source1",
+ "questions": [
+ "question 1.1",
+ "question 1.2"
+ ],
+ "metadata": {
+ "k1": "v1",
+ "k2": "v2"
+ },
+ "dialog": {
+ "isContextOnly": false,
+ "prompts": [
+ {
+ "displayOrder": 1,
+ "qnaId": 11,
+ "displayText": "prompt 1.1"
+ },
+ {
+ "displayOrder": 2,
+ "qnaId": 21,
+ "displayText": "prompt 1.2"
+ }
+ ]
+ },
+ "lastUpdatedDateTime": "2021-05-01T17:21:14Z"
+ },
+ {
+ "id": 2,
+ "answer": "ans2",
+ "source": "source2",
+ "questions": [
+ "question 2.1",
+ "question 2.2"
+ ],
+ "lastUpdatedDateTime": "2021-05-01T17:21:14Z"
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetSources.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetSources.json
new file mode 100644
index 000000000000..b123db2b8244
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetSources.json
@@ -0,0 +1,31 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "value": [
+ {
+ "displayName": "source1",
+ "sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview",
+ "sourceKind": "url",
+ "lastUpdatedDateTime": "2021-05-01T15:13:22Z"
+ },
+ {
+ "displayName": "source2",
+ "sourceUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf",
+ "sourceKind": "file",
+ "contentStructureKind": "unstructured",
+ "lastUpdatedDateTime": "2021-05-01T15:13:22Z"
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetSynonyms.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetSynonyms.json
new file mode 100644
index 000000000000..ec28c3e629e8
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetSynonyms.json
@@ -0,0 +1,30 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "value": [
+ {
+ "alterations": [
+ "qnamaker",
+ "qna maker"
+ ]
+ },
+ {
+ "alterations": [
+ "botframework",
+ "bot framework"
+ ]
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectDeleteJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectDeleteJobStatus.json
new file mode 100644
index 000000000000..fe20ece4c057
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectDeleteJobStatus.json
@@ -0,0 +1,22 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "jobId": "job1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "errors": [],
+ "createdDateTime": "2021-05-01T17:21:14Z",
+ "expirationDateTime": "2021-05-01T17:21:14Z",
+ "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a",
+ "lastUpdatedDateTime": "2021-05-01T17:21:14Z",
+ "status": "succeeded"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json
new file mode 100644
index 000000000000..252d25ac82c5
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json
@@ -0,0 +1,24 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "deploymentName": "production",
+ "jobId": "job1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "errors": [],
+ "createdDateTime": "2021-05-01T17:21:14Z",
+ "expirationDateTime": "2021-05-01T17:21:14Z",
+ "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a",
+ "lastUpdatedDateTime": "2021-05-01T17:21:14Z",
+ "status": "succeeded"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json
new file mode 100644
index 000000000000..11e763559492
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json
@@ -0,0 +1,24 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "jobId": "job1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "errors": [],
+ "createdDateTime": "2021-05-01T17:21:14Z",
+ "expirationDateTime": "2021-05-01T17:21:14Z",
+ "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a",
+ "lastUpdatedDateTime": "2021-05-01T17:21:14Z",
+ "status": "succeeded",
+ "resultUrl": "https:///language/proj1/export/job1/result"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json
new file mode 100644
index 000000000000..58eab6bb09fb
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json
@@ -0,0 +1,23 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "jobId": "job1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "errors": [],
+ "createdDateTime": "2021-05-01T17:21:14Z",
+ "expirationDateTime": "2021-05-01T17:21:14Z",
+ "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a",
+ "lastUpdatedDateTime": "2021-05-01T17:21:14Z",
+ "status": "succeeded"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectListDeployments.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectListDeployments.json
new file mode 100644
index 000000000000..a0e42df04276
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectListDeployments.json
@@ -0,0 +1,22 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "value": [
+ {
+ "deploymentName": "production",
+ "lastDeployedDateTime": "2021-05-01T15:13:22Z"
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitDeployJob.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitDeployJob.json
new file mode 100644
index 000000000000..79268716b472
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitDeployJob.json
@@ -0,0 +1,18 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "deploymentName": "production"
+ },
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.",
+ "headers": {
+ "Operation-Location": "job1"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitExportJob.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitExportJob.json
new file mode 100644
index 000000000000..722fd74a4dc6
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitExportJob.json
@@ -0,0 +1,23 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "body": {
+ "exportAssetTypes": [
+ "qnas",
+ "synonyms"
+ ]
+ }
+ },
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.",
+ "headers": {
+ "Operation-Location": "job1"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitImportJob.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitImportJob.json
new file mode 100644
index 000000000000..d1bf6e122055
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitImportJob.json
@@ -0,0 +1,78 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "body": {
+ "assets": {
+ "synonyms": [
+ {
+ "alterations": [
+ "wa",
+ "washington",
+ "washington state"
+ ]
+ },
+ {
+ "alterations": [
+ "U.S",
+ "usa",
+ "united states of america"
+ ]
+ }
+ ],
+ "qnas": [
+ {
+ "lastUpdatedDateTime": "2021-05-01T17:21:14Z",
+ "id": 1,
+ "answer": "ans1",
+ "source": "source1",
+ "questions": [
+ "question 1.1",
+ "question 1.2"
+ ],
+ "metadata": {
+ "k1": "v1",
+ "k2": "v2"
+ },
+ "dialog": {
+ "isContextOnly": false,
+ "prompts": [
+ {
+ "displayOrder": 1,
+ "qnaId": 11,
+ "displayText": "prompt 1.1"
+ },
+ {
+ "displayOrder": 2,
+ "qnaId": 21,
+ "displayText": "prompt 1.2"
+ }
+ ]
+ }
+ },
+ {
+ "lastUpdatedDateTime": "2021-05-01T17:21:14Z",
+ "id": 2,
+ "answer": "ans2",
+ "source": "source2",
+ "questions": [
+ "question 2.1",
+ "question 2.2"
+ ]
+ }
+ ]
+ }
+ }
+ },
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.",
+ "headers": {
+ "Operation-Location": "job1"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectsListProjects.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectsListProjects.json
new file mode 100644
index 000000000000..79685f619ea1
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectsListProjects.json
@@ -0,0 +1,35 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "value": [
+ {
+ "projectName": "proj1",
+ "description": "proj1 is a test project.",
+ "language": "en",
+ "multilingualResource": true,
+ "createdDateTime": "2021-05-01T15:13:22Z",
+ "lastModifiedDateTime": "2021-05-01T15:13:22Z",
+ "lastDeployedDateTime": "2021-05-01T15:13:22Z"
+ },
+ {
+ "projectName": "proj2",
+ "description": "proj2 is a test project.",
+ "language": "fr",
+ "multilingualResource": true,
+ "createdDateTime": "2021-05-01T15:13:22Z",
+ "lastModifiedDateTime": "2021-05-01T15:13:22Z",
+ "lastDeployedDateTime": "2021-05-01T15:13:22Z"
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json
new file mode 100644
index 000000000000..5ebce5831232
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json
@@ -0,0 +1,26 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "body": {
+ "records": [
+ {
+ "userId": "user1",
+ "userQuestion": "hi",
+ "qnaId": 1
+ },
+ {
+ "userId": "user1",
+ "userQuestion": "hello",
+ "qnaId": 2
+ }
+ ]
+ }
+ },
+ "responses": {
+ "204": {}
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateQnas.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateQnas.json
new file mode 100644
index 000000000000..9cd0ecbe18f2
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateQnas.json
@@ -0,0 +1,74 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "body": [
+ {
+ "op": "add",
+ "value": {
+ "id": 3,
+ "answer": "ans3",
+ "source": "source1",
+ "questions": [
+ "question 3.1",
+ "question 3.2"
+ ],
+ "metadata": {
+ "k1": "v1",
+ "k2": "v2"
+ },
+ "dialog": {
+ "isContextOnly": false,
+ "prompts": [
+ {
+ "displayOrder": 1,
+ "qnaId": 11,
+ "displayText": "prompt 3.1"
+ },
+ {
+ "displayOrder": 2,
+ "qnaId": 21,
+ "displayText": "prompt 3.2"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "op": "replace",
+ "value": {
+ "id": 1,
+ "answer": "ans4",
+ "source": "source1",
+ "questions": [
+ "question 4.1",
+ "question 4.2"
+ ]
+ }
+ },
+ {
+ "op": "delete",
+ "value": {
+ "id": 2,
+ "answer": "ans2",
+ "source": "source1",
+ "questions": [
+ "question 2.1",
+ "question 2.2"
+ ]
+ }
+ }
+ ]
+ },
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.",
+ "headers": {
+ "Operation-Location": "job1"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateQnasJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateQnasJobStatus.json
new file mode 100644
index 000000000000..58eab6bb09fb
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateQnasJobStatus.json
@@ -0,0 +1,23 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "jobId": "job1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "errors": [],
+ "createdDateTime": "2021-05-01T17:21:14Z",
+ "expirationDateTime": "2021-05-01T17:21:14Z",
+ "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a",
+ "lastUpdatedDateTime": "2021-05-01T17:21:14Z",
+ "status": "succeeded"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSources.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSources.json
new file mode 100644
index 000000000000..908f6a9aab07
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSources.json
@@ -0,0 +1,44 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "body": [
+ {
+ "op": "add",
+ "value": {
+ "displayName": "source3",
+ "sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-support-options?context=/azure/cognitive-services/qnamaker/context/context",
+ "sourceKind": "url"
+ }
+ },
+ {
+ "op": "replace",
+ "value": {
+ "displayName": "source1",
+ "sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview",
+ "sourceKind": "url",
+ "refresh": true
+ }
+ },
+ {
+ "op": "delete",
+ "value": {
+ "displayName": "source2",
+ "sourceUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf",
+ "sourceKind": "file"
+ }
+ }
+ ]
+ },
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.",
+ "headers": {
+ "Operation-Location": "job1"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSourcesJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSourcesJobStatus.json
new file mode 100644
index 000000000000..58eab6bb09fb
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSourcesJobStatus.json
@@ -0,0 +1,23 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "jobId": "job1"
+ },
+ "responses": {
+ "200": {
+ "headers": {},
+ "body": {
+ "errors": [],
+ "createdDateTime": "2021-05-01T17:21:14Z",
+ "expirationDateTime": "2021-05-01T17:21:14Z",
+ "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a",
+ "lastUpdatedDateTime": "2021-05-01T17:21:14Z",
+ "status": "succeeded"
+ }
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSynonyms.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSynonyms.json
new file mode 100644
index 000000000000..dc08ed4365c7
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSynonyms.json
@@ -0,0 +1,28 @@
+{
+ "parameters": {
+ "Endpoint": "{Endpoint}",
+ "Ocp-Apim-Subscription-Key": "{API key}",
+ "Content-Type": "application/json",
+ "api-version": "2021-07-15-preview",
+ "projectName": "proj1",
+ "body": {
+ "value": [
+ {
+ "alterations": [
+ "qnamaker",
+ "qna maker"
+ ]
+ },
+ {
+ "alterations": [
+ "botframework",
+ "bot framework"
+ ]
+ }
+ ]
+ }
+ },
+ "responses": {
+ "204": {}
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json
new file mode 100644
index 000000000000..09350097f8af
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json
@@ -0,0 +1,1751 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Microsoft Cognitive Language Service - Question Answering - Authoring",
+ "description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.",
+ "version": "2021-07-15-preview"
+ },
+ "securityDefinitions": {
+ "apim_key": {
+ "type": "apiKey",
+ "name": "Ocp-Apim-Subscription-Key",
+ "in": "header"
+ }
+ },
+ "security": [
+ {
+ "apim_key": []
+ }
+ ],
+ "x-ms-parameterized-host": {
+ "hostTemplate": "{Endpoint}/language",
+ "useSchemePrefix": false,
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/Endpoint"
+ }
+ ]
+ },
+ "paths": {
+ "/query-knowledgebases/projects": {
+ "get": {
+ "summary": "Gets all projects for a user.",
+ "operationId": "QuestionAnsweringProjects_ListProjects",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/TopParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/SkipParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/MaxPageSizeParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink",
+ "itemName": "value"
+ },
+ "responses": {
+ "200": {
+ "description": "The metadata of all projects.",
+ "schema": {
+ "$ref": "#/definitions/ProjectsMetadata"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulProjectsListProjects.json"
+ }
+ }
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}": {
+ "get": {
+ "summary": "Get the requested project metadata.",
+ "operationId": "QuestionAnsweringProjects_GetProjectDetails",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "The metadata for the specified project.",
+ "schema": {
+ "$ref": "#/definitions/ProjectMetadata"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulGetProject.json"
+ }
+ }
+ },
+ "patch": {
+ "summary": "Create or update a project.",
+ "operationId": "QuestionAnsweringProjects_CreateProject",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "description": "Parameters needed to create the project.",
+ "in": "body",
+ "name": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreateProjectOptions"
+ }
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "The metadata of the updated project, if it already exists.",
+ "schema": {
+ "$ref": "#/definitions/ProjectMetadata"
+ }
+ },
+ "201": {
+ "description": "The metadata of the created project, if it doesn't exist.",
+ "schema": {
+ "$ref": "#/definitions/ProjectMetadata"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulCreateProject.json"
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete the project.",
+ "operationId": "QuestionAnsweringProjects_DeleteProject",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the job.",
+ "headers": {
+ "Operation-Location": {
+ "type": "string"
+ }
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulDeleteProject.json"
+ }
+ }
+ }
+ },
+ "/query-knowledgebases/projects/deletion-jobs/{jobId}": {
+ "get": {
+ "summary": "Gets the status of a Project delete job.",
+ "operationId": "QuestionAnsweringProjects_GetDeleteStatus",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/JobIdParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Project delete job status.",
+ "schema": {
+ "$ref": "#/definitions/JobState"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulProjectDeleteJobStatus.json"
+ }
+ }
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/:export": {
+ "post": {
+ "summary": "Export project metadata and assets.",
+ "operationId": "QuestionAnsweringProjects_Export",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/ImportExportFormatParameter"
+ },
+ {
+ "$ref": "#/parameters/AssetKindParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the job.",
+ "headers": {
+ "Operation-Location": {
+ "type": "string"
+ }
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulProjectSubmitExportJob.json"
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/export/jobs/{jobId}": {
+ "get": {
+ "summary": "Gets the status of an Export job, once job completes, returns the project metadata, and assets.",
+ "operationId": "QuestionAnsweringProjects_GetExportStatus",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/JobIdParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Export job status, project metadata, and assets.",
+ "schema": {
+ "$ref": "#/definitions/ExportJobState"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json"
+ }
+ }
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/:import": {
+ "post": {
+ "summary": "Import project assets.",
+ "operationId": "QuestionAnsweringProjects_Import",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "description": "Project assets the needs to be imported.",
+ "in": "body",
+ "name": "body",
+ "schema": {
+ "$ref": "#/definitions/ImportJobOptions"
+ }
+ },
+ {
+ "$ref": "#/parameters/ImportExportFormatParameter"
+ },
+ {
+ "$ref": "#/parameters/AssetKindParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the job.",
+ "headers": {
+ "Operation-Location": {
+ "type": "string"
+ }
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulProjectSubmitImportJob.json"
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/import/jobs/{jobId}": {
+ "get": {
+ "summary": "Gets the status of an Import job.",
+ "operationId": "QuestionAnsweringProjects_GetImportStatus",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/JobIdParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Import job status.",
+ "schema": {
+ "$ref": "#/definitions/JobState"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json"
+ }
+ }
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/deployments/{deploymentName}": {
+ "put": {
+ "summary": "Deploy project to production.",
+ "operationId": "QuestionAnsweringProjects_DeployProject",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/DeploymentNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the job.",
+ "headers": {
+ "Operation-Location": {
+ "type": "string"
+ }
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulProjectSubmitDeployJob.json"
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/deployments/{deploymentName}/jobs/{jobId}": {
+ "get": {
+ "summary": "Gets the status of a Deploy job.",
+ "operationId": "QuestionAnsweringProjects_GetDeployStatus",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/DeploymentNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/JobIdParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Deploy job state.",
+ "schema": {
+ "$ref": "#/definitions/JobState"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json"
+ }
+ }
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/deployments": {
+ "get": {
+ "summary": "List all deployments of a project.",
+ "operationId": "QuestionAnsweringProjects_ListDeployments",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/TopParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/SkipParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/MaxPageSizeParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink",
+ "itemName": "value"
+ },
+ "responses": {
+ "200": {
+ "description": "List of deployments of a project.",
+ "schema": {
+ "$ref": "#/definitions/ProjectDeployments"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulProjectListDeployments.json"
+ }
+ }
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/synonyms": {
+ "get": {
+ "summary": "Gets all the synonyms of a project.",
+ "operationId": "QuestionAnsweringProjects_GetSynonyms",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/TopParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/SkipParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/MaxPageSizeParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink",
+ "itemName": "value"
+ },
+ "responses": {
+ "200": {
+ "description": "All the synonyms of a project.",
+ "schema": {
+ "$ref": "#/definitions/SynonymAssets"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulGetSynonyms.json"
+ }
+ }
+ },
+ "put": {
+ "summary": "Updates all the synonyms of a project.",
+ "operationId": "QuestionAnsweringProjects_UpdateSynonyms",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "description": "All the synonyms of a project.",
+ "in": "body",
+ "name": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/SynonymAssets"
+ }
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "204": {
+ "description": "Synonyms update successfully."
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulUpdateSynonyms.json"
+ }
+ }
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/sources": {
+ "get": {
+ "summary": "Gets all the sources of a project.",
+ "operationId": "QuestionAnsweringProjects_GetSources",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/TopParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/SkipParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/MaxPageSizeParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink",
+ "itemName": "value"
+ },
+ "responses": {
+ "200": {
+ "description": "All the sources of a project.",
+ "schema": {
+ "$ref": "#/definitions/QnaSources"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulGetSources.json"
+ }
+ }
+ },
+ "patch": {
+ "summary": "Updates the sources of a project.",
+ "operationId": "QuestionAnsweringProjects_UpdateSources",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "description": "Update sources parameters of a project.",
+ "in": "body",
+ "name": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/UpdateSourcesOptions"
+ }
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the job.",
+ "headers": {
+ "Operation-Location": {
+ "type": "string"
+ }
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulUpdateSources.json"
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/sources/jobs/{jobId}": {
+ "get": {
+ "summary": "Gets the status of update sources job.",
+ "operationId": "QuestionAnsweringProjects_GetUpdateSourcesStatus",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/JobIdParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Update sources job state.",
+ "schema": {
+ "$ref": "#/definitions/JobState"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulUpdateSourcesJobStatus.json"
+ }
+ }
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/qnas": {
+ "get": {
+ "summary": "Gets all the QnAs of a project.",
+ "operationId": "QuestionAnsweringProjects_GetQnas",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SourceFilterParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/TopParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/SkipParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/MaxPageSizeParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink",
+ "itemName": "value"
+ },
+ "responses": {
+ "200": {
+ "description": "All the QnAs of a project.",
+ "schema": {
+ "$ref": "#/definitions/QnaAssets"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulGetQnas.json"
+ }
+ }
+ },
+ "patch": {
+ "summary": "Updates the QnAs of a project.",
+ "operationId": "QuestionAnsweringProjects_UpdateQnas",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "description": "Update QnAs parameters of a project.",
+ "in": "body",
+ "name": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/UpdateQnaOptions"
+ }
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "202": {
+ "description": "A successful call results with an Operation-Location header used to check the status of the job.",
+ "headers": {
+ "Operation-Location": {
+ "type": "string"
+ }
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulUpdateQnas.json"
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/qnas/jobs/{jobId}": {
+ "get": {
+ "summary": "Gets the status of update QnAs job.",
+ "operationId": "QuestionAnsweringProjects_GetUpdateQnasStatus",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/JobIdParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Update QnAs job state.",
+ "schema": {
+ "$ref": "#/definitions/JobState"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulUpdateQnasJobStatus.json"
+ }
+ }
+ }
+ },
+ "/query-knowledgebases/projects/{projectName}/feedback": {
+ "post": {
+ "summary": "Update Active Learning feedback.",
+ "operationId": "QuestionAnsweringProjects_AddFeedback",
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/ProjectNamePathParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "description": "Feedback for Active Learning.",
+ "in": "body",
+ "name": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ActiveLearningFeedback"
+ }
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "204": {
+ "description": "Feedback recorded successfully."
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json"
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "ActiveLearningFeedback": {
+ "type": "object",
+ "description": "Feedback for Active Learning.",
+ "additionalProperties": false,
+ "properties": {
+ "records": {
+ "$ref": "#/definitions/FeedbackRecords"
+ }
+ }
+ },
+ "FeedbackRecords": {
+ "type": "array",
+ "description": "A list of Feedback Records for Active Learning.",
+ "additionalProperties": false,
+ "items": {
+ "$ref": "#/definitions/FeedbackRecord"
+ }
+ },
+ "FeedbackRecord": {
+ "type": "object",
+ "description": "Feedback Record for Active Learning.",
+ "additionalProperties": false,
+ "properties": {
+ "userId": {
+ "type": "string",
+ "description": "Unique identifier of the user."
+ },
+ "userQuestion": {
+ "type": "string",
+ "description": "User suggested question for the QnA."
+ },
+ "qnaId": {
+ "type": "integer",
+ "description": "Unique ID of the QnA.",
+ "format": "int32"
+ }
+ }
+ },
+ "ProjectsMetadata": {
+ "type": "object",
+ "description": "Collection of projects metadata and global settings.",
+ "additionalProperties": false,
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ProjectMetadata"
+ }
+ },
+ "nextLink": {
+ "type": "string"
+ }
+ }
+ },
+ "ProjectMetadata": {
+ "type": "object",
+ "description": "Represents the project.",
+ "additionalProperties": false,
+ "properties": {
+ "projectName": {
+ "type": "string",
+ "description": "Name of the project."
+ },
+ "description": {
+ "type": "string",
+ "description": "Description of the project."
+ },
+ "language": {
+ "$ref": "common.json#/definitions/Language"
+ },
+ "multilingualResource": {
+ "type": "boolean",
+ "description": "Resource enabled for multiple languages across projects or not."
+ },
+ "settings": {
+ "$ref": "#/definitions/ProjectSettings"
+ },
+ "createdDateTime": {
+ "type": "string",
+ "description": "Project creation date-time.",
+ "format": "date-time"
+ },
+ "lastModifiedDateTime": {
+ "type": "string",
+ "description": "Represents the project last modified date-time.",
+ "format": "date-time"
+ },
+ "lastDeployedDateTime": {
+ "type": "string",
+ "description": "Represents the project last deployment date-time.",
+ "format": "date-time"
+ }
+ }
+ },
+ "CreateProjectOptions": {
+ "type": "object",
+ "description": "Parameters needed to create the project.",
+ "additionalProperties": false,
+ "required": [
+ "language"
+ ],
+ "properties": {
+ "description": {
+ "type": "string",
+ "description": "Description of the project."
+ },
+ "language": {
+ "$ref": "common.json#/definitions/Language"
+ },
+ "multilingualResource": {
+ "type": "boolean",
+ "description": "Set to true to enable creating knowledgebases in different languages for the same resource."
+ },
+ "settings": {
+ "$ref": "#/definitions/ProjectSettings"
+ }
+ }
+ },
+ "ProjectSettings": {
+ "type": "object",
+ "description": "Configurable settings of the Project.",
+ "additionalProperties": false,
+ "properties": {
+ "defaultAnswer": {
+ "type": "string",
+ "description": "Default Answer response when no good match is found in the knowledge base."
+ }
+ }
+ },
+ "ImportJobOptions": {
+ "type": "object",
+ "description": "Project assets the needs to be imported.",
+ "additionalProperties": false,
+ "properties": {
+ "metadata": {
+ "$ref": "#/definitions/CreateProjectOptions"
+ },
+ "assets": {
+ "$ref": "#/definitions/Assets"
+ },
+ "fileUri": {
+ "type": "string",
+ "description": "Import data File URI."
+ }
+ }
+ },
+ "JobMetadata": {
+ "description": "Represents the job metadata.",
+ "properties": {
+ "createdDateTime": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "expirationDateTime": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "jobId": {
+ "type": "string"
+ },
+ "lastUpdatedDateTime": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/definitions/JobStatus"
+ }
+ },
+ "required": [
+ "jobId",
+ "lastUpdatedDateTime",
+ "createdDateTime",
+ "status"
+ ],
+ "type": "object"
+ },
+ "JobStatus": {
+ "description": "Job Status.",
+ "enum": [
+ "notStarted",
+ "running",
+ "succeeded",
+ "failed",
+ "cancelled",
+ "cancelling",
+ "partiallyCompleted"
+ ],
+ "type": "string",
+ "x-ms-enum": {
+ "modelAsString": true,
+ "name": "jobStatus"
+ }
+ },
+ "JobState": {
+ "description": "Job state represents the job metadata and any errors.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/JobMetadata"
+ },
+ {
+ "$ref": "#/definitions/Errors"
+ }
+ ]
+ },
+ "Errors": {
+ "description": "Collection of Error types.",
+ "type": "object",
+ "properties": {
+ "errors": {
+ "type": "array",
+ "items": {
+ "$ref": "common.json#/definitions/Error"
+ }
+ }
+ }
+ },
+ "ExportJobState": {
+ "description": "Export job status, project metadata, and assets.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/JobState"
+ },
+ {
+ "$ref": "#/definitions/ExportJobResultUrl"
+ }
+ ]
+ },
+ "ExportJobResultUrl": {
+ "type": "object",
+ "description": "URL to download the result of the Export Job.",
+ "required": [
+ "resultUrl"
+ ],
+ "properties": {
+ "resultUrl": {
+ "type": "string",
+ "description": "URL to download the result of the Export Job."
+ }
+ }
+ },
+ "Assets": {
+ "type": "object",
+ "description": "All assets for this project.",
+ "additionalProperties": false,
+ "properties": {
+ "synonyms": {
+ "$ref": "#/definitions/SynonymAsset"
+ },
+ "qnas": {
+ "$ref": "#/definitions/QnaAsset"
+ }
+ }
+ },
+ "SynonymAssets": {
+ "type": "object",
+ "description": "All synonym assets for this project.",
+ "additionalProperties": false,
+ "properties": {
+ "value": {
+ "$ref": "#/definitions/SynonymAsset"
+ },
+ "nextLink": {
+ "type": "string"
+ }
+ }
+ },
+ "SynonymAsset": {
+ "type": "array",
+ "description": "Collection of synonyms.",
+ "additionalProperties": false,
+ "maxLength": 10000,
+ "items": {
+ "$ref": "#/definitions/WordAlterations"
+ }
+ },
+ "WordAlterations": {
+ "type": "object",
+ "description": "Collection of word alterations.",
+ "additionalProperties": false,
+ "required": [
+ "alterations"
+ ],
+ "properties": {
+ "alterations": {
+ "type": "array",
+ "description": "Collection of word alterations.",
+ "maxLength": 20,
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "QnaAssets": {
+ "type": "object",
+ "description": "All QnA assets for the project.",
+ "additionalProperties": false,
+ "properties": {
+ "value": {
+ "$ref": "#/definitions/QnaAsset"
+ },
+ "nextLink": {
+ "type": "string"
+ }
+ }
+ },
+ "QnaAsset": {
+ "type": "array",
+ "description": "List of QnA records.",
+ "additionalProperties": false,
+ "items": {
+ "$ref": "#/definitions/RetrieveQnaRecord"
+ }
+ },
+ "QnaRecord": {
+ "type": "object",
+ "description": "QnA record.",
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Unique ID for the QnA.",
+ "format": "int32"
+ },
+ "answer": {
+ "type": "string",
+ "description": "Answer text.",
+ "maxLength": 25000,
+ "minLength": 1
+ },
+ "source": {
+ "type": "string",
+ "description": "Source from which QnA was indexed e.g. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs .",
+ "maxLength": 300
+ },
+ "questions": {
+ "type": "array",
+ "description": "List of questions associated with the answer.",
+ "maxLength": 100,
+ "minLength": 1,
+ "items": {
+ "type": "string"
+ }
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata associated with the answer, useful to categorize or filter question answers.",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "dialog": {
+ "description": "Context of a QnA.",
+ "$ref": "#/definitions/QnaDialog"
+ },
+ "activeLearningSuggestions": {
+ "type": "array",
+ "description": "List of Active Learning suggestions for the QnA.",
+ "items": {
+ "$ref": "#/definitions/SuggestedQuestionsCluster"
+ }
+ }
+ }
+ },
+ "SuggestedQuestionsCluster": {
+ "type": "object",
+ "description": "Active Learning suggested questions cluster details.",
+ "additionalProperties": false,
+ "properties": {
+ "clusterHead": {
+ "type": "string",
+ "description": "Question chosen as the head of suggested questions cluster by Active Learning clustering algorithm."
+ },
+ "suggestedQuestions": {
+ "type": "array",
+ "description": "List of all suggested questions for the QnA.",
+ "items": {
+ "$ref": "#/definitions/SuggestedQuestion"
+ }
+ }
+ }
+ },
+ "SuggestedQuestion": {
+ "type": "object",
+ "description": "Question suggested by the Active Learning feature.",
+ "additionalProperties": false,
+ "properties": {
+ "question": {
+ "type": "string",
+ "description": "Question suggested by the Active Learning feature."
+ },
+ "userSuggestedCount": {
+ "type": "integer",
+ "description": "The number of times the question was suggested explicitly by the user.",
+ "format": "int32"
+ },
+ "autoSuggestedCount": {
+ "type": "integer",
+ "description": "The number of times the question was suggested automatically by the Active Learning algorithm.",
+ "format": "int32"
+ }
+ }
+ },
+ "RetrieveQnaRecord": {
+ "description": "QnA Record with last updated date-time.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/QnaRecord"
+ },
+ {
+ "$ref": "#/definitions/LastUpdatedDateTimeParameter"
+ }
+ ]
+ },
+ "LastUpdatedDateTimeParameter": {
+ "type": "object",
+ "description": "Last updated date-time parameter.",
+ "properties": {
+ "lastUpdatedDateTime": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Date-time when the QnA was last updated."
+ }
+ }
+ },
+ "QnaDialog": {
+ "type": "object",
+ "description": "Dialog associated with QnA Record.",
+ "properties": {
+ "isContextOnly": {
+ "type": "boolean",
+ "description": "To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as answer for queries without context; otherwise, ignores context and includes this QnA in answers."
+ },
+ "prompts": {
+ "type": "array",
+ "description": "List of prompts associated with the answer.",
+ "maxItems": 20,
+ "items": {
+ "$ref": "#/definitions/QnaPrompt"
+ }
+ }
+ }
+ },
+ "QnaPrompt": {
+ "type": "object",
+ "description": "Prompt for an answer.",
+ "properties": {
+ "displayOrder": {
+ "type": "integer",
+ "description": "Index of the prompt. It is used for ordering of the prompts.",
+ "format": "int32"
+ },
+ "qnaId": {
+ "type": "integer",
+ "description": "ID of the QnA corresponding to the prompt.",
+ "format": "int32"
+ },
+ "qna": {
+ "description": "QnA record. Either QnAId or QnA record needs to be present in a Prompt.",
+ "$ref": "#/definitions/QnaRecord"
+ },
+ "displayText": {
+ "type": "string",
+ "description": "Text displayed to represent a follow up question prompt.",
+ "maxLength": 200
+ }
+ }
+ },
+ "UpdateOperationKind": {
+ "type": "string",
+ "description": "Update operation type for assets.",
+ "enum": [
+ "add",
+ "delete",
+ "replace"
+ ],
+ "x-ms-enum": {
+ "modelAsString": true,
+ "name": "updateOperationKind"
+ }
+ },
+ "UpdateSourcesOptions": {
+ "type": "array",
+ "description": "A list of sources to be updated.",
+ "additionalProperties": false,
+ "items": {
+ "$ref": "#/definitions/UpdateSourceRecord"
+ }
+ },
+ "UpdateQnaOptions": {
+ "type": "array",
+ "description": "A list of QnAs to be updated.",
+ "additionalProperties": false,
+ "items": {
+ "$ref": "#/definitions/UpdateQnaRecord"
+ }
+ },
+ "UpdateQnaRecord": {
+ "type": "object",
+ "description": "QnA record to be updated.",
+ "additionalProperties": false,
+ "required": [
+ "op",
+ "value"
+ ],
+ "properties": {
+ "op": {
+ "type": "string",
+ "$ref": "#/definitions/UpdateOperationKind"
+ },
+ "value": {
+ "$ref": "#/definitions/QnaRecord"
+ }
+ }
+ },
+ "UpdateSourceRecord": {
+ "type": "object",
+ "description": "Source to be updated.",
+ "additionalProperties": false,
+ "required": [
+ "op",
+ "value"
+ ],
+ "properties": {
+ "op": {
+ "type": "string",
+ "$ref": "#/definitions/UpdateOperationKind"
+ },
+ "value": {
+ "$ref": "#/definitions/UpdateQnaSourceRecord"
+ }
+ }
+ },
+ "QnaSources": {
+ "type": "object",
+ "description": "All QnA sources for the project.",
+ "additionalProperties": false,
+ "properties": {
+ "value": {
+ "$ref": "#/definitions/QnaSourcesMetadata"
+ },
+ "nextLink": {
+ "type": "string"
+ }
+ }
+ },
+ "QnaSourcesMetadata": {
+ "type": "array",
+ "description": "Custom sources from which QnAs were extracted or explicitly added to the project.",
+ "additionalProperties": false,
+ "items": {
+ "$ref": "#/definitions/QnaSourceRecord"
+ }
+ },
+ "QnaSourceRecord": {
+ "description": "Custom source record with last updated date-time.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/QnaSourceMetadata"
+ },
+ {
+ "$ref": "#/definitions/LastUpdatedDateTimeParameter"
+ }
+ ]
+ },
+ "UpdateQnaSourceRecord": {
+ "description": "Update source record.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/QnaSourceMetadata"
+ },
+ {
+ "$ref": "#/definitions/RefreshSourceOptions"
+ }
+ ]
+ },
+ "RefreshSourceOptions": {
+ "type": "object",
+ "description": "Boolean flag used to refresh data from the Source.",
+ "properties": {
+ "refresh": {
+ "type": "boolean",
+ "description": "Boolean flag used to refresh data from the Source."
+ }
+ }
+ },
+ "QnaSourceMetadata": {
+ "type": "object",
+ "description": "Input source file or url details.",
+ "additionalProperties": false,
+ "required": [
+ "sourceUri",
+ "sourceKind"
+ ],
+ "properties": {
+ "displayName": {
+ "type": "string",
+ "description": "Friendly name of the Source.",
+ "maxLength": 200,
+ "minLength": 1
+ },
+ "source": {
+ "type": "string",
+ "description": "Unique source identifier. Name of the file if it's a 'file' source; otherwise, the complete URL if it's a 'url' source."
+ },
+ "sourceUri": {
+ "type": "string",
+ "description": "URI location for the file or url.",
+ "format": "uri"
+ },
+ "sourceKind": {
+ "type": "string",
+ "$ref": "#/definitions/QnaSourceKind",
+ "default": "url"
+ },
+ "contentStructureKind": {
+ "type": "string",
+ "$ref": "#/definitions/SourceContentStructureKind",
+ "default": "Unstructured"
+ }
+ }
+ },
+ "QnaSourceKind": {
+ "type": "string",
+ "description": "Supported source types.",
+ "x-ms-enum": {
+ "name": "sourceKind",
+ "modelAsString": true
+ },
+ "enum": [
+ "file",
+ "url"
+ ]
+ },
+ "SourceContentStructureKind": {
+ "type": "string",
+ "description": "Content structure type for sources.",
+ "enum": [
+ "unstructured"
+ ],
+ "x-ms-enum": {
+ "modelAsString": true,
+ "name": "sourceContentStructureKind"
+ }
+ },
+ "ProjectDeployments": {
+ "type": "object",
+ "description": "All deployments of a project.",
+ "additionalProperties": false,
+ "properties": {
+ "value": {
+ "$ref": "#/definitions/ProjectDeploymentsList"
+ },
+ "nextLink": {
+ "type": "string"
+ }
+ }
+ },
+ "ProjectDeploymentsList": {
+ "type": "array",
+ "description": "List of deployments of a project.",
+ "additionalProperties": false,
+ "items": {
+ "$ref": "#/definitions/ProjectDeployment"
+ }
+ },
+ "ProjectDeployment": {
+ "type": "object",
+ "description": "Project deployment details.",
+ "additionalProperties": false,
+ "properties": {
+ "deploymentName": {
+ "type": "string",
+ "description": "Name of the deployment."
+ },
+ "lastDeployedDateTime": {
+ "type": "string",
+ "description": "Represents the project last deployment date-time.",
+ "format": "date-time"
+ }
+ }
+ }
+ },
+ "parameters": {
+ "JobIdParameter": {
+ "name": "jobId",
+ "in": "path",
+ "description": "Job ID.",
+ "required": true,
+ "type": "string",
+ "x-ms-parameter-location": "method"
+ },
+ "AssetKindParameter": {
+ "name": "assetKind",
+ "type": "string",
+ "in": "query",
+ "description": "Kind of the asset of the project.",
+ "enum": [
+ "qnas",
+ "synonyms"
+ ],
+ "x-ms-parameter-location": "method"
+ },
+ "ImportExportFormatParameter": {
+ "name": "format",
+ "type": "string",
+ "in": "query",
+ "description": "Knowledge base Import or Export format.",
+ "default": "json",
+ "enum": [
+ "json",
+ "tsv",
+ "excel"
+ ],
+ "x-ms-enum": {
+ "name": "format",
+ "modelAsString": true,
+ "values": [
+ {
+ "value": "json",
+ "description": "Export or Import QnA assets in JSON format."
+ },
+ {
+ "value": "tsv",
+ "description": "Export or Import knowledge base replica including all assets and metadata in Excel format."
+ },
+ {
+ "value": "excel",
+ "description": "Export or Import knowledge base replica including all assets and metadata in Tsv format."
+ }
+ ]
+ },
+ "x-ms-parameter-location": "method"
+ },
+ "SourceFilterParameter": {
+ "name": "source",
+ "in": "query",
+ "description": "Source of the QnA.",
+ "type": "string",
+ "x-ms-parameter-location": "method"
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json
new file mode 100644
index 000000000000..9a595731e80e
--- /dev/null
+++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json
@@ -0,0 +1,562 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Microsoft Cognitive Language Service - Question Answering",
+ "description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.",
+ "version": "2021-07-15-preview"
+ },
+ "securityDefinitions": {
+ "apim_key": {
+ "type": "apiKey",
+ "name": "Ocp-Apim-Subscription-Key",
+ "in": "header"
+ }
+ },
+ "security": [
+ {
+ "apim_key": []
+ }
+ ],
+ "x-ms-parameterized-host": {
+ "hostTemplate": "{Endpoint}/language",
+ "useSchemePrefix": false,
+ "parameters": [
+ {
+ "$ref": "common.json#/parameters/Endpoint"
+ }
+ ]
+ },
+ "paths": {
+ "/:query-knowledgebases": {
+ "post": {
+ "summary": "Answers the specified question using your knowledge base.",
+ "operationId": "QuestionAnsweringKnowledgeBase_Query",
+ "parameters": [
+ {
+ "$ref": "#/parameters/KnowledgeBaseQueryOptions"
+ },
+ {
+ "$ref": "common.json#/parameters/ProjectNameQueryParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/DeploymentNameQueryParameter"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "A successful response to get answers from knowledge base.",
+ "schema": {
+ "$ref": "#/definitions/KnowledgeBaseAnswers"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/SuccessfulQueryKnowledgebases.json"
+ }
+ }
+ }
+ },
+ "/:query-text": {
+ "post": {
+ "summary": "Answers the specified question using the provided text in the body.",
+ "operationId": "QuestionAnsweringText_Query",
+ "parameters": [
+ {
+ "$ref": "#/parameters/TextQueryOptions"
+ },
+ {
+ "$ref": "common.json#/parameters/ApiVersionParameter"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "A successful response to get answers from input text.",
+ "schema": {
+ "$ref": "#/definitions/TextAnswers"
+ }
+ },
+ "default": {
+ "description": "Error response.",
+ "schema": {
+ "$ref": "common.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "Successful query": {
+ "$ref": "./examples/questionanswering/SuccessfulQueryText.json"
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "KnowledgeBaseQueryOptions": {
+ "type": "object",
+ "description": "Parameters to query a knowledge base.",
+ "additionalProperties": false,
+ "properties": {
+ "qnaId": {
+ "type": "integer",
+ "description": "Exact QnA ID to fetch from the knowledge base, this field takes priority over question.",
+ "format": "int32"
+ },
+ "question": {
+ "type": "string",
+ "description": "User question to query against the knowledge base."
+ },
+ "top": {
+ "type": "integer",
+ "description": "Max number of answers to be returned for the question.",
+ "format": "int32"
+ },
+ "userId": {
+ "type": "string",
+ "description": "Unique identifier for the user."
+ },
+ "confidenceScoreThreshold": {
+ "type": "number",
+ "format": "double",
+ "description": "Minimum threshold score for answers, value ranges from 0 to 1.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "context": {
+ "description": "Context object with previous QnA's information.",
+ "$ref": "#/definitions/KnowledgeBaseAnswerRequestContext"
+ },
+ "rankerType": {
+ "type": "string",
+ "description": "Type of ranker to be used.",
+ "x-ms-enum": {
+ "name": "RankerType",
+ "modelAsString": true,
+ "values": [
+ {
+ "value": "QuestionOnly",
+ "description": "Question only ranker."
+ },
+ {
+ "value": "Default",
+ "description": "Default ranker."
+ }
+ ]
+ },
+ "enum": [
+ "Default",
+ "QuestionOnly"
+ ]
+ },
+ "filters": {
+ "description": "Filter QnAs based on given metadata list and knowledge base sources.",
+ "$ref": "#/definitions/QueryFilters"
+ },
+ "answerSpanRequest": {
+ "description": "To configure Answer span prediction feature.",
+ "$ref": "#/definitions/AnswerSpanRequest"
+ },
+ "includeUnstructuredSources": {
+ "type": "boolean",
+ "description": "(Optional) Flag to enable Query over Unstructured Sources."
+ }
+ }
+ },
+ "AnswerSpanRequest": {
+ "type": "object",
+ "description": "To configure Answer span prediction feature.",
+ "additionalProperties": false,
+ "properties": {
+ "enable": {
+ "type": "boolean",
+ "description": "Enable or disable Answer Span prediction."
+ },
+ "confidenceScoreThreshold": {
+ "type": "number",
+ "format": "double",
+ "description": "Minimum threshold score required to include an answer span, value ranges from 0 to 1.",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "topAnswersWithSpan": {
+ "type": "integer",
+ "description": "Number of Top answers to be considered for span prediction from 1 to 10.",
+ "format": "int32",
+ "maximum": 10,
+ "minimum": 1
+ }
+ }
+ },
+ "KnowledgeBaseAnswerRequestContext": {
+ "type": "object",
+ "description": "Context object with previous QnA's information.",
+ "additionalProperties": false,
+ "required": [
+ "previousQnaId"
+ ],
+ "properties": {
+ "previousQnaId": {
+ "type": "integer",
+ "description": "Previous turn top answer result QnA ID.",
+ "format": "int32"
+ },
+ "previousUserQuery": {
+ "type": "string",
+ "description": "Previous user query."
+ }
+ }
+ },
+ "KnowledgeBaseAnswers": {
+ "type": "object",
+ "description": "Represents List of Question Answers.",
+ "additionalProperties": false,
+ "properties": {
+ "answers": {
+ "type": "array",
+ "description": "Represents Answer Result list.",
+ "items": {
+ "$ref": "#/definitions/KnowledgeBaseAnswer"
+ }
+ }
+ }
+ },
+ "KnowledgeBaseAnswer": {
+ "type": "object",
+ "description": "Represents knowledge base answer.",
+ "additionalProperties": false,
+ "properties": {
+ "questions": {
+ "type": "array",
+ "description": "List of questions associated with the answer.",
+ "items": {
+ "type": "string"
+ }
+ },
+ "answer": {
+ "type": "string",
+ "description": "Answer text."
+ },
+ "confidenceScore": {
+ "type": "number",
+ "description": "Answer confidence score, value ranges from 0 to 1.",
+ "format": "double",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "id": {
+ "type": "integer",
+ "description": "ID of the QnA result.",
+ "format": "int32"
+ },
+ "source": {
+ "type": "string",
+ "description": "Source of QnA result."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata associated with the answer, useful to categorize or filter question answers.",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "dialog": {
+ "type": "object",
+ "$ref": "#/definitions/KnowledgeBaseAnswerDialog"
+ },
+ "answerSpan": {
+ "type": "object",
+ "description": "Answer span object of QnA with respect to user's question.",
+ "$ref": "#/definitions/AnswerSpan"
+ }
+ }
+ },
+ "KnowledgeBaseAnswerDialog": {
+ "type": "object",
+ "description": "Dialog associated with Answer.",
+ "properties": {
+ "isContextOnly": {
+ "type": "boolean",
+ "description": "To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result."
+ },
+ "prompts": {
+ "type": "array",
+ "description": "List of prompts associated with the answer.",
+ "maxItems": 20,
+ "items": {
+ "$ref": "#/definitions/KnowledgeBaseAnswerPrompt"
+ }
+ }
+ }
+ },
+ "KnowledgeBaseAnswerPrompt": {
+ "type": "object",
+ "description": "Prompt for an answer.",
+ "properties": {
+ "displayOrder": {
+ "type": "integer",
+ "description": "Index of the prompt - used in ordering of the prompts.",
+ "format": "int32"
+ },
+ "qnaId": {
+ "type": "integer",
+ "description": "QnA ID corresponding to the prompt.",
+ "format": "int32"
+ },
+ "displayText": {
+ "type": "string",
+ "description": "Text displayed to represent a follow up question prompt.",
+ "maxLength": 200
+ }
+ }
+ },
+ "QueryFilters": {
+ "type": "object",
+ "description": "filters over knowledge base.",
+ "additionalProperties": false,
+ "properties": {
+ "metadataFilter": {
+ "type": "object",
+ "$ref": "#/definitions/MetadataFilter"
+ },
+ "sourceFilter": {
+ "type": "object",
+ "$ref": "#/definitions/SourceFilter"
+ },
+ "logicalOperation": {
+ "type": "string",
+ "description": "Logical operation used to join metadata filter with source filter.",
+ "$ref": "#/definitions/LogicalOperationKind",
+ "default": "AND"
+ }
+ }
+ },
+ "MetadataFilter": {
+ "type": "object",
+ "description": "Find QnAs that are associated with the given list of metadata.",
+ "additionalProperties": false,
+ "properties": {
+ "metadata": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MetadataRecord"
+ }
+ },
+ "logicalOperation": {
+ "type": "string",
+ "description": "Operation used to join metadata filters.",
+ "$ref": "#/definitions/LogicalOperationKind",
+ "default": "AND"
+ }
+ }
+ },
+ "MetadataRecord": {
+ "type": "object",
+ "description": "Object to provide the key value pair for each metadata.",
+ "additionalProperties": false,
+ "required": [
+ "key",
+ "value"
+ ],
+ "properties": {
+ "key": {
+ "type": "string",
+ "description": "Metadata Key from Metadata dictionary used in the QnA."
+ },
+ "value": {
+ "type": "string",
+ "description": "Metadata Value from Metadata dictionary used in the QnA."
+ }
+ }
+ },
+ "LogicalOperationKind": {
+ "type": "string",
+ "description": "Set to 'OR' or 'AND' for using corresponding logical operation.",
+ "x-ms-enum": {
+ "name": "LogicalOperationKind",
+ "modelAsString": true
+ },
+ "enum": [
+ "AND",
+ "OR"
+ ]
+ },
+ "SourceFilter": {
+ "type": "array",
+ "description": "Find QnAs that are associated with any of the given list of sources in knowledge base.",
+ "items": {
+ "type": "string"
+ }
+ },
+ "AnswerSpan": {
+ "type": "object",
+ "description": "Answer span object of QnA.",
+ "additionalProperties": false,
+ "properties": {
+ "text": {
+ "type": "string",
+ "description": "Predicted text of answer span."
+ },
+ "confidenceScore": {
+ "type": "number",
+ "description": "Predicted score of answer span, value ranges from 0 to 1.",
+ "format": "double",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "offset": {
+ "type": "integer",
+ "description": "The answer span offset from the start of answer.",
+ "format": "int32"
+ },
+ "length": {
+ "type": "integer",
+ "description": "The length of the answer span.",
+ "format": "int32"
+ }
+ }
+ },
+ "TextQueryOptions": {
+ "type": "object",
+ "description": "The question and text record parameters to answer.",
+ "required": [
+ "question",
+ "records"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "question": {
+ "type": "string",
+ "description": "User question to query against the given text records."
+ },
+ "records": {
+ "type": "array",
+ "description": "Text records to be searched for given question.",
+ "items": {
+ "$ref": "#/definitions/TextRecord"
+ }
+ },
+ "language": {
+ "$ref": "common.json#/definitions/Language"
+ },
+ "stringIndexType": {
+ "$ref": "common.json#/definitions/StringIndexType"
+ }
+ }
+ },
+ "TextAnswers": {
+ "type": "object",
+ "description": "Represents the answer results.",
+ "additionalProperties": false,
+ "properties": {
+ "answers": {
+ "type": "array",
+ "description": "Represents the answer results.",
+ "items": {
+ "$ref": "#/definitions/TextAnswer"
+ }
+ }
+ }
+ },
+ "TextAnswer": {
+ "type": "object",
+ "description": "Represents answer result.",
+ "additionalProperties": false,
+ "properties": {
+ "answer": {
+ "type": "string",
+ "description": "Answer."
+ },
+ "confidenceScore": {
+ "type": "number",
+ "description": "answer confidence score, value ranges from 0 to 1.",
+ "format": "double",
+ "maximum": 1,
+ "minimum": 0
+ },
+ "id": {
+ "type": "string",
+ "description": "record ID."
+ },
+ "answerSpan": {
+ "type": "object",
+ "description": "Answer span object with respect to user's question.",
+ "$ref": "#/definitions/AnswerSpan"
+ },
+ "offset": {
+ "type": "integer",
+ "description": "The sentence offset from the start of the document.",
+ "format": "int32"
+ },
+ "length": {
+ "type": "integer",
+ "description": "The length of the sentence.",
+ "format": "int32"
+ }
+ }
+ },
+ "TextRecord": {
+ "type": "object",
+ "description": "Represent input text record to be queried.",
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "text"
+ ],
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier for the text record."
+ },
+ "text": {
+ "type": "string",
+ "description": "Text contents of the record."
+ }
+ }
+ }
+ },
+ "parameters": {
+ "KnowledgeBaseQueryOptions": {
+ "name": "knowledgeBaseQueryOptions",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/KnowledgeBaseQueryOptions"
+ },
+ "x-nullable": true,
+ "description": "Post body of the request.",
+ "x-ms-parameter-location": "method"
+ },
+ "TextQueryOptions": {
+ "name": "textQueryOptions",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/TextQueryOptions"
+ },
+ "x-nullable": true,
+ "description": "Post body of the request.",
+ "x-ms-parameter-location": "method"
+ }
+ }
+}
diff --git a/specification/cognitiveservices/data-plane/Language/readme.md b/specification/cognitiveservices/data-plane/Language/readme.md
index 7acc0a25354f..08317f46aceb 100644
--- a/specification/cognitiveservices/data-plane/Language/readme.md
+++ b/specification/cognitiveservices/data-plane/Language/readme.md
@@ -6,7 +6,14 @@ This is the AutoRest configuration file the Cognitive Services Language SDK.
## Releases
-The current preview release is 2021-05-01-preview
+The current preview release is 2021-07-15-preview
+
+```yaml
+tag: release_2021_07_15_preview
+add-credentials: true
+clear-output-folder: true
+openapi-type: data-plane
+```
```yaml
tag: release_2021_05_01_preview
@@ -14,6 +21,20 @@ add-credentials: true
clear-output-folder: true
```
+### Release 2021-07-15-preview
+
+These settings apply only when `--tag=release_2021_07_15_preview` is specified on the command line.
+
+``` yaml $(tag) == 'release_2021_07_15_preview'
+input-file:
+- preview/2021-07-15-preview/questionanswering.json
+- preview/2021-07-15-preview/questionanswering-authoring.json
+title:
+ Microsoft Cognitive Language Service
+modelerfour:
+ lenient-model-deduplication: true
+```
+
### Release 2021-05-01-preview
These settings apply only when `--tag=elease_2021_05_01_preview` is specified on the command line.