Microsoft Azure Qn Amaker Client

Microsoft Azure QnA Maker Client is a powerful tool that allows users to easily create and manage their own question and answer databases. Users can input their own questions and corresponding answers, train the system to better understand user queries, and then integrate the QnA Maker into various applications and platforms. This client is designed to streamline the process of building conversational AI experiences and providing users with accurate and efficient responses to their questions.

OpenAPI Specification

qnamaker-client-openapi-original.yml Raw ↑
swagger: '2.0'
info:
  version: v5.0-preview.1
  title: Microsoft Azure QnAMaker Client
  description: An API for QnAMaker Service
securityDefinitions:
  apim_key:
    type: apiKey
    name: Ocp-Apim-Subscription-Key
    in: header
security:
  - apim_key: []
x-ms-parameterized-host:
  hostTemplate: '{Endpoint}/qnamaker/v5.0-preview.1'
  useSchemePrefix: false
  parameters:
    - $ref: '#/parameters/Endpoint'
paths:
  /endpointSettings:
    get:
      summary: 'Microsoft Azure Gets Endpoint Settings For An Endpoint'
      operationId: microsoftAzureEndpointsettingsGetsettings
      parameters: []
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Response with endpoint settings info in it.
          schema:
            $ref: '#/definitions/EndpointSettingsDTO'
          x-nullable: true
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulGetEpSettings.json
      description: Needs a more full description created.
      tags:
        - endpointSettings
    patch:
      tags:
        - EndpointKeys
      summary: 'Microsoft Azure Updates Endpoint Settings For An Endpoint'
      operationId: microsoftAzureEndpointsettingsUpdatesettings
      parameters:
        - $ref: '#/parameters/EndpointSettingsPayload'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '204':
          description: HTTP 204 No Content.
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulSetEpSettings.json
      description: Needs a more full description created.
  /endpointkeys:
    get:
      summary: Microsoft Azure Gets Endpoint Keys For An Endpoint
      operationId: microsoftAzureEndpointkeysGetkeys
      parameters: []
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Response with endpoint info in it.
          schema:
            $ref: '#/definitions/EndpointKeysDTO'
          x-nullable: true
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulGetEpKeys.json
      description: Needs a more full description created.
      tags:
        - Endpointkeys
  /endpointkeys/{keyType}:
    patch:
      tags:
        - EndpointKeys
      summary: 'Microsoft Azure Re Generates An Endpoint Key'
      operationId: microsoftAzureEndpointkeysRefreshkeys
      parameters:
        - $ref: '#/parameters/KeyType'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Details of the endpoint keys generated.
          schema:
            $ref: '#/definitions/EndpointKeysDTO'
          x-nullable: true
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulSetEpKeys.json
      description: Needs a more full description created.
  /alterations:
    get:
      tags:
        - Alterations
      summary: 'Microsoft Azure Download Alterations From Runtime'
      operationId: microsoftAzureAlterationsGet
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Alterations data.
          schema:
            $ref: '#/definitions/WordAlterationsDTO'
          x-nullable: true
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulGetAlts.json
      description: Needs a more full description created.
    put:
      tags:
        - Alterations
      summary: 'Microsoft Azure Replace Alterations Data'
      operationId: microsoftAzureAlterationsReplace
      parameters:
        - $ref: '#/parameters/WordAlterations'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '204':
          description: HTTP 204 No Content.
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulSetAlts.json
      description: Needs a more full description created.
  /alterations/{kbId}:
    get:
      tags:
        - Alterations
      summary: 'Microsoft Azure Download Alterations Per Knowledgebase Qnamaker Managed'
      operationId: microsoftAzureAlterationsGetalterationsforkb
      parameters:
        - $ref: '#/parameters/KbId'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Alterations data.
          schema:
            $ref: '#/definitions/WordAlterationsDTO'
          x-nullable: true
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulGetAltsForKb.json
      description: Needs a more full description created.
    put:
      tags:
        - Alterations
      summary: 'Microsoft Azure Replace Alterations Data Per Knowledgebase Qnamaker Managed'
      operationId: microsoftAzureAlterationsReplacealterationsforkb
      parameters:
        - $ref: '#/parameters/KbId'
        - $ref: '#/parameters/WordAlterations'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '204':
          description: HTTP 204 No Content.
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulSetAltsForKb.json
      description: Needs a more full description created.
  /knowledgebases:
    get:
      tags:
        - Knowledgebases
      summary: 'Microsoft Azure Gets All Knowledgebases For A User'
      operationId: microsoftAzureKnowledgebaseListall
      parameters: []
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Collection of knowledgebases.
          schema:
            $ref: '#/definitions/KnowledgebasesDTO'
          x-nullable: true
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulKbsResponse.json
      description: Needs a more full description created.
  /operations/{operationId}:
    get:
      tags:
        - Operations
      summary: 'Microsoft Azure Gets Details Of A Specific Long Running Operation'
      operationId: microsoftAzureOperationsGetdetails
      parameters:
        - $ref: '#/parameters/OperationId'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Details of the long running operation.
          schema:
            $ref: '#/definitions/Operation'
          x-nullable: true
          headers:
            RetryAfter:
              type: integer
              description: >-
                Indicates how long the client should wait before sending a
                follow up request. The header will be present only if the
                operation is running or has not started yet.
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulGetOps.json
      description: Needs a more full description created.
  /knowledgebases/{kbId}:
    get:
      tags:
        - Knowledgebases
      summary: 'Microsoft Azure Gets Details Of A Specific Knowledgebase'
      operationId: microsoftAzureKnowledgebaseGetdetails
      parameters:
        - $ref: '#/parameters/KbId'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Details of the knowledgebase.
          schema:
            $ref: '#/definitions/KnowledgebaseDTO'
          x-nullable: true
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulGetKb.json
      description: Needs a more full description created.
    delete:
      tags:
        - Knowledgebases
      summary: 'Microsoft Azure Deletes The Knowledgebase And All Its Data'
      operationId: microsoftAzureKnowledgebaseDelete
      parameters:
        - $ref: '#/parameters/KbId'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '204':
          description: HTTP 204 No content.
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulDelKb.json
      description: Needs a more full description created.
    post:
      tags:
        - Knowledgebases
      summary: >-
        Microsoft Azure Publishes All Changes In Test Index Of A Knowledgebase To Its Prod Index
      operationId: microsoftAzureKnowledgebasePublish
      parameters:
        - $ref: '#/parameters/KbId'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '204':
          description: HTTP 204 No content.
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulPubKb.json
      description: Needs a more full description created.
    put:
      tags:
        - Knowledgebases
      summary: 'Microsoft Azure Replace Knowledgebase Contents'
      operationId: microsoftAzureKnowledgebaseReplace
      parameters:
        - $ref: '#/parameters/KbId'
        - $ref: '#/parameters/ReplaceKb'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '204':
          description: HTTP 204 No content.
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulRepKb.json
      description: Needs a more full description created.
    patch:
      tags:
        - Knowledgebases
      summary: 'Microsoft Azure Asynchronous Operation To Modify A Knowledgebase'
      operationId: microsoftAzureKnowledgebaseUpdate
      parameters:
        - $ref: '#/parameters/KbId'
        - $ref: '#/parameters/UpdateKb'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '202':
          description: Details of the asynchronous operation.
          schema:
            $ref: '#/definitions/Operation'
          x-nullable: true
          headers:
            Location:
              type: string
              description: >-
                Relative URI to the target location of the asynchronous
                operation. Client should poll this resource to get status of the
                operation.
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulUpdKb.json
      description: Needs a more full description created.
  /knowledgebases/create:
    post:
      tags:
        - Knowledgebases
      summary: 'Microsoft Azure Asynchronous Operation To Create A New Knowledgebase'
      operationId: microsoftAzureKnowledgebaseCreate
      parameters:
        - $ref: '#/parameters/CreateKbPayload'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '202':
          description: Details of the asynchronous operation.
          schema:
            $ref: '#/definitions/Operation'
          x-nullable: true
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulCreateKb.json
      description: Needs a more full description created.
  /knowledgebases/{kbId}/{environment}/qna:
    get:
      tags:
        - Knowledgebases
      summary: 'Microsoft Azure Download The Knowledgebase'
      operationId: microsoftAzureKnowledgebaseDownload
      parameters:
        - $ref: '#/parameters/KbId'
        - $ref: '#/parameters/Environment'
        - name: source
          in: query
          description: The source property filter to apply.
          required: false
          type: string
        - name: changedSince
          in: query
          description: The last changed status property filter to apply.
          required: false
          type: string
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Collection of all Q-A in the knowledgebase.
          schema:
            $ref: '#/definitions/QnADocumentsDTO'
          x-nullable: true
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulDownloadKb.json
      description: Needs a more full description created.
  /knowledgebases/{kbId}/generateAnswer:
    post:
      tags:
        - Knowledgebases
      summary: 'Microsoft Azure Generateanswer Call To Query Knowledgebase Qna Maker Managed'
      operationId: microsoftAzureKnowledgebaseGenerateanswer
      parameters:
        - $ref: '#/parameters/KbId'
        - $ref: '#/parameters/GenerateAnswerPayload'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: GenerateAnswer call response.
          schema:
            $ref: '#/definitions/QnASearchResultList'
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulGenAns.json
      description: Needs a more full description created.
  /knowledgebases/{kbId}/train:
    post:
      tags:
        - Knowledgebases
      summary: 'Microsoft Azure Train Call To Add Suggestions To Knowledgebase Qnamaker Managed'
      operationId: microsoftAzureKnowledgebaseTrain
      parameters:
        - $ref: '#/parameters/KbId'
        - $ref: '#/parameters/TrainPayload'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '204':
          description: HTTP 204 No Content.
        default:
          description: Error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Successful query:
          $ref: ./examples/SuccessfulTrain.json
      description: Needs a more full description created.
