Get Object Upload Information
POST/v1/storages/get-objects-upload-info
Batch get the required information for uploading objects.
Request
- application/json
Body
arrayrequired
Upload object request parameters in array format
- Array [
- Array [
- ]
- ]
objectId Object ID, e.g., file name (string)required
signedHeader object
property name* string[]
string
Responses
- 200
- default
Returned on successful call
Response Headers
X-Request-Id string
Request ID
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- v1GetObjectsUploadInfoResponseItemSuccess
- v1GetObjectsUploadInfoResponseItemError
- ]
oneOf
uploadUrl uri
downloadUrl uri
downloadUrlEncoded uri
token Token required for upload, fill in the X-Cos-Security-Token request header (string)
authorization Authorization information required for upload, fill in the Authorization request header (string)
cloudObjectMeta Metadata information required for upload, fill in the X-Cos-Meta-Fileid request header (string)
cloudObjectId Cloud object ID after object upload (string)
objectId Object ID for this request (string)
code Error code returned when the request for this object fails (string)
message Error message returned when the request for this object fails (string)
[
{
"uploadUrl": "https://url/file.jpg%3FExpires%3D123",
"downloadUrl": "https://url/file.jpg?Expires=123",
"downloadUrlEncoded": "https://url/file.jpg%3FExpires%3D123",
"token": "token",
"authorization": "q-sign-algorithm=sha1&q-ak=",
"cloudObjectMeta": "metadata",
"cloudObjectId": "cloud://your-envId.bucket/file.jpg?Expires=123",
"objectId": "file.jpg"
},
{
"code": "COS_ACTION_FAILED",
"message": "Execute COS action failed."
}
]
Common error information, see https://docs.cloudbase.net/error-code/service for details
Response Headers
X-Request-Id string
Request ID
- application/json
- Schema
- Example (from schema)
- InvalidHost
Schema
code Error code (string)
message Error message (string)
requestId Request ID (string)
{
"code": "string",
"message": "string",
"requestId": "string"
}
Invalid request address
{
"code": "INVALID_HOST",
"message": "xxx",
"requestId": "xxx"
}
Loading...