v4

latestOpenAPI 3.1.02026-08-0143190206.8 KB
v1

List files owned by the authenticated team, paginated. The response always returns a `pagination_token`; pass it back as a query parameter to fetch the next page. The end of the list is reached when the returned `data` array is shorter than `limit`.

get/v1/files

Query parameters

limitinteger

The maximum number of objects to be returned in a single response.

orderstring

The ordering to sort the returned files. Use asc for ascending and desc for descending order.

sort_bystring

The field to sort by. Valid options: created_at, filename, size. Defaults to created_at.

pagination_tokenstring

The pagination token returned by the previous list files request.

afterstring

Only included for compatibility. Use pagination_token instead.

filterstring

AIP-160 filter expression to narrow down results.

Filterable fields:

FieldTypeDescription
name (or file_name)stringFuzzy match on filename
file_idstringExact match on file ID
size_bytesintegerFile size in bytes
content_typestringPartial match on MIME type (e.g. "pdf" matches "application/pdf")
created_attimestampRFC 3339 timestamp (e.g. "2024-01-01T00:00:00Z")
expires_attimestampRFC 3339 timestamp
upload_statusstringUpload status ("Complete")
user_defined_idstringExact match on user-defined ID

Operators: =, !=, >, >=, <, <=

Logical: AND, OR, NOT

Examples:

  • name:"quarterly report" — fuzzy match on filename
  • content_type = "pdf" — files with PDF content type
  • size_bytes > 1000000 AND created_at > "2024-01-01T00:00:00Z" — files larger than 1 MB created after Jan 1, 2024
  • file_id = "file_abc123" — exact file ID match

Response

Success

pagination_tokenstring nullable

Pagination token to use with next request.