definitions:
  UpdateKbOperationDTO:
    type: object
    description: Contains list of QnAs to be updated
    additionalProperties: false
    properties:
      add:
        description: An instance of CreateKbInputDTO for add operation
        allOf:
          - $ref: '#/definitions/CreateKbInputDTO'
      delete:
        description: An instance of DeleteKbContentsDTO for delete Operation
        allOf:
          - $ref: '#/definitions/DeleteKbContentsDTO'
      update:
        description: An instance of UpdateKbContentsDTO for Update Operation
        allOf:
          - $ref: '#/definitions/UpdateKbContentsDTO'
      enableHierarchicalExtraction:
        type: boolean
        description: >-
          Enable hierarchical extraction of Q-A from files and urls. The value
          set during KB creation will be used if this field is not present.
      defaultAnswerUsedForExtraction:
        type: string
        description: >-
          Text string to be used as the answer in any Q-A which has no extracted
          answer from the document but has a hierarchy. Required when
          EnableHierarchicalExtraction field is set to True.
        maxLength: 300
        minLength: 1
  UpdateKbContentsDTO:
    type: object
    description: PATCH body schema for Update operation in Update Kb
    additionalProperties: false
    properties:
      name:
        type: string
        description: Friendly name for the knowledgebase.
      qnaList:
        type: array
        description: List of Q-A (UpdateQnaDTO) to be added to the knowledgebase.
        items:
          $ref: '#/definitions/UpdateQnaDTO'
      urls:
        type: array
        description: >-
          List of existing URLs to be refreshed. The content will be extracted
          again and re-indexed.
        maxLength: 10
        items:
          type: string
      defaultAnswer:
        type: string
        description: Default answer sent to user if no good match is found in the KB.
        maxLength: 300
        minLength: 1
  UpdateQnaDTO:
    type: object
    description: PATCH Body schema for Update Qna List
    additionalProperties: false
    properties:
      id:
        type: integer
        description: Unique id for the Q-A
        format: int32
        maximum: 2147483647
        minimum: 0
      answer:
        type: string
        description: Answer text
      source:
        type: string
        description: >-
          Source from which Q-A was indexed. eg.
          https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs
        maxLength: 300
      questions:
        description: List of questions associated with the answer.
        allOf:
          - $ref: '#/definitions/UpdateQuestionsDTO'
      metadata:
        description: List of metadata associated with the answer to be updated
        allOf:
          - $ref: '#/definitions/UpdateMetadataDTO'
      context:
        description: Context associated with Qna to be updated.
        allOf:
          - $ref: '#/definitions/UpdateContextDTO'
  UpdateQuestionsDTO:
    type: object
    description: >-
      PATCH Body schema for Update Kb which contains list of questions to be
      added and deleted
    additionalProperties: false
    properties:
      add:
        type: array
        description: List of questions to be added
        maxLength: 100
        items:
          type: string
      delete:
        type: array
        description: List of questions to be deleted.
        maxLength: 100
        items:
          type: string
  UpdateMetadataDTO:
    type: object
    description: PATCH Body schema to represent list of Metadata to be updated
    additionalProperties: false
    properties:
      delete:
        type: array
        description: List of Metadata associated with answer to be deleted
        maxLength: 100
        items:
          $ref: '#/definitions/MetadataDTO'
      add:
        type: array
        description: List of metadata associated with answer to be added
        maxLength: 100
        items:
          $ref: '#/definitions/MetadataDTO'
  UpdateContextDTO:
    type: object
    description: Update Body schema to represent context to be updated
    properties:
      promptsToDelete:
        type: array
        description: List of prompts associated with qna to be deleted
        items:
          type: integer
          format: int32
      promptsToAdd:
        type: array
        description: List of prompts to be added to the qna.
        items:
          $ref: '#/definitions/PromptDTO'
      isContextOnly:
        type: boolean
        description: >-
          To mark if a prompt is relevant only with a previous question or not.

          true - Do not include this QnA as search result for queries without
          context

          false - ignores context and includes this QnA in search result
  DeleteKbContentsDTO:
    type: object
    description: PATCH body schema of Delete Operation in UpdateKb
    additionalProperties: false
    properties:
      ids:
        type: array
        description: List of Qna Ids to be deleted
        items:
          type: integer
          format: int32
      sources:
        type: array
        description: List of sources to be deleted from knowledgebase.
        maxLength: 300
        minLength: 1
        items:
          type: string
  CreateKbInputDTO:
    type: object
    description: Input to create KB.
    additionalProperties: false
    properties:
      qnaList:
        type: array
        description: >-
          List of QNA to be added to the index. Ids are generated by the service
          and should be omitted.
        items:
          $ref: '#/definitions/QnADTO'
      urls:
        type: array
        description: List of URLs to be added to knowledgebase.
        maxLength: 10
        items:
          type: string
      files:
        type: array
        description: List of files to be added to knowledgebase.
        maxLength: 10
        items:
          $ref: '#/definitions/FileDTO'
  QnADocumentsDTO:
    type: object
    description: List of QnADTO
    additionalProperties: false
    properties:
      qnaDocuments:
        type: array
        description: List of answers.
        items:
          $ref: '#/definitions/QnADTO'
  CreateKbDTO:
    type: object
    description: Post body schema for CreateKb operation.
    additionalProperties: false
    required:
      - name
    properties:
      name:
        type: string
        description: Friendly name for the knowledgebase.
        maxLength: 100
        minLength: 1
      qnaList:
        type: array
        description: >-
          List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are
          assigned by the service and should be omitted.
        maxLength: 1000
        items:
          $ref: '#/definitions/QnADTO'
      urls:
        type: array
        description: List of URLs to be used for extracting Q-A.
        maxLength: 10
        items:
          type: string
      files:
        type: array
        description: List of files from which to Extract Q-A.
        maxLength: 10
        items:
          $ref: '#/definitions/FileDTO'
      enableHierarchicalExtraction:
        type: boolean
        description: >-
          Enable hierarchical extraction of Q-A from files and urls. Value to be
          considered False if this field is not present.
      defaultAnswerUsedForExtraction:
        type: string
        description: >-
          Text string to be used as the answer in any Q-A which has no extracted
          answer from the document but has a hierarchy. Required when
          EnableHierarchicalExtraction field is set to True.
        maxLength: 300
        minLength: 1
      language:
        type: string
        description: >-
          Language of the knowledgebase. Please find the list of supported
          languages <a
          href="https://aka.ms/qnamaker-languages#languages-supported"
          target="_blank">here</a>.
        maxLength: 100
        minLength: 1
      enableMultipleLanguages:
        type: boolean
        description: >-
          Set to true to enable creating KBs in different languages for the same
          resource.
      defaultAnswer:
        type: string
        description: Default answer sent to user if no good match is found in the KB.
        maxLength: 300
        minLength: 1
  FileDTO:
    type: object
    description: DTO to hold details of uploaded files.
    additionalProperties: false
    required:
      - fileName
      - fileUri
    properties:
      fileName:
        type: string
        description: >-
          File name. Supported file types are ".tsv", ".pdf", ".txt", ".docx",
          ".xlsx".
        maxLength: 200
        minLength: 1
      fileUri:
        type: string
        description: Public URI of the file.
  ReplaceKbDTO:
    type: object
    description: Post body schema for Replace KB operation.
    additionalProperties: false
    required:
      - qnAList
    properties:
      qnAList:
        type: array
        description: >-
          List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are
          assigned by the service and should be omitted.
        items:
          $ref: '#/definitions/QnADTO'
  QnADTO:
    type: object
    description: Q-A object.
    additionalProperties: false
    required:
      - answer
      - questions
    properties:
      id:
        type: integer
        description: Unique id for the Q-A.
        format: int32
      answer:
        type: string
        description: Answer text
        maxLength: 25000
        minLength: 1
      source:
        type: string
        description: >-
          Source from which Q-A was indexed. eg.
          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: array
        description: List of metadata associated with the answer.
        maxLength: 10
        items:
          $ref: '#/definitions/MetadataDTO'
      context:
        description: Context of a QnA
        allOf:
          - $ref: '#/definitions/ContextDTO'
      lastUpdatedTimestamp:
        type: string
        description: Timestamp when the QnA was last updated.
        maxLength: 300
  ContextDTO:
    type: object
    description: Context associated with Qna.
    properties:
      isContextOnly:
        type: boolean
        description: >-
          To mark if a prompt is relevant only with a previous question or not.

          true - Do not include this QnA as search result for queries without
          context

          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/PromptDTO'
  PromptDTO:
    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 - if QnaId is present, QnADTO
          object is ignored.
        format: int32
      qna:
        description: >-
          QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO
          object
        allOf:
          - $ref: '#/definitions/QnADTO'
      displayText:
        type: string
        description: Text displayed to represent a follow up question prompt
        maxLength: 200
  MetadataDTO:
    type: object
    description: Name - value pair of metadata.
    additionalProperties: false
    required:
      - name
      - value
    properties:
      name:
        type: string
        description: Metadata name.
        maxLength: 100
        minLength: 1
      value:
        type: string
        description: Metadata value.
        maxLength: 500
        minLength: 1
  ErrorResponse:
    type: object
    description: >-
      Error response. As per Microsoft One API guidelines -
      https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
    additionalProperties: false
    properties:
      error:
        description: The error object.
        allOf:
          - $ref: '#/definitions/Error'
  Error:
    type: object
    description: >-
      The error object. As per Microsoft One API guidelines -
      https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
    additionalProperties: false
    required:
      - code
    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'
  ErrorCode:
    type: string
    description: Human readable error code.
    x-ms-enum:
      name: ErrorCodeType
      modelAsString: true
    enum:
      - BadArgument
      - Forbidden
      - NotFound
      - KbNotFound
      - Unauthorized
      - Unspecified
      - EndpointKeysError
      - QuotaExceeded
      - QnaRuntimeError
      - SKULimitExceeded
      - OperationNotFound
      - ServiceError
      - ValidationFailure
      - ExtractionFailure
  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
    properties:
      code:
        type: string
        description: A more specific error code than was provided by the containing error.
      innerError:
        description: >-
          An object containing more specific information than the current object
          about the error.
        $ref: '#/definitions/InnerErrorModel'
  Operation:
    type: object
    description: Record to track long running operation.
    additionalProperties: false
    properties:
      operationState:
        description: Operation state.
        $ref: '#/definitions/OperationState'
      createdTimestamp:
        type: string
        description: Timestamp when the operation was created.
      lastActionTimestamp:
        type: string
        description: Timestamp when the current state was entered.
      resourceLocation:
        type: string
        description: Relative URI to the target resource location for completed resources.
      userId:
        type: string
        description: User Id
      operationId:
        type: string
        description: Operation Id.
      errorResponse:
        description: Error details in case of failures.
        $ref: '#/definitions/ErrorResponse'
  OperationState:
    type: string
    description: Enumeration of operation states.
    x-ms-enum:
      name: OperationStateType
      modelAsString: true
    enum:
      - Failed
      - NotStarted
      - Running
      - Succeeded
  KnowledgebasesDTO:
    type: object
    description: Collection of knowledgebases owned by a user.
    additionalProperties: false
    properties:
      knowledgebases:
        type: array
        description: Collection of knowledgebase records.
        items:
          $ref: '#/definitions/KnowledgebaseDTO'
  KnowledgebaseDTO:
    type: object
    description: Response schema for CreateKb operation.
    additionalProperties: false
    properties:
      id:
        type: string
        description: Unique id that identifies a knowledgebase.
      hostName:
        type: string
        description: URL host name at which the knowledgebase is hosted.
      lastAccessedTimestamp:
        type: string
        description: Time stamp at which the knowledgebase was last accessed (UTC).
      lastChangedTimestamp:
        type: string
        description: Time stamp at which the knowledgebase was last modified (UTC).
      lastPublishedTimestamp:
        type: string
        description: Time stamp at which the knowledgebase was last published (UTC).
      name:
        type: string
        description: Frie

# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/microsoft-azure/refs/heads/main/openapi/qnamaker-client-openapi-original.yml