POST
/
api
/
v1
/
open
/
objects
/
presign
创建对象预签名 URL
curl --request POST \
  --url https://api.example.com/api/v1/open/objects/presign \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Id: <x-api-id>' \
  --header 'X-Api-Nonce: <x-api-nonce>' \
  --header 'X-Api-Signature: <api-key>' \
  --header 'X-Api-Timestamp: <x-api-timestamp>' \
  --data '
{
  "bucket": "tenant-media",
  "object_key": "tenant_001/uploads/photo.jpg",
  "method": "PUT",
  "expires_seconds": 900,
  "content_type": "image/jpeg"
}
'
{
  "method": "PUT",
  "url": "https://objects.example.com/tenant-media/tenant_001/uploads/photo.jpg?signature=...",
  "headers": {
    "Content-Type": "image/jpeg"
  },
  "expires_at": "2026-04-22T12:15:00Z",
  "request_id": "req-001"
}

授权

X-Api-Signature
string
header
必填

HMAC signature; X-Api-Id, X-Api-Timestamp, and X-Api-Nonce are also required.

请求头

X-Api-Id
string
必填

API credential ID.

X-Api-Timestamp
string
必填

Unix timestamp in seconds.

X-Api-Nonce
string
必填

Replay-protection nonce.

X-Api-Signature
string
必填

HMAC request signature.

X-Request-Id
string

Optional correlation ID.

请求体

application/json
bucket
string
必填
示例:

"tenant-media"

object_key
string
必填
示例:

"tenant_001/uploads/photo.jpg"

method
enum<string>
必填
可用选项:
GET,
PUT
示例:

"PUT"

expires_seconds
integer
必填
必填范围: 1 <= x <= 3600
示例:

900

content_type
string
示例:

"image/jpeg"

响应

Presigned URL.

method
enum<string>
必填
可用选项:
GET,
PUT
url
string<uri>
必填
headers
object
必填
expires_at
string<date-time>
必填
request_id
string
必填