GET v1/Jobs/:Id
GET
https://api.subworkflow.ai/v1/jobs/:id
Get a job record by Id
Summary
- You can poll this endpoint continuously to check for job status.
Parameters
There are no parameters for this endpoint.
Response
- Success
- 400 Error
- 404 Error
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"total": { "type": "number" },
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"datasetId": {
"type": "string"
},
"type": {
"type": "string",
"enum": ["datasets/extract","datasets/vectorize"]
},
"status": {
"type": "string",
"enum": ["NOT_STARTED","IN_PROGRESS","SUCCESS","ERROR"]
},
"statusText": {
"type": "string"
},
"startedAt": {
"type": "number",
"nullable": true
},
"finishedAt": {
"type": "number",
"nullable": true
},
"canceledAt": {
"type": "number",
"nullable": true
},
"createdAt": {
"type": "number"
},
"updatedAt": {
"type": "number",
"nullable": true
}
}
}
}
}
{
"success": { "type": "boolean" },
"error": { "type": "string" }
}
{
"success": { "type": "boolean" },
"error": { "type": "string" }
}
Example
- Curl
- JS/TS
curl https://api.subworkfow.ai/v1/jobs/dsj_fGK3mHRFyc32GS1m
--header 'x-api-key: <YOUR-API-KEY>'
const req = await fetch("https://api.subworkflow.ai/v1/jobs/dsj_fGK3mHRFyc32GS1m", {
method: "GET",
headers: { "x-api-key": "<YOUR-API-KEY>" }
});
{
"success": true,
"total": 1,
"data": {
"id": "dsj_fGK3mHRFyc32GS1m",
"datasetId": "ds_ar7e4PtGX7fGGnSt",
"type": "datasets/vectorize",
"status": "SUCCESS",
"statusText": "",
"startedAt": 1761933166853,
"finishedAt": 1761933209517,
"canceledAt": 0,
"createdAt": 1761933149976,
"updatedAt": 1761933149976
}
}