cURL
鉴权
string
header
必填
DashScope API Key
归档指定密钥库中的密钥
curl --request POST \
--url 'https://dashscope.aliyuncs.com/api/v1/agentstudio/vaults/{vault_id}/credentials/{credential_id}/archive' \
--header 'Authorization: Bearer <YOUR_API_KEY>'{
"id": "cred_xxx",
"type": "credential",
"vault_id": "vlt_xxx",
"display_name": "第三方 API 密钥",
"auth": {
"type": "environment_variable",
"secret_name": "API_KEY",
"networking": {
"allowed_hosts": [
"api.example.com",
"*.example.com"
]
},
"injection_location": {
"header": true
}
},
"metadata": {},
"archived_at": "2026-07-15T06:00:00Z",
"created_at": "2026-07-10T08:00:00Z",
"updated_at": "2026-07-15T06:00:00Z",
"request_id": "req_xxx"
}DashScope API Key
Credential ID,格式 cred_xxx
固定为 credential
所属 Vault ID
Credential 可读名称
业务自定义键值对
归档时间,未归档时为 null
创建时间,ISO 8601
最近更新时间,ISO 8601
请求唯一标识
curl --request POST \
--url 'https://dashscope.aliyuncs.com/api/v1/agentstudio/vaults/{vault_id}/credentials/{credential_id}/archive' \
--header 'Authorization: Bearer <YOUR_API_KEY>'{
"id": "cred_xxx",
"type": "credential",
"vault_id": "vlt_xxx",
"display_name": "第三方 API 密钥",
"auth": {
"type": "environment_variable",
"secret_name": "API_KEY",
"networking": {
"allowed_hosts": [
"api.example.com",
"*.example.com"
]
},
"injection_location": {
"header": true
}
},
"metadata": {},
"archived_at": "2026-07-15T06:00:00Z",
"created_at": "2026-07-10T08:00:00Z",
"updated_at": "2026-07-15T06:00:00Z",
"request_id": "req_xxx"
}