Admiral

Projects

Start a run

POST
/v1/projects/{project}/environments/{environment}/runs
  • NOT_FOUND when the environment or the revision does not exist.
    • INVALID_ARGUMENT when the revision belongs to another environment.
    • FAILED_PRECONDITION when the revision is not its change set's head, or the change set is not open.

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

project*string

The project id.

environment*string

The environment id.

Query Parameters

request_id?request_id

(OPTIONAL) A UUID the client generates once per create and sends again on every retry. A repeat within 24 hours returns the first result and creates nothing. The same id with a different request is refused with INVALID_ARGUMENT. Without one, every call creates. request_id.not_zero // request_id may not be the zero UUID

Formatuuid

Request Body

application/json

The run to start: its revision_id.

TypeScript Definitions

Use the request body type in TypeScript.

Run is one plan of an environment, and the apply of that plan when it is approved and applied.

The run to start: its revision_id.

Response Body

application/json

curl -X POST "https://example.com/v1/projects/string/environments/string/runs" \  -H "Content-Type: application/json" \  -d '{}'
{  "run": {    "id": "string",    "resource_name": "string",    "environment_id": "string",    "change_set_id": "string",    "status": "STATUS_UNSPECIFIED",    "wait_reason": "WAIT_REASON_UNSPECIFIED",    "plan": {      "jobs": [        {          "job_id": "string",          "components": [            "string"          ],          "agent_id": "string",          "assignment_id": "string",          "status": "JOB_STATUS_UNSPECIFIED",          "wait_reason": "WAIT_REASON_UNSPECIFIED"        }      ],      "plan_digest": "string",      "components": [        {          "component": "string",          "changes": [            {              "resource": {                "kubernetes": {                  "api_version": "string",                  "kind": "string",                  "namespace": "string",                  "name": "string"                }              },              "action": "ACTION_UNSPECIFIED",              "diff_digest": "string"            }          ],          "plan_file_digest": "string",          "deferred": {            "pending_inputs": [              {                "path": {                  "segments": [                    {                      "key": "string"                    }                  ],                  "display": "string"                },                "component": "string",                "output": "string"              }            ]          }        }      ],      "status_reason": "string",      "started_at": "2023-01-15T01:30:15.01Z",      "finished_at": "2023-01-15T01:30:15.01Z"    },    "apply": {      "jobs": [        {          "job_id": "string",          "components": [            "string"          ],          "agent_id": "string",          "assignment_id": "string",          "status": "JOB_STATUS_UNSPECIFIED",          "wait_reason": "WAIT_REASON_UNSPECIFIED"        }      ],      "components": [        {          "component": "string",          "status": "STATUS_UNSPECIFIED",          "status_reason": "string"        }      ],      "planned_components": [        {          "component": "string",          "changes": [            {              "resource": {                "kubernetes": {                  "api_version": "string",                  "kind": "string",                  "namespace": "string",                  "name": "string"                }              },              "action": "ACTION_UNSPECIFIED",              "diff_digest": "string"            }          ],          "plan_file_digest": "string",          "deferred": {            "pending_inputs": [              {                "path": {                  "segments": [                    {                      "key": "string"                    }                  ],                  "display": "string"                },                "component": "string",                "output": "string"              }            ]          }        }      ],      "generation": "string",      "status_reason": "string",      "started_at": "2023-01-15T01:30:15.01Z",      "finished_at": "2023-01-15T01:30:15.01Z",      "applied_by": {        "id": "string",        "display_name": "string",        "email": "string"      },      "accepted_by": {        "id": "string",        "display_name": "string",        "email": "string"      },      "accepted_reason": "string",      "accepted_at": "2023-01-15T01:30:15.01Z"    },    "required_approval": {      "required_approvals": 0,      "groups": [        {          "group_id": "string",          "approvals": 1        }      ]    },    "approvals": [      {        "plan_digest": "string",        "reason": "string",        "approved_by": {          "id": "string",          "display_name": "string",          "email": "string"        },        "approved_at": "2023-01-15T01:30:15.01Z"      }    ],    "finished_at": "2023-01-15T01:30:15.01Z",    "created_by": {      "id": "string",      "display_name": "string",      "email": "string"    },    "created_at": "2023-01-15T01:30:15.01Z",    "revision_id": "string"  }}