Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 2.65 KB

File metadata and controls

49 lines (30 loc) · 2.65 KB

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
idpathJobIdtrueRepresents a Job id.

Responses

StatusMeaningDescriptionSchema
200OKThe request was successful and return the job description.JobDesc
404Not FoundThe request was unsuccessful, because the Job id was not found.Error
402Payment requiredTransaction limit reached or upgrade required to proceedError
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"
}