Skip to main content
GET
Requires version 1.1.5 or later of the Archetype platform.

Overview

This endpoint returns a cursor-paginated list of metadata records for files belonging to your organization. The list is ordered on the property identified by the sort property, in the direction specified by order. For example, if sort is num_bytes and order is desc, the list is sorted in reverse order by file size (largest file first). The default sort order is by creation timestamp (sort set to created_at), in newest file first ordering. Ties are broken by the file_uid property; this ensures that the same request returns the same page when no files have changed.
When paging, be sure to keep sort and order the same.
A page holds up to limit files (default 100, at most 1000). To read the next page, pass the previous page’s next_cursor as after; to step back, pass its prev_cursor as before. has_more refers to the direction being travelled. Cursors are opaque tokens tied to the sort they were minted under and must not be constructed by the client. Sending both after and before, or a cursor that doesn’t fit the current sort, returns an HTTP 400 error.

Query Parameters

integer
default:"100"
Page size, between 1 and 1000. Values outside that range are clamped. v1.1.12+
string
Opaque cursor from a previous page’s next_cursor (or its prev_cursor after paging backward): returns the rows past it in the requested order. Mutually exclusive with before; a cursor minted under a different sort is rejected with an HTTP 400 error. v1.1.12+
string
Opaque cursor from a previous page’s prev_cursor (or its next_cursor after paging backward): returns the rows before it in the requested order. Mutually exclusive with after. v1.1.12+
integer
default:"-1"
deprecated
Zero-based index of the shard to return. Use together with max_items_per_shard to page through results. Specify -1 to retrieve all files.
This parameter was removed in version v1.1.12 of the Archetype platform.
integer
default:"-1"
deprecated
Maximum number of metadata records per shard. Specify -1 for the maximum allowed number of records per shard. The maximum number of records per shard is 1000.
This parameter was removed in version v1.1.12 of the Archetype platform.
string
Filter results to a comma-delineated list of up to 50 MIME file types (e.g. image/png, text/csv,application/json). Omit to return files of all types. v1.1.2+
Perform a case-insensitive substring match against the names of files, and return only those files that match. If this string is empty or not specified, no search is performed. v1.1.3+
string
Specifies the field on which the returned list is ordered. Ties are broken using the file_uid property to ensure that returned pages are the same if no file changes have occurred. v1.1.11+Must be one of the following:
When paging through files, do not change the value of sort.
string
Specifies whether sorting is performed in ascending order (asc) or descending order (desc). v1.1.11+When sorting by created_at or num_bytes, this defaults to desc. When sorting by file_status or file_id, this defaults to asc.
When paging through files, do not change the value of order.

Response

Returns one page of file metadata records, along with the cursors to move off it. When the page is past the end of the file list, data is empty and has_more is false.
array
required
The files on this page, in the requested sort and order whether the page was reached with after or before. Render them as returned. Each record has the same shape as the response from Get File Metadata.
boolean
required
Whether more files exist in the direction this page was fetched.
string
Cursor continuing in the direction of travel: pass it as after on a forward page, or as before when this request itself used before. null when has_more is false.
string
Cursor stepping back the way this page was reached: pass it as before after a forward page, or as after after a backward one. null when the request carried no cursor (the first page).
An HTTP 400 error is returned for an invalid sort or order, when both after and before are given, for a malformed cursor or one minted under another sort, or when file_type lists more than 50 MIME types.