刪除一個 File。
DELETE /api/v1/cloud/files/{file_id}
刪除 File 並返回刪除確認。
路徑參數
參數 | 類型 | 說明 |
| string | File ID,首碼為 |
要求標頭
頭部 | 必選 | 說明 |
| 是 |
|
樣本請求
curl -X DELETE https://api.qoder.com.cn/api/v1/cloud/files/file_019e3bb8c1387743bf4ef115aae5acb1 \
-H "Authorization: Bearer $QODER_PAT"
樣本響應
HTTP 200 OK
{
"id": "file_019e3bb8c1387743bf4ef115aae5acb1",
"type": "file_deleted"
}
刪除成功通過響應體中的 "type": "file_deleted" 標識。
錯誤碼
HTTP | type | 觸發條件 |
401 |
| 缺少或無效的認證令牌 |
404 |
| 檔案不存在 |
409 |
| 檔案仍被活躍資源引用 |
完整錯誤信封說明詳見 錯誤參考。