Get a work request item
get
/api/20210901/workRequests/{id}
Return a single work request item by id.
Request
Path Parameters
-
id(required): string
Catalog item ID in base64url format.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
200 Response
WorkRequest item.
Root Schema : WorkRequest
Type:
Show Source
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", "CREATE_WORKBOOK_EXPORT" ]
-
percentComplete(required): number
(float)
Percentage of the request completed.
-
resources: array
resources
Resources this work request affects.
-
resourceType: string
Allowed Values:
[ "SNAPSHOT", "SYSTEM", "DATASET", "WORKBOOK_EXPORT" ]
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`
Nested Schema : Error
Type:
Show Source
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
Nested Schema : WorkRequestResource
Type:
Show Source
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", "WORKBOOK_EXPORT" ]
Type of the resource associated with a work request. -
resourceUri: string
The URI of the affected resource.
Nested Schema : metadata
Type:
object
Additional Properties Allowed
Show Source
Additional metadata of the resource.
400 Response
Bad Request (invalid query parameters, malformed headers, and so on).
Root Schema : Error
Type:
Show Source
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
401 Response
Unauthorized (missing or expired credentials, and so on).
Root Schema : Error
Type:
Show Source
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
403 Response
Forbidden (missing permissions for operation, request denied for unspecified reason, and so on).
Root Schema : Error
Type:
Show Source
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
404 Response
Not Found. The requested resource was not found.
Root Schema : Error
Type:
Show Source
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
409 Response
Conflict (operation results in constraint violation, the operation is incompatible with the current state, and so on).
Root Schema : Error
Type:
Show Source
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
412 Response
Precondition Failed. One or more preconditions are not satisfied for the operation to proceed.
Root Schema : Error
Type:
Show Source
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
500 Response
Internal Server Error. The server encountered an unexpected condition
preventing fulfilment of the request.
Root Schema : Error
Type:
Show Source
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: 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", }