For the complete documentation index, see llms.txt. This page is also available as Markdown.

List Files

Retrieves a paginated list of files from the storage system, optionally filtered by customer ID.

This endpoint allows you to browse uploaded documents and files with comprehensive metadata and pagination support.

Endpoint

GET/v2/storage/file

Link

Request

Headers

Key

Value

Required

Authorization

123

Yes

Accept

application/json

Yes

Query Parameters

Parameter

Type

Description

Required

Example

customerId

string

Customer ID to filter files by.

No

"cust_12345"

meta.page

integer

Page number (starts from 0).

No

0

meta.pageSize

integer

Items count per page.

No

50


Response (200 OK)

Returns a paginated list of file metadata with pagination information.

Response Fields

Items Array

Array of file objects with the following structure:

Field

Type

Description

Example

partnerId

string

Partner ID associated with the file.

"partner_abc"

customerId

string

Customer ID the file is linked to.

"cust_12345"

id

string

Unique file ID in the storage system.

"file_78901"

name

string

Original file name.

"passport_scan.pdf"

size

integer

File size in bytes.

2048576

mime

string

MIME type of the file.

"application/pdf"

isLock

boolean

Lock status (if file is locked from modifications).

false

createAt

string

Creation timestamp.

"2024-05-20T10:30:00Z"

deletedAt

string

Deletion timestamp (if applicable).

"2019-08-24T14:15:22Z"

Meta Object

Pagination metadata for the response:

Field

Type

Description

Example

pageSize

integer

Number of items per page.

50

page

integer

Current page number (0-based).

0

total

string

Total number of items across all pages.

"125"


Examples

Request (All Files with Pagination)

bash

Response

json

Request (Filtered by Customer ID)

bash

Response (Filtered)

json

Request (Default Pagination)

bash

Response (Default)

json


Error Responses

  1. Invalid Customer ID:

    json

  2. Invalid Page Parameters:

    json

  3. Unauthorized:

    json

  4. Rate Limit Exceeded:

    json


Notes

  • Pagination: Default page size is typically 50 items if not specified

  • Filtering: Use customerId to retrieve files for a specific customer only

  • Sorting: Results are typically sorted by createAt descending (newest first)

  • Soft Deletion: Files marked with deletedAt are typically excluded from results

  • Performance: Large result sets should use pagination to optimize performance

  • Lock Status: isLock=true indicates files that cannot be modified or deleted

Common Use Cases:

  • Browsing customer document archives

  • Audit and compliance reviews

  • File management interfaces

  • Document verification workflows

  • Bulk operations on multiple files

Pagination Strategy:

  • Start with page=0 for the first page

  • Use total from meta to calculate total pages: totalPages = ceil(total / pageSize)

  • Handle empty result sets gracefully when page exceeds available data

Last updated