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.
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.
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | JobId | true | Represents a Job id. |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request was successful and return the job description. | JobDesc |
404 | Not Found | The request was unsuccessful, because the Job id was not found. | Error |
402 | Payment required | Transaction limit reached or upgrade required to proceed | Error |
GET /jobs/{Id} REQUEST CURL
curl --location --request GET https://api.dock.io/jobs/{id} \
--header 'DOCK-API-TOKEN: API_KEY'
200 Response
{
"id": "123",
"result": {
"InBlock": "0x00"
},
"status": "finalized"
}