Admiral

Sources

Rename a source

POST
/v1/sources/{source}/rename

Renaming a source needs permission to create sources; PERMISSION_DENIED otherwise.

  • ALREADY_EXISTS when another source has the new name.
  • ABORTED when etag is set and the source changed since it was read.

Scope: source: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

source*string

The source id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

RenameSourceRequest gives a source a new name.

Response Body

application/json

curl -X POST "https://example.com/v1/sources/string/rename" \  -H "Content-Type: application/json" \  -d '{    "new_name": "string"  }'
{  "source": {    "id": "string",    "name": "string",    "display_name": "string",    "resource_name": "string",    "description": "string",    "kind": "KIND_UNSPECIFIED",    "location": "string",    "trigger": "TRIGGER_UNSPECIFIED",    "allows": [      "string"    ],    "settings": {      "git": {        "branches": [          "string"        ],        "tags": [          "string"        ],        "tag_template": "string"      }    },    "status": "STATUS_UNSPECIFIED",    "status_reason": "string",    "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",    "connection_id": "string"  }}