Snapshot - Get Operation Status
Retrieve the status of a take/apply snapshot operation.
GET {Endpoint}/face/v1.0/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). |
operation
|
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 |
A successful call returns the snapshot operation's status. |
|
Other Status Codes |
Error response. |
Security
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Examples
Get snapshot operation status example
Sample request
GET {Endpoint}/face/v1.0/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. |
Operation |
Operation status object. Operation refers to the asynchronous backend task including taking a snapshot and applying a snapshot. |
Operation |
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 body. |
Error
Error body.
Name | Type | Description |
---|---|---|
code |
string |
|
message |
string |
OperationStatus
Operation status object. Operation refers to the asynchronous backend task including taking a snapshot and applying a snapshot.
Name | Type | Description |
---|---|---|
createdTime |
string |
A combined UTC date and time string that describes the time when the operation (take or apply a snapshot) is requested. E.g. 2018-12-25T11:41:02.2331413Z. |
lastActionTime |
string |
A combined UTC date and time string that describes the last time the operation (take or apply a snapshot) is actively migrating data. 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 |
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 |