Skip to main content

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

    limit string

    Default value: 50

    GET /files parameter

    page string

    The page to return. Default 1. Only for API client versions below 3.7.0, which page with cursor instead and reject page.

    cursor string

    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.

    order_by string

    Possible values: [desc, asc]

    The files are ordered by creation date, newest first by default.

    start_date date-time

    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.

    end_date date-time

    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.

    mime_type string

    Possible values: [application/pdf, image/png, image/jpg]

    Filters the file list for the specific mimetype.

    lookup_key string

    The lookup key of the files to return

Responses​

GET /files Successful response

Schema
    version stringrequired

    Possible values: [1.0]

    The version of the response schema

    result_type stringrequired

    Possible values: [paginated_list]

    A paginated list of the file resource.

    resource_type stringrequired

    Possible values: [file]

    Data contains the file resource.

    data object[]required

    The resource data

  • Array [
  • id cuidrequired

    The unique identifier of the file

    resource_type stringrequired

    Possible values: [file]

    filename stringrequired

    Possible values: non-empty

    The complete filename including the file extension

    mime_type stringrequired

    Possible values: non-empty

    The mime type of the file

    url url

    The signed read url of the file

    metadata object
    lookup_key stringrequired

    A provided lookup key provided by you to help you identify the file.

    created_at stringrequired

    UTC datetime ISO string

    updated_at stringrequired

    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.

    oneOf
    limit int64required

    Possible values: <= 9007199254740991

    The maximum number of items per page

    total_pages int64required

    Possible values: <= 9007199254740991

    The total number of pages

    page int64required

    Possible values: <= 9007199254740991

    The current page number

    total_results int64required

    Possible values: <= 9007199254740991

    The total number of results

Loading...