Endpoint Keys - Refresh Keys

Re-generates an endpoint key.

PATCH {Endpoint}/qnamaker/v5.0-preview.2/endpointkeys/{keyType}

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).

keyType
path True

string

Type of Key

Request Header

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

string

Responses

Name Type Description
200 OK

EndpointKeysDTO

Details of the endpoint keys generated.

Other Status Codes

ErrorResponse

Error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful query

Sample Request

PATCH {Endpoint}/qnamaker/v5.0-preview.2/endpointkeys/PrimaryKey

Sample Response

{
  "primaryEndpointKey": "73e88a14-694a-44d5-883b-184a68aa8530",
  "secondaryEndpointKey": "b2c98c16-ca31-4294-8626-6c57454a5063",
  "installedVersion": "4.0.5",
  "lastStableVersion": "4.0.6"
}

Definitions

Name Description
EndpointKeysDTO

Schema for EndpointKeys generate/refresh operations.

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.

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.

EndpointKeysDTO

Schema for EndpointKeys generate/refresh operations.

Name Type Description
installedVersion

string

Current version of runtime.

language

string

Language setting of runtime.

lastStableVersion

string

Latest version of runtime.

primaryEndpointKey

string

Primary Access Key.

secondaryEndpointKey

string

Secondary Access Key.

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.

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.