Jobs

In Dock Certs, "jobs" are blockchain transactions that we submit on your behalf. You can choose to either register a webhook or poll the API to receive job information. Certain things in the API, such as revoking a credential, require a blockchain transaction to finalize before the job can be considered "done". The time to wait varies on network load and other factors, but typically is within 5-10 seconds.

You can track the current job status by querying the job id returned as part of the initial API response that triggered the job. The work is done asynchronously.

Endpoints

GET /jobs/{Id}\

Get Job Status and Data

To check the Job status and data, you can use the GET method and simply put the Job id. It will return information related to the job being processed and its associated blockchain transaction. On completion or failure, the job data will be updated with a response from the blockchain.

Parameters

NameInTypeRequiredDescription

id

path

true

Represents a Job id.

GET /jobs/{Id} REQUEST

curl --location --request GET https://api.dock.io/jobs/{id} \
  --header 'DOCK-API-TOKEN: API_KEY'

Responses

StatusMeaningDescriptionSchema

200

The request was successful and return the job description.

404

The request was unsuccessful, because the Job id was not found.

402

Transaction limit reached or upgrade required to proceed

200 Response

{
  "id": "123",
  "result": {
    "InBlock": "0x00"
  },
  "status": "finalized"
}

Last updated