Admiral

Components

Set a component's status

POST
/v1/components/{component_id}/set-status

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

component_id*component_id

The component_id path parameter.

Match^cmp-[0-9a-z]+$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

SetComponentStatusRequest names a component, its new status, and why. set_component_status.reason // a deprecated component needs a reason set_component_status.successor // only a deprecated component names a successor

Response Body

application/json

curl -X POST "https://example.com/v1/components/string/set-status" \  -H "Content-Type: application/json" \  -d '{    "status": "STATUS_UNSPECIFIED"  }'
{  "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"  }}