Skip to main content
POST
发布文件为产物

限制说明

使用说明

  • 允许的文件类型:HTML/Markdown、图片、PDF、文本/数据/代码文件以及 zip/tar 压缩包(按扩展名判断)。超过 16 MiB 的文件会被拒绝。
  • 发布按(来源会话 + 工作区路径)做 upsert —— 重复发布同一文件会替换产物内容并使用新的 file_id,已有的公开快照会因此过期,需执行分享同步刷新。
  • 产物继承来源会话的个人/团队空间;如需调整,发布后调用 /safari/artifact/gallery/update 转移。
  • 每次调用都会记录到账户审计日志。

授权

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

把会话中生成的文件发布到产物库。

file_id
string
必填

会话中生成的文件 ID(pf_ 前缀),即会话文件卡片上的文件标识。

title
string
必填

产物在产物库中的展示标题。会去除首尾空白,不能为空。

响应

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
必填

本次请求的唯一 ID,与 Flashcat-Request-Id 响应头一致。反馈问题时请携带该 ID。

示例:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

error
object

响应结构中的错误 payload,仅在非 2xx 响应时出现。

data
object

发布产物的结果。