Components
Set a component's origin
Scope: component: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 component_id path parameter.
^cmp-[0-9a-z]+$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
SetComponentOriginRequest names the component and where its new versions come from.
Response Body
application/json
curl -X POST "https://example.com/v1/components/string/set-origin" \ -H "Content-Type: application/json" \ -d '{ "origin": {} }'{ "component": { "id": "string", "name": "string", "description": "string", "labels": { "property1": "string", "property2": "string" }, "origin": { "published": {} }, "tags": [ { "name": "string", "digest": "string", "immutable": true, "created_at": "2023-01-15T01:30:15.01Z", "updated_at": "2023-01-15T01:30:15.01Z" } ], "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", "status": "STATUS_UNSPECIFIED", "status_reason": "string", "status_changed_at": "2023-01-15T01:30:15.01Z", "successor_component_id": "string" }}Publish a component version POST
The bundle is a gzipped tar of the component root, carried inline and capped at 64 MiB. Admiral normalizes the bytes (strips `.git`, canonicalizes entry order and timestamps), digests them, scans them, stores them and answers with the version. If the digest already exists under the name, the existing version is returned with `unchanged` set and nothing is written, which is what makes a publish-everything CI recipe safe. Any tags named in the request are set on the resulting version. Repointing a semver tag is refused with FAILED_PRECONDITION and the whole publish fails; the bytes are not kept. A publish that creates a component gives it the origin published by hand, and needs permission to create components, which organization admins hold by default and which may be granted to every member; PERMISSION_DENIED otherwise. A publish to an existing component needs publish rights on it. On a component whose origin is a source, the publish is refused with FAILED_PRECONDITION naming the source: its versions arrive through that source until its origin is moved with SetComponentOrigin. A hand publish is checked the same way as an import. Scope: `component:publish`
Set a component's status POST
Scope: `component:write`