Skip to content

Get uploaded file content ​

Interface Description ​

Read the complete Markdown content currently stored for one uploaded file.

Endpoint ​

FieldValue
MethodGET
Path/openapi/v2/knowledge-bases/{knowledgeBaseId}/source-files/{sourceFileId}/content
Operation IDgetSourceFileContent
AuthenticationBearer OpenAPI key

Parameters ​

NameLocationRequiredTypeExampleDescription
knowledgeBaseIdpathYesstringknowledge-base-11111111-1111-4111-8111-111111111111Knowledge-base identifier returned by knowledge-base APIs.
sourceFileIdpathYesstringsource-file-11111111-1111-4111-8111-111111111111Uploaded-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 ​

NameTypeDescription
ETagstringCurrent version number of the uploaded file.
X-Content-RevisionintegerCurrent version number of the Markdown content.

Success Response Example ​

---
type: guide
title: Guide
---
# Guide

Error Codes ​

The table below lists every error response documented for this operation.

HTTP StatusError CodeExplanation
401UNAUTHORIZEDThe Bearer API key is missing, malformed, unknown, revoked, or deleted.
404NOT_FOUNDThe requested resource was not found.
429RATE_LIMITEDThe request exceeded the configured rate limits.
500INTERNAL_ERRORThe API encountered an internal error.
503DATABASE_REPOSITORY_UNAVAILABLEThe data required by this operation is temporarily unavailable.

Next Steps ​