Snapshot - Get Operation Status

Get status of a long running operation.

GET {Endpoint}/face/v1.0-preview/operations/{operationId}

URI Parameters

Name In Required Type Description
Endpoint
path True

string

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

operationId
path True

string

uuid

Id referencing a particular take/apply snapshot operation.

Request Header

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

string

Responses

Name Type Description
200 OK

OperationStatus

A successful call returns the operation's status.

Other Status Codes

APIError

Error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Get snapshot operation status example

Sample request

GET {Endpoint}/face/v1.0-preview/operations/a63a3bdd-a1db-4d05-87b8-dbad6850062a

Sample response

{
  "status": "succeeded",
  "createdTime": "2018-12-25T11:41:02.2331413Z",
  "lastActionTime": "2018-12-25T11:51:27.8705696Z",
  "resourceLocation": "/snapshots/e58b3f08-1e8b-4165-81df-aa9858f233dc",
  "message": null
}

Definitions

Name Description
APIError

Error information returned by the API

Error

Error body.

OperationStatus

Operation status object. Operation refers to an asynchronous backend task.

OperationStatusType

Operation status: notstarted, running, succeeded, failed. If the operation is requested and waiting to perform, the status is notstarted. If the operation is ongoing in backend, the status is running. Status succeeded means the operation is completed successfully, specifically for snapshot taking operation, it illustrates the snapshot is well taken and ready to apply, and for snapshot applying operation, it presents the target object has finished creating by the snapshot and ready to be used. Status failed is often caused by editing the source object while taking the snapshot or editing the target object while applying the snapshot before completion, see the field "message" to check the failure reason.

APIError

Error information returned by the API

Name Type Description
error

Error

Error body.

Error

Error body.

Name Type Description
code

string

message

string

OperationStatus

Operation status object. Operation refers to an asynchronous backend task.

Name Type Description
createdTime

string

A combined UTC date and time string that describes the time when the operation is requested. E.g. 2018-12-25T11:41:02.2331413Z.

finishedTime

string

A combined UTC date and time string that describes the time when the operation finished. E.g. 2018-12-25T11:41:02.2331413Z.

lastActionTime

string

A combined UTC date and time string that describes the last time the operation is actively running. The lastActionTime will keep increasing until the operation finishes. E.g. 2018-12-25T11:51:27.8705696Z.

message

string

Show failure message when operation fails (omitted when operation succeeds).

resourceLocation

string

When the operation succeeds successfully, for snapshot taking operation the snapshot id will be included in this field, and for snapshot applying operation, the path to get the target object will be returned in this field.

status

OperationStatusType

Operation status: notstarted, running, succeeded, failed. If the operation is requested and waiting to perform, the status is notstarted. If the operation is ongoing in backend, the status is running. Status succeeded means the operation is completed successfully, specifically for snapshot taking operation, it illustrates the snapshot is well taken and ready to apply, and for snapshot applying operation, it presents the target object has finished creating by the snapshot and ready to be used. Status failed is often caused by editing the source object while taking the snapshot or editing the target object while applying the snapshot before completion, see the field "message" to check the failure reason.

OperationStatusType

Operation status: notstarted, running, succeeded, failed. If the operation is requested and waiting to perform, the status is notstarted. If the operation is ongoing in backend, the status is running. Status succeeded means the operation is completed successfully, specifically for snapshot taking operation, it illustrates the snapshot is well taken and ready to apply, and for snapshot applying operation, it presents the target object has finished creating by the snapshot and ready to be used. Status failed is often caused by editing the source object while taking the snapshot or editing the target object while applying the snapshot before completion, see the field "message" to check the failure reason.

Name Type Description
failed

string

notStarted

string

running

string

succeeded

string