删除对象
POSThttps://your-envId.api.tcloudbasegateway.com/delete-objects
批量删除对象。
Request
- application/json
Body
arrayrequired
下载对象请求参数,数组格式
- Array [
- ]
cloudObjectId 云端对象ID (string)
Responses
- 200
- default
调用成功时返回
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- v1DeleteObjectsResponseItemSuccess
- v1DeleteObjectsResponseItemError
- ]
oneOf
cloudObjectId 云端对象ID (string)
code 对该对象的请求出错时返回的错误码 (string)
message 对该对象的请求出错时返回的错误描述 (string)
cloudObjectId 本次请求操作的云端对象ID (string)
[
{
"cloudObjectId": "cloud://your-envId.bucket/not-exist",
"code": "OBJECT_NOT_EXIST",
"message": "Storage object not exists."
},
{
"cloudObjectId": "cloud://your-envId.bucket/file.jpg"
}
]
Response Headers
- application/json
- Schema
- Example (from schema)
- InvalidHost
Schema
code 错误码 (string)
message 错误信息 (string)
requestId 请求 ID (string)
{
"code": "string",
"message": "string",
"requestId": "string"
}
请求地址异常
{
"code": "INVALID_HOST",
"message": "xxx",
"requestId": "xxx"
}
Authorization: http
name: JWTAuthtype: httpscheme: bearerdescription: 环境 ID 所对应的 token,使用登录鉴权(v2)获取
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://your-envId.api.tcloudbasegateway.com/delete-objects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '[
{
"cloudObjectId": "cloud://your-envId.bucket/not-exist"
},
{
"cloudObjectId": "cloud://your-envId.bucket/file.jpg"
}
]'
ResponseClear