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

GET /v2/knowledge-bases/{knowledge_base_id}/resources/{resource_id}/download

Get Resource Download Url

get

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.

get/v2/knowledge-bases/{knowledge_base_id}/resources/{resource_id}/download
curl
curl --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"
  }
}

Last updated

Was this helpful?