Get uploaded file content
Interface Description
Read the complete Markdown content currently stored for one uploaded file.
Endpoint
| Field | Value |
|---|---|
| Method | GET |
| Path | /openapi/v2/knowledge-bases/{knowledgeBaseId}/source-files/{sourceFileId}/content |
| Operation ID | getSourceFileContent |
| Authentication | Bearer OpenAPI key |
Parameters
| Name | Location | Required | Type | Example | Description |
|---|---|---|---|---|---|
knowledgeBaseId | path | Yes | string | knowledge-base-11111111-1111-4111-8111-111111111111 | Knowledge-base identifier returned by knowledge-base APIs. |
sourceFileId | path | Yes | string | source-file-11111111-1111-4111-8111-111111111111 | Uploaded-file identifier returned by upload or uploaded-file list APIs. |
Request Body
This operation has no request body.
Request Example
bash
curl -X GET "https://openapi.example.com/openapi/v2/knowledge-bases/knowledge-base-11111111-1111-4111-8111-111111111111/source-files/source-file-11111111-1111-4111-8111-111111111111/content" \
-H "Authorization: Bearer <openapi-key>"Successful Responses
200
Complete current Markdown content of the uploaded file.
Schema type: string
Response Headers
| Name | Type | Description |
|---|---|---|
ETag | string | Current version number of the uploaded file. |
X-Content-Revision | integer | Current version number of the Markdown content. |
Success Response Example
---
type: guide
title: Guide
---
# GuideError Codes
The table below lists every error response documented for this operation.
| HTTP Status | Error Code | Explanation |
|---|---|---|
| 401 | UNAUTHORIZED | The Bearer API key is missing, malformed, unknown, revoked, or deleted. |
| 404 | NOT_FOUND | The requested resource was not found. |
| 429 | RATE_LIMITED | The request exceeded the configured rate limits. |
| 500 | INTERNAL_ERROR | The API encountered an internal error. |
| 503 | DATABASE_REPOSITORY_UNAVAILABLE | The data required by this operation is temporarily unavailable. |