Sources
Rename a source
Renaming a source needs permission to create sources; PERMISSION_DENIED otherwise.
- ALREADY_EXISTS when another source has the new name.
- ABORTED when
etagis set and the source changed since it was read.
Scope: source:write
Authorization
bearerAuth An API key, or an access token minted from one. Pass it in the Authorization header: Bearer admp_...
In: header
Path Parameters
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" }}Discover versions of an artifact in a source GET
It takes the source's `resource_name`, not a `parent`, because a version at a source is not a resource of its own. Only the versions `allows` permits are listed: an entry with a version range hides the artifact's versions outside it. FAILED_PRECONDITION when the artifact is outside `allows` or the grant no longer reaches the source. Scope: `source:read`
Update a source PATCH
Updating a source needs permission to create sources, and permission to grant sources when the source holds a grant or the update sets one. PERMISSION_DENIED otherwise, naming the permission. A new grant is checked as CreateSource checks it. Tightening `allows` never touches a running environment, which runs its own stored copy; it bounds new imports and new pushes only. - INVALID_ARGUMENT when the mask names a field that can't be updated. - ABORTED when `etag` is set and the source changed since it was read. Scope: `source:write`