GET v1/Jobs
GET
https://api.subworkflow.ai/v1/jobs
Get a list of recent jobs for extraction and vectorization requests
Summary
- Only
NOT_STARTEDandIN_PROGRESSstatus jobs will always be visible in this list. - Finished jobs with statuses
SUCCESSandERRORwill be hidden after 24hrs from completion. - Jobs, whether visible or hidden, can always be accessed via their
idusing thev1/jobs/:idendpoint.
Parameters
| name | type | location | required | description |
|---|---|---|---|---|
| statuses | string | query | optional | filters jobs by status. Comma-delimited for multiple statuses. One of "NOT_STARTED", "IN_QUEUE", "IN_PROGRESS", "SUCCESS", "ERROR". |
| offset | number | query | optional | offset to return results from |
| limit | number | query | optional | limit the number of returned results |
Response
- Success
- 400 Error
- 404 Error
{
"type": "object",
"properties": {
"statuses": {
"type": "array",
"items: {
"type": "string",
"enum": ["NOT_STARTED", "IN_QUEUE", "IN_PROGRESS", "SUCCESS", "ERROR"]
}
},
sort: {
"type": "array",
"items: { "type": "string" }
}
"total": { "type": "number" },
"offset": { "type": "number" },
"limit": { "type": "number" },
"data": {
"type": "array",
"items": {
"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?offset=0&limit=10
--header 'x-api-key: <YOUR-API-KEY>'
const req = await fetch("https://api.subworkflow.ai/v1/jobs?offset=0&limit=10", {
method: "GET",
headers: { "x-api-key": "<YOUR-API-KEY>" }
});
{
"statuses": [
"NOT_STARTED",
"IN_QUEUE",
"IN_PROGRESS",
"SUCCESS",
"ERROR"
],
"orderBy": [],
"offset": 0,
"limit": 10,
"total": 2,
"data": [
{
"id": "dsj_fGK3mHRFyc32GS1m",
"datasetId": "ds_ar7e4PtGX7fGGnSt",
"type": "datasets/vectorize",
"status": "SUCCESS",
"statusText": "",
"startedAt": 1761933166853,
"finishedAt": 1761933209517,
"canceledAt": 0,
"createdAt": 1761933149976,
"updatedAt": 1761933149976
},
{
"id": "dsj_uSk7xkiOivSBVjZ1",
"datasetId": "ds_HD8XfWztROW3L5Fg",
"type": "datasets/extract",
"status": "SUCCESS",
"statusText": "",
"startedAt": 1760539354372,
"finishedAt": 1760539378424,
"canceledAt": null,
"createdAt": 1760539353866,
"updatedAt": 1760539353866
}
]
}