Operations¶
Follow and cancel the work a change started.
Paths are relative to your API address. See Authentication and Operations. Changes that answer 202 Accepted return an operation to follow.
Request and response examples are generated from the schema; the tables under Schemas are the reference.
List operations¶
GET /
The operations the caller can see, newest first, a page at a time; project limits them to one project.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
cursor |
query | string | Yes | ||
limit |
query | integer | Yes | ||
org_id |
path | string | No | ||
project |
query | string | Yes |
Responses
{
"items": [
{
"accepted_at": "2022-04-13T15:42:05.901Z",
"actor": {
"email": "string",
"id": "string",
"kind": "person",
"name": "string",
"you": true
},
"completed_at": "2022-04-13T15:42:05.901Z",
"error": {
"code": "string"
},
"failed_step": {
"action": "string",
"error": null
},
"id": "string",
"kind": "string",
"resource": {
"display_name": "string",
"id": "string",
"location": "string",
"provider_id": "string",
"type": "string"
},
"state": "string",
"steps": {
"succeeded": 0,
"total": 0
},
"target": {
"id": "string",
"project_id": "string",
"type": "string"
}
}
],
"next_cursor": "string"
}
Get an operation¶
GET /
One operation's state and steps. Read it until state is succeeded, partially_succeeded, failed or cancelled.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
operation_id |
path | string | No | ||
org_id |
path | string | No |
Responses
{
"accepted_at": "2022-04-13T15:42:05.901Z",
"actor": {
"email": "string",
"id": "string",
"kind": "person",
"name": "string",
"you": true
},
"completed_at": "2022-04-13T15:42:05.901Z",
"error": {
"code": "string"
},
"id": "string",
"kind": "string",
"project_id": "string",
"resource": {
"display_name": "string",
"id": "string",
"location": "string",
"provider_id": "string",
"type": "string"
},
"revocation": {
"locations": [
{
"effective_by": "2022-04-13T15:42:05.901Z",
"location": "string",
"status": "string"
}
],
"state": "string"
},
"started_at": "2022-04-13T15:42:05.901Z",
"state": "string",
"steps": [
{
"action": "string",
"attempts": 0,
"completed_at": "2022-04-13T15:42:05.901Z",
"component": "string",
"error": null,
"id": "string",
"locations": [
"string"
],
"ordinal": 0,
"region": "string",
"result": {},
"service": "string",
"started_at": "2022-04-13T15:42:05.901Z",
"state": "string",
"type": "string"
}
],
"waiting_for": {
"id": "string",
"kind": "string"
}
}
Cancel an operation¶
POST /
Stops an operation that has not finished. Steps already done stay done; nothing is rolled back.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
operation_id |
path | string | No | ||
org_id |
path | string | No |
Responses
Schemas¶
ActorRef¶
| Name | Type | Description |
|---|---|---|
email |
string | A member's address, only to a caller who manages members. |
id |
string | null | The person (usr_…); null for NubeStack Cloud itself. |
kind |
string | A member of this organization, one of its service accounts, someone who has left it, or NubeStack Cloud itself (its own work, or its staff). |
name |
string | null | A member's display name or a service account's name, to a caller who may see the members; otherwise null. |
you |
boolean | Whether it was the caller. |
CancelledOperation¶
| Name | Type | Description |
|---|---|---|
operation |
OperationState |
ErrorCode¶
| Name | Type | Description |
|---|---|---|
code |
string | The problem code, as in the error catalogue. |
FailedStep¶
| Name | Type | Description |
|---|---|---|
action |
string | null | |
error |
ErrorCode |
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
Operation¶
| Name | Type | Description |
|---|---|---|
accepted_at |
string(date-time) | |
actor |
ActorRef | |
completed_at |
string(date-time) | null | |
error |
ErrorCode | |
id |
string | The operation (op_…). |
kind |
string | |
project_id |
string | null | |
resource |
OperationResource | |
revocation |
Revocation | A revocation's operation only. |
started_at |
string(date-time) | null | |
state |
string | queued, running, cancelling, or finished: succeeded, partially_succeeded, failed or cancelled. |
steps |
Array<OperationStep> | |
waiting_for |
WaitingFor | A queued workload operation accepted while another command of the organization was acting on the same resource: the operation it waits for. It starts once that one ends, and fails blocking_operation_failed if that one left nothing to act on, or wait_expired at its execute_before. Null otherwise. |
OperationList¶
| Name | Type | Description |
|---|---|---|
items |
Array<OperationSummary> | |
next_cursor |
string | null | Pass as cursor for the next page; null on the last page. |
OperationResource¶
| Name | Type | Description |
|---|---|---|
display_name |
string | null | |
id |
string | |
location |
string | null | |
provider_id |
string | null | Its ID in the location, once it has one. |
type |
string |
OperationState¶
| Name | Type | Description |
|---|---|---|
id |
string | The operation (op_…). |
state |
string |
OperationStep¶
| Name | Type | Description |
|---|---|---|
action |
string | null | What the step does, such as create_server. |
attempts |
integer | |
completed_at |
string(date-time) | null | |
component |
string | null | |
error |
ErrorCode | |
id |
string | The step (ops_…). |
locations |
Array<string> | |
ordinal |
integer | |
region |
string | null | |
result |
The identifiers the step recorded, such as the provider ID it created. | |
service |
string | null | |
started_at |
string(date-time) | null | |
state |
string | |
type |
string |
OperationSummary¶
| Name | Type | Description |
|---|---|---|
accepted_at |
string(date-time) | |
actor |
ActorRef | |
completed_at |
string(date-time) | null | |
error |
ErrorCode | |
failed_step |
FailedStep | The first step that failed, if any. |
id |
string | The operation (op_…). |
kind |
string | |
resource |
OperationResource | |
state |
string | |
steps |
StepCount | |
target |
OperationTarget |
OperationTarget¶
| Name | Type | Description |
|---|---|---|
id |
string | |
project_id |
string | null | |
type |
string |
Revocation¶
| Name | Type | Description |
|---|---|---|
locations |
Array<RevocationLocation> | |
state |
string |
RevocationLocation¶
| Name | Type | Description |
|---|---|---|
effective_by |
string(date-time) | null | When the access is gone there by. |
location |
string | null | |
status |
string |
StepCount¶
| Name | Type | Description |
|---|---|---|
succeeded |
integer | |
total |
integer |
ValidationError¶
| Name | Type | Description |
|---|---|---|
ctx |
||
input |
||
loc |
Array<> | |
msg |
string | |
type |
string |
WaitingFor¶
| Name | Type | Description |
|---|---|---|
id |
string | The operation (op_…) directly ahead of this one. |
kind |
string |