Share via


Operations - Get

Gets operation info.

GET {endpoint}/avatar/operations/{id}?api-version=2024-08-01

URI Parameters

Name In Required Type Description
endpoint
path True

string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://eastus.api.cognitive.microsoft.com).

id
path True

string

minLength: 3
maxLength: 64
pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$

The id of the operation

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Header

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

string

Provide your cognitive services subscription key here.

Responses

Name Type Description
200 OK

Operation

OK.

Other Status Codes

ErrorResponse

An error occurred.

Headers

x-ms-error-code: string

Security

Ocp-Apim-Subscription-Key

Provide your cognitive services subscription key here.

Type: apiKey
In: header

Examples

Get Operation

Sample request

GET {endpoint}/avatar/operations/06c7f835-e07b-4ac8-b33c-5b6df4a4eeef?api-version=2024-08-01

Sample response

{
  "id": "06c7f835-e07b-4ac8-b33c-5b6df4a4eeef",
  "status": "Running"
}

Definitions

Name Description
Error

The error object.

ErrorCode

Top-level error code

ErrorResponse

Error response.

InnerError

An object containing more specific information about the error.

Operation

Status of a long running operation.

OperationStatus

Status of an operation.

Error

The error object.

Name Type Description
code

ErrorCode

Top-level error code

details

Error[]

Additional supportive details regarding the error and/or expected policies.

innererror

InnerError

An object containing more specific information about the error.

message

string

High level error message.

target

string

The source of the error.

ErrorCode

Top-level error code

Value Description
BadRequest
BadArgument
Unauthorized
Forbidden
NotFound
UnsupportedMediaType
TooManyRequests
InternalServerError
ServiceUnavailable

ErrorResponse

Error response.

Name Type Description
error

Error

The error object.

InnerError

An object containing more specific information about the error.

Name Type Description
code

string

Detailed error code to help diagnostic.

innererror

InnerError

An object containing more specific information about the error.

message

string

Detailed error message.

target

string

The source of the error.

Operation

Status of a long running operation.

Name Type Description
id

string

minLength: 3
maxLength: 64
pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$

Unique operation ID.

status

OperationStatus

Status of an operation.

OperationStatus

Status of an operation.

Value Description
NotStarted
Running
Succeeded
Failed