Admiral

Credentials

Rename a credential

POST
/v1/credentials/{credential}/rename
  • PERMISSION_DENIED without permission to manage credentials, which organization admins hold by default.
    • ALREADY_EXISTS when another credential has the new name.
    • ABORTED when etag is set and the credential changed since it was read.

Scope: credential:write

Authorization

bearerAuth
AuthorizationBearer <token>

An API key, or an access token minted from one. Pass it in the Authorization header: Bearer admp_...

In: header

Path Parameters

credential*string

The credential id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

RenameCredentialRequest gives a credential a new name.

Response Body

application/json

curl -X POST "https://example.com/v1/credentials/string/rename" \  -H "Content-Type: application/json" \  -d '{    "new_name": "string"  }'
{  "credential": {    "id": "string",    "name": "string",    "display_name": "string",    "resource_name": "string",    "description": "string",    "labels": {      "property1": "string",      "property2": "string"    },    "type": "TYPE_UNSPECIFIED",    "auth_config": {      "basic_auth": {        "username": "string",        "password": "string"      }    },    "allowed_hosts": [      "string"    ],    "last_used_at": "2023-01-15T01:30:15.01Z",    "etag": "string",    "created_by": {      "id": "string",      "display_name": "string",      "email": "string"    },    "created_at": "2023-01-15T01:30:15.01Z",    "updated_at": "2023-01-15T01:30:15.01Z"  }}