Skip to main content

Jobs

Get information about a job


Request job status/result

Block Model API

Version: 1.42.9

Retrieves a given job.

A job represents a background activity in the BlockSync compute workers, such as performing a query or updating a block model based on an uploaded file. This endpoint indicates the job's status, and once it has completed or failed, details about the result are provided in a payload property.

All workspace roles can use this endpoint.

Parameters

authorizationstring
Required

Example: "ff0b8078-c7ec-41ab-87fb-f3eb32812b32"

ID of the job this call is scoped to. Represented as a v4 UUID.

Example: "860be2f5-fe06-4c1b-ac8b-7d34d2b6d2ef"

ID of the workspace this call is scoped to. Represented as a v4 UUID.

Example: "bf1a040c-8c58-4bc2-bec2-c5ae7de8bd84"

ID of the organization this call is scoped to. Represented as a v4 UUID.

Example: "e3c277c2-edc6-4a7a-8380-251dd19231f2"

ID of the block model this call is scoped to. Represented as a v4 UUID.

Returns

200

Successful Response

Example: "COMPLETE"

Status of this job. The statuses have the following meanings:

  • PENDING_UPLOAD: This is a model update job, and is awaiting notification that file upload has completed before proceeding any further.
  • QUEUED: The job is ready for processing, and is queued waiting for a worker process to become available.
  • PROCESSING: The job is actively being processed by a worker.
  • COMPLETE: The job completed succesfully.
  • FAILED: The job failed. No further processing of this job will be attempted.

The payload describes the outcome of the job, and is set for completed or failed jobs. This property will not appear if the job is not yet COMPLETE or FAILED.

  • For all failed jobs, this will be a JobErrorPayload.
  • For completed create or update jobs, this will be a Version.
  • For completed query jobs, this will be a QueryDownload.

Endpoint

GET
/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/jobs/{job_id}

Request

curl -X GET 'https://{service_host}/blockmodel/orgs/{org_id}/workspaces/{workspace_id}/block-models/{bm_id}/jobs/{job_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'

Response

{
"job_status": "PENDING_UPLOAD",
"payload": {
"base_version_id": 0,
"bbox": {
"i_minmax": {
"max": 0,
"min": 0
},
"j_minmax": {
"max": 0,
"min": 0
},
"k_minmax": {
"max": 0,
"min": 0
}
},
"bm_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"comment": "string",
"created_at": "2024-07-29T15:51:28.071Z",
"created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"geoscience_version_id": "string",
"mapping": {
"columns": [
{
"col_id": "string",
"data_type": "Boolean",
"title": "string",
"unit_id": "string"
}
]
},
"parent_version_id": 0,
"version_id": 0,
"version_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}

What is the reason for your feedback?