Skip to main content
POST
删除知识文件

限制说明

使用说明

  • 删除是幂等的——删除不存在的文件也会成功。
  • 当其他包内文件仍引用目标文件时,删除失败并返回 ReferenceExist(附带引用方列表);设置 force 可强制删除(引用方以警告形式返回)。
  • 不传 pack_id 时默认账户范围知识包;编辑账户包需要账户 Owner/Admin 权限,编辑团队包需要是该团队成员。
  • 每次调用都会记录到账户审计日志。

授权

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;默认为调用者的账户范围知识包。

force
boolean

即使其他包内文件仍引用该文件也强制删除;此时引用方会以警告形式返回,而不再阻止删除。

响应

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

删除结果;无警告时为空对象。