List Files
GET/files
Retrieves a paginated list of all files uploaded by the client or user. From API client version 3.7.0 the list is paged with an opaque cursor and returns pagination { limit, has_more, next_cursor } without totals: pass next_cursor as cursor, with the same order_by and filters, until has_more is false. Sending page, an invalid cursor, or a cursor with a different order_by or filters returns a 400. Older API client versions page with page and get total_pages and total_results.
Request
Query Parameters
Default value: 50
GET /files parameter
The page to return. Default 1. Only for API client versions below 3.7.0, which page with cursor instead and reject page.
Requires API client version 3.7.0. The next_cursor of the previous page. Send the same order_by and filters as the request that returned it. Omit for the first page.
Possible values: [desc, asc]
The files are ordered by creation date, newest first by default.
Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?)?Z?$
The earliest creation date of the files to return.
Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?)?Z?$
The latest creation date of the files to return.
Possible values: [application/pdf, image/png, image/jpg]
Filters the file list for the specific mimetype.
The lookup key of the files to return
Responses
- 200
- 400
GET /files Successful response
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
- MOD1
- MOD2
Possible values: [1.0]
The version of the response schema
Possible values: [paginated_list]
A paginated list of the file resource.
Possible values: [file]
Data contains the file resource.
data object[]required
The resource data
The unique identifier of the file
Possible values: [file]
Possible values: non-empty
The complete filename including the file extension
Possible values: non-empty
The mime type of the file
The signed read url of the file
metadata object
A provided lookup key provided by you to help you identify the file.
UTC datetime ISO string
UTC datetime ISO string
pagination object required
Contains the pagination meta data. From API client version 3.7.0 lists are paged with a cursor and have no totals.
Possible values: <= 9007199254740991
The maximum number of items per page
Possible values: <= 9007199254740991
The total number of pages
Possible values: <= 9007199254740991
The current page number
Possible values: <= 9007199254740991
The total number of results
Possible values: <= 9007199254740991
The requested limit, or the number of items on this page when it is non-empty and holds fewer items than requested
Whether there are more items after this page
Pass as cursor, with the same order_by and filters, to get the next page. Null when there are no more items.
{
"version": "1.0",
"result_type": "paginated_list",
"resource_type": "file",
"data": [
{
"id": "cnmrjiuebamsmek40myexample",
"resource_type": "file",
"filename": "my-file.pdf",
"mime_type": "application/pdf",
"url": "https://zigned.se",
"metadata": {
"lookup_key": "file_tag"
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
],
"pagination": {}
}
GET /files Error response
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [error]
error objectrequired
Possible values: [input_validation_error, bad_request, authorization_error, forbidden_error, not_found_error, conflict_error, internal_server_error]
input_validation_error (400): the request input is invalid. bad_request (400): the request cannot be processed. authorization_error (401): the access token is missing or invalid. forbidden_error (403): the client is not allowed to perform the request. not_found_error (404): the resource does not exist. conflict_error (409): a concurrent change made the request invalid, e.g. the agreement stopped being editable while the request was processed. Re-fetch the resource before retrying. internal_server_error (500): an unexpected error occurred.
Possible values: >= 400 and <= 599
{
"status": "error",
"error": {
"type": "input_validation_error",
"code": 0,
"message": "string",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}