Fetch the content of a source ingested.
This endpoint can return:
return_content is true: Returns the actual file content directlyreturn_content is false: Generates time-limited download URLs for the requested fileBearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request to fetch source file content.
Unique identifier for the tenant/organization
"tenant_1234"
Source ID of the file to fetch
"CortexDoc1234"
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
"sub_tenant_4567"
Fetch mode: 'content' returns file content, 'url' returns presigned URL, 'both' returns both
content, url, both Expiry time in seconds for presigned URL (60-604800, default: 3600)
60 <= x <= 6048001
Successful Response
Response for file fetch request.
Source ID of the fetched file
"CortexDoc1234"
Whether the fetch was successful
true
File content as string (if mode includes 'content')
File content as base64 encoded string (for binary files, if mode includes 'content')
Presigned URL to access the file (if mode includes 'url')
Content type of the file
Size of the file in bytes
Response message
Error message if fetch failed