Skip to content

Retrieve a list of documents

Request

Retrieve a list of documents.

Security
OAuth2(Required scopes: documents.read)
Query
projectIdArray of strings

Project ids to to find items by. If ommitted, items from all existing projects are returned.

offsetinteger, >= 0

A zero-based offset of the first item in the data collection to return.

limitinteger, [ 0 .. 50 ]

Limit the amount of items returned in the response. If the value exceeds the maximum, then the maximum value will be used.

Default:20
sortstring

The field to sort reponse items by.

Default:"-createdAt"
Enum:"createdAt""-createdAt""+createdAt""updatedAt""-updatedAt""+updatedAt"
stateArray of strings(DocumentState)

Used to retrieve documents that are in specific states only. Multiple states can be used for this filtering. By default, documents in all states are returned.

Items Enum:"done""doneAutomatically""extracted""failed""inCompletion""junk""new""processing""rejected""reviewRequired"
fileIdstring

File identifier to retrieve documents that were created from that file

caseIdstring

Case identifier to retrieve documents that were created for that case.

curl -i -X GET \
  'https://api.cloud.hypatos.ai/v2/documents?projectId=string&offset=0&limit=20&sort=createdAt&state=done&fileId=string&caseId=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List of documents

Bodyapplication/json
dataArray of objects(DocumentResponse)
limitinteger

The limit used for this page of results. This will be the same as the limit query parameter unless it exceeds the maximal allowed value.

Example:20
offsetinteger

The offset used for this page of results. This will be the same as the offset query parameter

Example:0
totalCountinteger

The total number of elements in the data attribute

Example:1000
Response
{ "data": [ { … } ], "limit": 20, "offset": 0, "totalCount": 1000 }