Get a work request item

get

/api/20210901/workRequests/{id}

Return a single work request item by id.

Request

Path Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

WorkRequest item.
Body ()
Root Schema : WorkRequest
Type: object
Show Source
Nested Schema : Errors
Type: array
Errors from this work request, if any.
Show Source
Nested Schema : resources
Type: array
Resources this work request affects.
Show Source
Nested Schema : WorkRequestError
Match All
Show Source
Nested Schema : Error
Type: object
Show Source
Nested Schema : WorkRequestError-allOf[1]
Type: object
Show Source
Nested Schema : WorkRequestResource
Type: object
Show Source
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).
Body ()
Root Schema : Error
Type: object
Show Source

401 Response

Unauthorized (missing or expired credentials, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

403 Response

Forbidden (missing permissions for operation, request denied for unspecified reason, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

404 Response

Not Found. The requested resource was not found.
Body ()
Root Schema : Error
Type: object
Show Source

409 Response

Conflict (operation results in constraint violation, the operation is incompatible with the current state, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

412 Response

Precondition Failed. One or more preconditions are not satisfied for the operation to proceed.
Body ()
Root Schema : Error
Type: object
Show Source

500 Response

Internal Server Error. The server encountered an unexpected condition preventing fulfilment of the request.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

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 or oa-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",

}
Back to Top