API Documentation
Classify
Human in the Loop
API Status
Get Jobs
Retrieve a list of jobs with filtering and pagination
const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
'Content-Type': 'application/json',
},
};
fetch('https://api.getomni.ai/jobs?status=COMPLETE&page=1&size=10', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
{
"jobs": [
{
"jobId": "123e4567-e89b-12d3-a456-426614174001",
"completedAt": "2023-09-10T15:30:45.123Z",
"createdAt": "2023-09-10T15:29:45.123Z",
"requestBody": {
"documentUrl": "https://example.com/document.pdf"
},
"responseBody": {
"ocr": {
"pages": [],
}
"extracted": {
"name": "John Doe",
"amount": "1500"
}
},
"status": "COMPLETE",
"statusUpdatedAt": "2023-09-10T15:30:45.123Z",
"extractId": "123e4567-e89b-12d3-a456-426614174002",
"pagesProcessed": 2
}
],
"pagination": {
"currentPage": 1,
"pageSize": 10,
"totalCount": 42,
"totalPages": 5,
"nextPage": 2,
"previousPage": null
}
}
This endpoint allows you to fetch a list of jobs in your workspace with support for filtering by status, review status, and template ID. Results are paginated.
Query Parameters
Filter jobs by their processing status. Valid values are: IN_PROGRESS
,
COMPLETE
, CANCELLED
, ERROR
, PAUSED
, PENDING
, RETRY
Filter jobs by their human review status. Valid values are: APPROVED
,
REJECTED
, PENDING
, CANCELLED
Filter jobs by template ID
Page number for pagination (starts at 1)
Number of jobs per page (default: 100)
Response
Array of job objects
Unique identifier for the job
Timestamp when the job was completed
Timestamp when the job was created
The original request body sent for this job
The response body received for this job
Current status of the job. Valid values are: IN_PROGRESS
, COMPLETE
,
CANCELLED
, ERROR
, PAUSED
, PENDING
, RETRY
Timestamp when the job status was last updated
Current review status of the job. Valid values are: APPROVED
,
REJECTED
, PENDING
, CANCELLED
ID of the extraction related to this job
Number of pages processed in this job
Pagination information
Current page number
Number of items per page
Total number of jobs matching the filter criteria
Total number of pages
Next page number, or null if there is no next page
Previous page number, or null if there is no previous page
const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
'Content-Type': 'application/json',
},
};
fetch('https://api.getomni.ai/jobs?status=COMPLETE&page=1&size=10', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
{
"jobs": [
{
"jobId": "123e4567-e89b-12d3-a456-426614174001",
"completedAt": "2023-09-10T15:30:45.123Z",
"createdAt": "2023-09-10T15:29:45.123Z",
"requestBody": {
"documentUrl": "https://example.com/document.pdf"
},
"responseBody": {
"ocr": {
"pages": [],
}
"extracted": {
"name": "John Doe",
"amount": "1500"
}
},
"status": "COMPLETE",
"statusUpdatedAt": "2023-09-10T15:30:45.123Z",
"extractId": "123e4567-e89b-12d3-a456-426614174002",
"pagesProcessed": 2
}
],
"pagination": {
"currentPage": 1,
"pageSize": 10,
"totalCount": 42,
"totalPages": 5,
"nextPage": 2,
"previousPage": null
}
}
const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
'Content-Type': 'application/json',
},
};
fetch('https://api.getomni.ai/jobs?status=COMPLETE&page=1&size=10', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
{
"jobs": [
{
"jobId": "123e4567-e89b-12d3-a456-426614174001",
"completedAt": "2023-09-10T15:30:45.123Z",
"createdAt": "2023-09-10T15:29:45.123Z",
"requestBody": {
"documentUrl": "https://example.com/document.pdf"
},
"responseBody": {
"ocr": {
"pages": [],
}
"extracted": {
"name": "John Doe",
"amount": "1500"
}
},
"status": "COMPLETE",
"statusUpdatedAt": "2023-09-10T15:30:45.123Z",
"extractId": "123e4567-e89b-12d3-a456-426614174002",
"pagesProcessed": 2
}
],
"pagination": {
"currentPage": 1,
"pageSize": 10,
"totalCount": 42,
"totalPages": 5,
"nextPage": 2,
"previousPage": null
}
}