Long Running Operations - Get Operation State
Returns the current state of the long running operation.
You get the operationId from x-ms-operation-id header return by the API that initiated the operation. Once the operation status is 'Succeeded' use the Get Operation Result API to retrieve the result.
Permissions
Same as the permissions required for the API that initiated the operation.
Required Delegated Scope
Same as the scopes required for the API that initiated the operation.
Microsoft Entra supported identities
This API supports the Microsoft identities listed in this section.
Identity | Support |
---|---|
User | Yes |
Service principal | Yes |
Managed identities | Yes |
Interface
GET https://api.fabric.microsoft.com/v1/operations/{operationId}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
operation
|
path | True |
string uuid |
The operation ID |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Request completed successfully. Headers
|
|
Other Status Codes |
Common error codes:
|
Examples
Get active long running operation example |
Get completed long running operation example |
Get active long running operation example
Sample request
GET https://api.fabric.microsoft.com/v1/operations/cfafbeb1-8037-4d0c-896e-a46fb27ff227
Sample response
Location: https://api.fabric.microsoft.com/operations/cfafbeb1-8037-4d0c-896e-a46fb27ff227
x-ms-operation-id: cfafbeb1-8037-4d0c-896e-a46fb27ff227
Retry-After: 20
{
"status": "Running",
"createdTimeUtc": "2023-09-13T14:56:18.477Z",
"lastUpdatedTimeUtc": "2023-09-13T15:01:10.532Z",
"percentComplete": 25
}
Get completed long running operation example
Sample request
GET https://api.fabric.microsoft.com/v1/operations/cfafbeb1-8037-4d0c-896e-a46fb27ff227
Sample response
Location: https://api.fabric.microsoft.com/operations/cfafbeb1-8037-4d0c-896e-a46fb27ff227/result
x-ms-operation-id: cfafbeb1-8037-4d0c-896e-a46fb27ff227
{
"status": "Succeeded",
"createdTimeUtc": "2023-09-13T14:56:18.477Z",
"lastUpdatedTimeUtc": "2023-09-13T15:01:10.532Z",
"percentComplete": 100
}
Definitions
Name | Description |
---|---|
Error |
The error related resource details object. |
Error |
The error response. |
Error |
The error response details. |
Long |
The current status of the operation. Additional operation statuses may be added over time. |
Operation |
An object describing the details and current state of a long running operation |
ErrorRelatedResource
The error related resource details object.
Name | Type | Description |
---|---|---|
resourceId |
string |
The resource ID that's involved in the error. |
resourceType |
string |
The type of the resource that's involved in the error. |
ErrorResponse
The error response.
Name | Type | Description |
---|---|---|
errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
message |
string |
A human readable representation of the error. |
moreDetails |
List of additional error details. |
|
relatedResource |
The error related resource details. |
|
requestId |
string |
ID of the request associated with the error. |
ErrorResponseDetails
The error response details.
Name | Type | Description |
---|---|---|
errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
message |
string |
A human readable representation of the error. |
relatedResource |
The error related resource details. |
LongRunningOperationStatus
The current status of the operation. Additional operation statuses may be added over time.
Name | Type | Description |
---|---|---|
Failed |
string |
The operation has failed |
NotStarted |
string |
The operation didn't start |
Running |
string |
The operation is running |
Succeeded |
string |
The operation has finished successfully |
Undefined |
string |
The status of the operation is undefined |
OperationState
An object describing the details and current state of a long running operation
Name | Type | Description |
---|---|---|
createdTimeUtc |
string |
The start date and time of the operation |
error |
The error details in case the operation is in failed state |
|
lastUpdatedTimeUtc |
string |
The date and time of the last change to the operation |
percentComplete |
integer |
Operation progress as a percentage |
status |
The current status of the operation. Additional operation statuses may be added over time. |