# Download a RAG document file GET /v1/t/adapters/llm/rag/document/{id} Select code sample ``` const url = 'https://example.com/v1/t/adapters/llm/rag/document/example'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; 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://example.com/v1/t/adapters/llm/rag/document/example \ --header 'Authorization: Bearer ' ``` - /v1/t/adapters/llm/rag/document/{id} ## Permission This operation needs the permission [`tenant:scenario_template:manage`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#tenant-scenario_template-manage). ## Authorizations - **[bearerAuth](https://docs.aiva.apifonica.com/api/tenant/#bearerauth)** ## Parameters ### Path Parameters **id** required string RAG document id. ### Header Parameters **X-Tenant-Sid** string Names the target tenant. By principal: - A tenant-scoped principal may omit it. - A principal with no tenant of its own names one here. Refused when: - A tenant-scoped principal sends a value naming any other tenant. - A principal with no tenant of its own omits it. ## Responses ### 200 Document file stream Media typeapplication/octet-stream string format: binary ### 400 Invalid request body or parameters Media typeapplication/json Flat error shape emitted by the RAG document, public models and admin registry handlers. `details` is present only on validation failures that carry per-field diagnostics. object **error** required string **details** string ##### Examplegenerated ``` { "error": "example", "details": "example" } ``` ### 401 Unauthorized ### 403 Forbidden ### 404 Resource does not exist Media typeapplication/json Flat error shape emitted by the RAG document, public models and admin registry handlers. `details` is present only on validation failures that carry per-field diagnostics. object **error** required string **details** string ##### Examplegenerated ``` { "error": "example", "details": "example" } ``` ### 500 Internal server error Media typeapplication/json Flat error shape emitted by the RAG document, public models and admin registry handlers. `details` is present only on validation failures that carry per-field diagnostics. object **error** required string **details** string ##### Examplegenerated ``` { "error": "example", "details": "example" } ``` ### 502 Bad gateway (upstream adapter error)