Reindex a file
const url = 'https://firma.company-gpt.com/companygpt/rag/api/files/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reindex';const options = {method: 'POST', 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 POST \ --url https://firma.company-gpt.com/companygpt/rag/api/files/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reindex \ --header 'Authorization: Bearer <token>'Queue a file for reprocessing. Requires write access to the file’s collection. For manually uploaded files (whose blob is deleted after indexing), the file must be re-uploaded instead — this returns 400 in that case.
Authorizations
Abschnitt betitelt „Authorizations“Parameters
Abschnitt betitelt „Parameters“Path Parameters
Abschnitt betitelt „Path Parameters“File UUID
Responses
Abschnitt betitelt „Responses“Reindex job queued
Response for POST /files/{fileId}/reindex
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
{ "status": "queued", "file": { "status": "pending" }}File has no stored blob and must be re-uploaded to reindex
object
Error message
Examplegenerated
{ "error": "example"}Unauthorized
object
Error message
Examplegenerated
{ "error": "example"}Access denied (write permission required)
object
Error message
Examplegenerated
{ "error": "example"}File not found
object
Error message
Examplegenerated
{ "error": "example"}