Skip to main content
POST
获取知识文件

限制说明

使用说明

  • 文件内容通过 content_b64(Base64)返回;知识包文件保证为 UTF-8 文本。
  • 不传 pack_id 时默认账户范围知识包;读取团队范围知识包需要是该团队成员。
  • 文件不存在时返回 ResourceNotFound(HTTP 400)。

授权

app_key
string
query
必填

App key issued from the Flashduty console. Required on every public API call. Keep it secret — it grants the same access as the owning account.

请求体

application/json

要获取的文件。

rel_path
string
必填

文件相对于知识包根目录的路径。

pack_id
string

知识包 ID;默认为调用者的账户范围知识包。

响应

Success

Standard response envelope used by every Flashduty public API. On success data contains the endpoint-specific payload and error is absent. On failure error is present and data is absent. request_id is always present and is also mirrored in the Flashcat-Request-Id response header.

request_id
string
必填

Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.

示例:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

error
object

Error payload inside the response envelope. Present only on non-2xx responses.

data
object

文件元数据及其 Base64 编码的内容。