GET /v2/knowledge-bases/{knowledge_base_id}/resources/{resource_id}/download
Get a signed URL to download the original file.
How to use
Returns a signed URL for the original file. Download separately without forwarding the StackAI Authorization header. Treat the URL as temporary sensitive access, not a permanent public link.
Authentication and permissions
Required permissions: kbs.read. Resource and owner access checks also apply.
Authorizations
AuthorizationstringRequired
Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header.
Path parameters
knowledge_base_idstring · uuidRequired
resource_idstring · uuidRequired
Responses
200
Successful Response
application/json
response_codestring · nullableOptional
Machine-readable response code, when provided.
422
Validation Error
application/json
get/v2/knowledge-bases/{knowledge_base_id}/resources/{resource_id}/download
curlcurl --fail-with-body -sS \
"$STACKAI_BASE_URL/v2/knowledge-bases/${KNOWLEDGE_BASE_ID}/resources/${RESOURCE_ID}/download" \
-H "Authorization: Bearer $STACKAI_API_KEY"{
"response_code": "text",
"meta": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"data": {
"download_url": "text",
"filename": "text"
}
}PreviousDELETE /v2/knowledge-bases/{knowledge_base_id}/resources/{resource_id}
NextPOST /v2/knowledge-bases/{knowledge_base_id}/query
Last updated
Was this helpful?

