GET
/
documents
/
v2
/
files
cURL
curl --request GET \
  --url https://api.tensorlake.ai/documents/v2/files \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "file_id": "file_12345",
      "file_name": "example.pdf",
      "mime_type": "application/pdf",
      "file_size": 100000,
      "checksum_sha256": "d3242c5c1d369d233fa65183bdd4c486eba109ceb13490ed291384eaffbe743b",
      "created_at": "2023-10-01T12:00:00Z",
      "labels": {
        "priority": "high",
        "source": "email"
      }
    }
  ],
  "has_more": true,
  "next_cursor": "<string>",
  "prev_cursor": "<string>"
}

This operation allows you to see every file that has been uploaded to the Project specified by the API key used in the request.

The response will include metadata about each file, such as the file ID, name, size, and type.

We use cursor-based pagination to return the files in pages. A page has the following fields:

  • items: An array of file metadata, each containing the fields described below.
  • has_more: A boolean indicating whether there are more files 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.

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>

Direction of pagination.

This can be either next or prev.

next means to get the next page of results, while prev means to get the previous page of results.

Available options:
next,
prev
limit
integer

Optional limit for the number of results to return.

This is a positive integer that specifies the maximum number of results to return. If not provided, a default value will be used.

Required range: x >= 0
file_name
string | null

Optional file name to filter results by.

This is a case-sensitive substring that will be matched against the file names.

If provided, only files with names containing this substring will be returned.

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.

Response

200
application/json

List of files

The response is of type object.