Admiral

Components

Publish a component version

POST
/v1/components/publish

The bundle is a gzipped tar of the component root, carried inline and capped at 64 MiB; a fully vendored tree that exceeds it will get a resumable upload path of its own. The server normalizes the bytes (strips .git, canonicalizes entry order and timestamps), digests them, runs the publish gate, stores the blob 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.

Scope: component:publish

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

PublishComponentRequest carries what is being published and the bytes. publish_component.name_not_an_id // a component name cannot start with cmp-, which marks an id publish_component.tags.tag_not_an_id // a tag cannot start with ver-, which marks a version id

Response Body

application/json

curl -X POST "https://example.com/v1/components/publish" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "bundle": "string"  }'
{  "component": {    "id": "string",    "name": "string",    "description": "string",    "labels": {      "property1": "string",      "property2": "string"    },    "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"  },  "version": {    "id": "string",    "component_id": "string",    "digest": "string",    "kind": "COMPONENT_KIND_UNSPECIFIED",    "size_bytes": "string",    "contract": {      "inputs": [        {          "name": "string",          "type": "string",          "description": "string",          "required": true,          "default": null,          "sensitive": true,          "ephemeral": true,          "nullable": true,          "deprecated": "string",          "validations": [            {              "condition": "string",              "error_message": "string"            }          ],          "schema": {            "property1": null,            "property2": null          }        }      ],      "outputs": [        {          "name": "string",          "description": "string",          "sensitive": true        }      ]    },    "provenance": {      "kind": "KIND_UNSPECIFIED",      "uri": "string",      "ref": "string",      "commit": "string",      "path": "string",      "dependencies": [        {          "source": "string",          "constraint": "string",          "resolved": "string"        }      ],      "credentials": [        {          "id": "string",          "name": "string",          "hosts": [            "string"          ]        }      ],      "commit_message": "string",      "commit_author": "string"    },    "findings": [      {        "severity": "FINDING_SEVERITY_UNSPECIFIED",        "source": "string",        "code": "string",        "message": "string",        "path": "string"      }    ],    "status": "STATUS_UNSPECIFIED",    "status_changed_at": "2023-01-15T01:30:15.01Z",    "status_reason": "string",    "tags": [      "string"    ],    "created_by": {      "id": "string",      "display_name": "string",      "email": "string"    },    "created_at": "2023-01-15T01:30:15.01Z",    "providers": [      "string"    ],    "baseline_values_json": "string",    "required_version": "string"  },  "unchanged": true}