Delete File
Delete the file record and its asset reference.
DELETE
Authentication
Add Authorization: Bearer <API_KEY> to the request header to authenticate. You can generate a key on the "API Keys" page of the console.
curl https://api.mosi.cn/v1/files \
-H "Authorization: Bearer $MOSS_API_KEY"
Request parameters
| Path parameter | Type | Required | Description |
|---|---|---|---|
| file_id | string | Yes | The |
Request example
curl -X DELETE "https://api.mosi.cn/v1/files/<file_id>" \
-H "Authorization: Bearer $MOSS_API_KEY"
Response fields
| Field | Type | Always returned | Description |
|---|---|---|---|
| id | string | Yes | The id of the deleted file. |
| object | string | Yes | Fixed as |
| deleted | boolean | Yes | Fixed as |
Response example
{
"id": "<file_id>",
"object": "file",
"deleted": true
}