删除文件
删除文件记录与资产引用。
DELETE
认证
在请求头中加入 Authorization: Bearer <API_KEY> 完成鉴权,密钥可在控制台「API 密钥」页生成。
curl https://api.mosi.cn/v1/files \
-H "Authorization: Bearer $MOSS_API_KEY"
请求参数
| 路径参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| file_id | string | 是 |
|
请求示例
curl -X DELETE "https://api.mosi.cn/v1/files/<file_id>" \
-H "Authorization: Bearer $MOSS_API_KEY"
响应字段
| 字段 | 类型 | 必返 | 说明 |
|---|---|---|---|
| id | string | 是 | 被删除文件的 id。 |
| object | string | 是 | 固定为 |
| deleted | boolean | 是 | 固定为 |
响应示例
{
"id": "<file_id>",
"object": "file",
"deleted": true
}