List files
const url = 'https://firma.company-gpt.com/companygpt/rag/api/files?status=pending';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://firma.company-gpt.com/companygpt/rag/api/files?status=pending' \ --header 'Authorization: Bearer <token>'Get paginated list of files accessible to the authenticated user. Results are filtered based on the user’s collection permissions.
Authorizations
Abschnitt betitelt „Authorizations“Parameters
Abschnitt betitelt „Parameters“Query Parameters
Abschnitt betitelt „Query Parameters“Page number (1-indexed, default 1)
Items per page (default 20, max 100)
Comma-separated list of collection UUIDs to filter by (intersected with the caller’s accessible collections)
Filter by file status
Case-insensitive substring match on file name
Responses
Abschnitt betitelt „Responses“Successful response
Paginated list of files (handlers.FileListResponse)
object
File metadata (mirrors handlers.FileInfo)
object
Unique file identifier
Original file name
Path in blob storage
File size in bytes
MIME type
File processing status
Associated collection ID
Associated collection name
ISO 8601 creation timestamp
ISO 8601 last update timestamp
ISO 8601 last indexing timestamp
Source-specific metadata (ACL fields, SharePoint item info, etc.); omitted/empty for files with no metadata
object
Example
{ "files": [ { "status": "pending" } ]}Unauthorized
object
Error message
Examplegenerated
{ "error": "example"}Server error
object
Error message
Examplegenerated
{ "error": "example"}