Join a webinar on April 30th: Unlocking Your Data using AI with Box Extract & MCP Server. Register here
curl -i -X DELETE "https://api.box.com/2.0/files/12345" \
-H "authorization: Bearer <ACCESS_TOKEN>"{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}ファイルを削除します (完全に削除するか、ごみ箱に移動します)。
項目がBoxから完全に削除されるか、ごみ箱に移動されるかは、会社の設定により決定されます。
curl -i -X DELETE "https://api.box.com/2.0/files/12345" \
-H "authorization: Bearer <ACCESS_TOKEN>"{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}The access token received from the authorization server in the OAuth 2.0 flow.
変更を加える前にこの項目が最近変更されていないことを確認します。
その項目の最後に認識されたetag値をこのヘッダーに渡すと、それ以降に項目が変更されている場合、エンドポイントは412 Precondition Failedを返して失敗します。
ファイルを表す一意の識別子。
ファイルIDを確認するには、ウェブアプリケーションでファイルにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/files/123の場合、file_idは123です。
ファイルが正常に削除された場合は、空のレスポンスを返します。
このページは役に立ちましたか?