GET
/
documents
/
v2
/
parse
cURL
curl --request GET \
  --url https://api.tensorlake.ai/documents/v2/parse \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "parse_id": "parse_abcd1234",
      "status": "pending",
      "dataset_id": "<string>",
      "created_at": "2023-10-01T12:00:00Z",
      "finished_at": "<string>"
    }
  ],
  "has_more": true,
  "next_cursor": "<string>",
  "prev_cursor": "<string>"
}

List Parse Jobs

Retrieve a list of all parse jobs that have been submitted. This endpoint allows you to see the status and metadata of each parse job.

The endpoint is paginated. A page has the following fields:

  • items: An array of parse jobs, each containing the fields described below.
  • has_more: A boolean indicating whether there are more parse jobs available beyond the current page.
  • next_cursor: A base64-encoded cursor for the next page of results. If has_more is false, this field will be null.
  • prev_cursor: A base64-encoded cursor for the previous page of results. If this is the first page, this field will be null.

The response will include a page of parse jobs, each containing the following fields:

  • parse_id: The unique identifier for the parse job.
  • status: The current status of the parse job (e.g., pending, processing, successful, failure).
  • created_at: The RFC 3339 timestamp when the parse job was created.
  • finished_at: The RFC 3339 timestamp when the parse job was completed or failed.
  • options: The configuration options used for the parse job, including the file ID, file URL, raw text, mime type, and structured extraction options, etc.

Filters

You can filter the list of parse jobs by providing query parameters:

  • cursor: A base64-encoded cursor for pagination. If not provided, the first page will be returned.
  • direction: The direction of pagination. Can be next or prev. Defaults to next.
  • limit: The maximum number of parse jobs to return per page. Defaults to 100, with a maximum of 1000.
  • filename: Filter by the original filename of the file used for parsing. This is useful to find parse jobs related to a specific file.
  • status: Filter by the status of the parse job. Can be pending, processing, successful, or failure.
  • id: Filter by the unique identifier of the parse job. This is useful to retrieve a specific parse job, but is preferable to use the Get Parse Result endpoint for that purpose.
  • created_after: Filter by the creation date of the parse job. Only parse jobs created after this date will be returned. The date should be in RFC 3339 format.
  • created_before: Filter by the creation date of the parse job. Only parse jobs created before this date will be returned. The date should be in RFC 3339 format.
  • finished_after: Filter by the completion date of the parse job. Only parse jobs completed after this date will be returned. The date should be in RFC 3339 format.
  • finished_before: Filter by the completion date of the parse job. Only parse jobs completed before this date will be returned. The date should be in RFC 3339 format.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

cursor
string | null

Optional cursor for pagination.

This is a base64-encoded string representing a timestamp. It is used to paginate through the results.

direction
enum<string> | null

The direction of pagination.

This can be either next or prev.

The default is next, which means the next page of results will be

Available options:
next,
prev
dataset_name
string | null

The name of the dataset to filter the results by.

This is an optional parameter because not every parse operation is associated with a dataset.

limit
integer

The maximum number of results to return per page.

The default is 100.

Required range: x >= 0
filename
string | null

The filename to filter the results by.

This is an optional parameter that can be used to filter the results by the filename of the parsed document.

status
enum<string> | null

The status of the parse operation to filter the results by.

This is an optional parameter that can be used to filter the results by the status of the parse operation.

The possible values are pending, processing, failure, and successful.

Available options:
pending,
processing,
successful,
failure
id
string | null

The ID of the parse operation to filter the results by.

created_after
string | null

The date and time after which the parse operation was created.

The date should be in RFC3339 format.

created_before
string | null

The date and time before which the parse operation was created.

The date should be in RFC3339 format.

finished_after
string | null

The date and time after which the parse operation was finished.

The date should be in RFC3339 format.

finished_before
string | null

The date and time before which the parse operation was finished.

The date should be in RFC3339 format.

Response

200
application/json

List of parse jobs

The response is of type object.