Knowledgebase - Train

Train call to add suggestions to knowledgebase (QnAMaker Managed).

POST {Endpoint}/qnamaker/v5.0-preview.2/knowledgebases/{kbId}/train

URI Parameters

Name In Required Type Description
Endpoint
path True

string

Supported Cognitive Services endpoint (e.g., https://< qnamaker-resource-name >.api.cognitiveservices.azure.com).

kbId
path True

string

Knowledgebase id.

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Request Body

Name Type Description
feedbackRecords

FeedbackRecordDTO[]

List of feedback records.

Responses

Name Type Description
204 No Content

HTTP 204 No Content.

Other Status Codes

ErrorResponse

Error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful query

Sample request

POST {Endpoint}/qnamaker/v5.0-preview.2/knowledgebases/9d091697-fb8c-4ed5-9ac0-35bf8273bfff/train


{
  "feedbackRecords": [
    {
      "userId": "sd53lsY=",
      "userQuestion": "qna maker with luis",
      "qnaId": 4
    }
  ]
}

Sample response

Definitions

Name Description
Error

The error object. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

ErrorCodeType

One of a server-defined set of error codes.

ErrorResponse

Error response. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

FeedbackRecordDTO

Active learning feedback record.

FeedbackRecordsDTO

Active learning feedback records.

InnerErrorModel

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.

Error

The error object. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

Name Type Description
code

ErrorCodeType

One of a server-defined set of error codes.

details

Error[]

An array of details about specific errors that led to this reported error.

innerError

InnerErrorModel

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

ErrorCodeType

One of a server-defined set of error codes.

Name Type Description
BadArgument

string

EndpointKeysError

string

ExtractionFailure

string

Forbidden

string

KbNotFound

string

NotFound

string

OperationNotFound

string

QnaRuntimeError

string

QuotaExceeded

string

SKULimitExceeded

string

ServiceError

string

Unauthorized

string

Unspecified

string

ValidationFailure

string

ErrorResponse

Error response. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

Name Type Description
error

Error

The error object.

FeedbackRecordDTO

Active learning feedback record.

Name Type Description
qnaId

integer

The qnaId for which the suggested question is provided as feedback.

userId

string

Unique identifier for the user.

userQuestion

string

The suggested question being provided as feedback.

FeedbackRecordsDTO

Active learning feedback records.

Name Type Description
feedbackRecords

FeedbackRecordDTO[]

List of feedback records.

InnerErrorModel

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.

Name Type Description
code

string

A more specific error code than was provided by the containing error.

innerError

InnerErrorModel

An object containing more specific information than the current object about the error.