Get a work request item
/api/20210901/workRequests/{id}
Request
-
id(required): string
Catalog item ID in base64url format.
There's no request body for this operation.
Back to TopResponse
- application/json
200 Response
object
-
Errors: array
Errors
Errors from this work request, if any.
-
id(required): string
-
operationType(required): string
Allowed Values:
[ "CREATE_SNAPSHOT", "RESTORE_SNAPSHOT", "RELOAD_DATASET" ]
-
percentComplete(required): number
(float)
Percentage of the request completed.
-
resources: array
resources
Resources this work request affects.
-
resourceType: string
Allowed Values:
[ "SNAPSHOT", "SYSTEM", "DATASET" ]
Type of the resource associated with a work request. -
status(required): string
Allowed Values:
[ "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" ]
Status of a work request. -
timeAccepted(required): string
(date-time)
Time the work request was accepted, in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z`
-
timeFinished: string
(date-time)
Time the work request was finished, in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z`
-
timeStarted: string
(date-time)
Time the work request was started, in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z`
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
object
-
actionResult(required): string
Way in which this resource was affected by this work request.
-
id: string
ID of the resource the work request is affecting.
-
metadata: object
metadata
Additional Properties Allowed: additionalPropertiesAdditional metadata of the resource.
-
resourceType(required): string
Allowed Values:
[ "SNAPSHOT", "SYSTEM", "DATASET" ]
Type of the resource associated with a work request.
object
400 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
401 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
403 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
404 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
409 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
412 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
500 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
Examples
You can get detailed status information for a work request using workRequestId
or oa-work-request-id
. The details include the request type, current status of the request (for example, RUNNING, SUCCEEDED, FAILED), percentage complete, and the time the work request was accepted, started, and completed.
- Example 1: Get snapshot work request status using a
workRequestId
oroa-work-request-id
- Example 2: Get dataset work request status using a
oa-work-request-id
Example 1: Get snapshot work request status using a workRequestId
or oa-work-request-id
In this example, you obtain information about a work request where the workRequestId
(or oa-work-request-id
) is lfc-ab:1-cd:2
.
cURL Example:
curl -i \ --header 'Authorization: Bearer <token>' \ --request GET 'https://<hostname>/api/20210901/workRequests/lfc-ab:1-cd:2'
Example of Request Body
Not applicable.
Example of Response Body
Status 200: { "id": "lfc-ab:1-cd:2", "operationType": "CREATE_SNAPSHOT", "percentComplete": 100, "status": "SUCCEEDED", "timeAccepted": "2021-11-02T17:30:39.123Z", "timeStarted": "2021-11-02T17:30:39.123Z", "timeFinished": "2021-11-02T17:32:41.798Z", "resources": [ { "resourceType": "SNAPSHOT", "id": "ac6fdab7-9c16-4d22-a56f-cb7b5d15505a", "actionResult": "CREATED" } ] }
Example 2: Get dataset work request status using a oa-work-request-id
In this example, you obtain information about a work request where the oa-work-request-id
is bidr-1E309E468A4518E149438E31294EB54
.
cURL Example:
curl -i \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --request GET 'https://<hostname>/api/20210901/workRequests/bidr-1E309E468A4518E149438E31294EB54'
Example of Request Body
Not applicable.
Example of Response Body
Status 200: { "id": "bidr-1E309E468A4518E149438E31294EB54", "operationType": "RELOAD_DATASET", "percentComplete": 100, "resourceType": "DATASET", "status": "SUCCEEDED", "timeAccepted": "2022-07-06T20:25:11.0+0000", "timeStarted": "2022-07-06T20:25:32.0+0000", "timeFinished": "2022-07-06T20:25:42.0+0000", }