跳转到主要内容
Credential

归档 Credential

归档指定密钥库中的密钥

POST
/api/v1/agentstudio/vaults/{vault_id}/credentials/{credential_id}/archive
cURL
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"
}

鉴权

string
header
必填

DashScope API Key

路径参数

string
必填

Vault ID,格式 vlt_xxx

string
必填

Credential ID,格式 cred_xxx

响应

200-application/json
string

Credential ID,格式 cred_xxx

string

固定为 credential

string

所属 Vault ID

string

Credential 可读名称

object

认证信息,敏感值已脱敏(如 secret_value 不返回)。

object

业务自定义键值对

string | null

归档时间,未归档时为 null

string

创建时间,ISO 8601

string

最近更新时间,ISO 8601

string

请求唯一标识