POST
/
api
/
v1
/
platform
/
tenants
/
{tenant_id}
/
credentials
创建开放平台凭据
curl --request POST \
  --url https://api.example.com/api/v1/platform/tenants/{tenant_id}/credentials \
  --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 '
{
  "client_id": "client_001",
  "name": "Tenant 001 command client",
  "status": "ACTIVE",
  "allowed_clock_skew_seconds": 300,
  "replay_window_seconds": 300,
  "rotate_secret": false,
  "expires_at": null
}
'
{
  "client_id": "client_001",
  "tenant_id": "tenant_001",
  "name": "Tenant 001 command client",
  "status": "ACTIVE",
  "allowed_clock_skew_seconds": 300,
  "replay_window_seconds": 300,
  "secret": "returned_once_on_create_or_rotate",
  "expires_at": null,
  "request_id": "req-001"
}

授权

X-Api-Signature
string
header
必填

UTMOS HMAC request signature with X-Api-Id, X-Api-Timestamp and X-Api-Nonce.

请求头

X-Api-Id
string
必填

平台管理员或租户管理员 credential

X-Api-Timestamp
string
必填

Unix seconds

X-Api-Nonce
string
必填

防重放 nonce

X-Api-Signature
string
必填

HMAC signature

X-Request-Id
string

调用方关联 ID;缺省由平台生成

路径参数

tenant_id
string
必填

Tenant identifier

请求体

application/json
client_id
string
必填
name
string
必填
status
enum<string>
可用选项:
ACTIVE,
DISABLED,
DELETED
allowed_clock_skew_seconds
integer
默认值:300
replay_window_seconds
integer
默认值:300
rotate_secret
boolean
expires_at
string<date-time> | null

响应

Created

client_id
string
tenant_id
string
name
string
status
enum<string>
可用选项:
ACTIVE,
DISABLED,
DELETED
allowed_clock_skew_seconds
integer
replay_window_seconds
integer
secret
string
expires_at
string<date-time> | null
request_id
string