Skip to main content

Delete Credential

Permanently deletes a specified Credential. This operation cannot be undone.

Prerequisites

Endpoint and authentication configured. For details, see Overview and authentication.

Endpoint

DELETE /vaults/{vault_id}/credentials/{credential_id}

Path parameters

vault_id string (必选)Vault ID, format vlt_xxxcredential_id string (必选)Credential ID, format cred_xxx

Request example

curl -X DELETE "$AGENTSTUDIO_URL/vaults/vlt_xxx/credentials/cred_xxx" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response fields

id stringID of the deleted Credentialtype stringAlways credential_deletedrequest_id stringUnique request identifier

Response

{
  "id": "cred_xxx",
  "type": "credential_deleted",
  "request_id": "req_xxx"
}

Error codes

HTTP statusError codeDescription
400InvalidParameterRequired parameter missing or invalid
401InvalidApiKeyInvalid API key provided