You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: content/operate/rs/references/rest-api/requests/actions/_index.md
+166-4
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,9 @@ weight: $weight
15
15
| Method | Path | Description |
16
16
|--------|------|-------------|
17
17
|[GET](#get-all-actions)|`/v1/actions`| Get all actions |
18
+
|[GET](#get-all-actions-v2)|`/v2/actions`| Get all actions |
18
19
|[GET](#get-action)|`/v1/actions/{uid}`| Get a single action |
20
+
|[GET](#get-action-v2)|`/v2/actions/{uid}`| Get a single action |
19
21
20
22
## Get all actions {#get-all-actions}
21
23
@@ -25,6 +27,8 @@ GET /v1/actions
25
27
26
28
Get the status of all running, pending, or completed actions on all clusters, nodes, and databases. This API tracks long-lived API requests that return either a `task_id` or an `action_uid`.
27
29
30
+
This API does not return any information about other actions, such as import, export, and backup. To get info about these actions, use [`GET /v2/actions`](#get-all-actions-v2).
31
+
28
32
#### Required permissions
29
33
30
34
| Permission name |
@@ -95,8 +99,84 @@ Regardless of an action’s source, each action in the response contains the fol
95
99
96
100
| Code | Description |
97
101
|------|-------------|
98
-
|[200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1)| No error, response provides info about an ongoing action |
99
-
|[404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5)| Action does not exist (i.e. not currently running and no available status of last run).|
102
+
|[200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok)| No error, response provides info about an ongoing action |
103
+
|[404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found)| Action does not exist (i.e. not currently running and no available status of last run).|
104
+
105
+
## Get all actions {#get-all-actions-v2}
106
+
107
+
```
108
+
GET /v2/actions
109
+
```
110
+
111
+
Get the status of all currently running, pending, or completed actions from tasks, state-machines, and other actions, including import, export, and backup. This API tracks long-lived API requests that return either a `task_id` or an `action_uid`.
| action_type | "task"<br />"state-machine"<br />"other" | The action's type |
137
+
| creation_time | integer | The action's creation time. Unix timestamp in seconds. |
138
+
| name | string | Name of the running or failed state machine |
139
+
| progress | float (range: 0-100) | Percent of completed steps for the action |
140
+
| status | "pending"<br />"active"<br />"completed"<br />"failed" | The action's status |
141
+
| additional_info | JSON object | A dictionary that can include additional information about the action |
142
+
143
+
The `additional_info` object can contain any of the following fields:
144
+
145
+
| Field | Type/Value | Description |
146
+
|-------|------------|-------------|
147
+
| description | string | Short description of the action |
148
+
| error | string | A message that describes what error occurred if the action failed |
149
+
| object_type | string | The type of object that was processed in the action, such as BDB or node |
150
+
| object_uid | string | The unique ID of the object processed in the action |
151
+
| pending_ops | JSON object | List of operations that are waiting to run (optional)<br />{{<code>}}"pending_ops": {<br /> "3": {<br /> "heartbeat": integer,<br /> "snapshot": { ... },<br /> "last_sample_time": integer,<br /> "op_name": string,<br /> "status_code": string,<br /> "status_description": string,<br /> "progress": float<br /> }<br />}{{</code>}}<br />`pending_ops` is a map where the key is the `shard_id`, and the value is a map that can include the following optional fields:<br />**heartbeat**: The last time in seconds since the epoch when a snapshot of the operation was saved.<br />**snapshot**: A map of properties stored by the operation that are needed to run.<br />**last_sample_time**: The last time in seconds since the epoch when a snapshot of the operation was saved.<br />**op_name**: The name of the operation from the state machine that is running.<br />**status_code**: The code for the operation's current status.<br />**status_description**: The operation's current status.<br />**progress**: The operation's progress in percentage (1 to 100). |
152
+
153
+
Regardless of an action’s source, each action in the response contains the following attributes: `name`, `action_uid`, `status`, and `progress`.
|[200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok)| No error, response provides info about an ongoing action |
100
180
101
181
## Get a specific action {#get-action}
102
182
@@ -106,6 +186,8 @@ GET /v1/actions/{uid}
106
186
107
187
Get the status of a specific action.
108
188
189
+
This API does not return any information about other actions, such as import, export, and backup. To get info about these actions, use [`GET /v2/actions/<uid>`](#get-action-v2).
190
+
109
191
#### Required permissions
110
192
111
193
| Permission name |
@@ -160,5 +242,85 @@ Regardless of an action’s source, each action contains the following attribute
160
242
161
243
| Code | Description |
162
244
|------|-------------|
163
-
|[200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1)| No error, response provides info about an ongoing action |
164
-
|[404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5)| Action does not exist (i.e. not currently running and no available status of last run) |
245
+
|[200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok)| No error, response provides info about an ongoing action |
246
+
|[404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found)| Action does not exist (i.e. not currently running and no available status of last run) |
247
+
248
+
## Get a specific action {#get-action-v2}
249
+
250
+
```
251
+
GET /v2/actions/{uid}
252
+
```
253
+
254
+
Get the status of a specific action. This API can also return information about actions like import, export, and backup.
| action_type | "task"<br />"state-machine"<br />"other" | The action's type |
286
+
| creation_time | integer | The action's creation time. Unix timestamp in seconds. |
287
+
| name | string | Name of the running or failed state machine |
288
+
| progress | float (range: 0-100) | Percent of completed steps for the action |
289
+
| status | "pending"<br />"active"<br />"completed"<br />"failed" | The action's status |
290
+
| additional_info | JSON object | A dictionary that can include additional information about the action |
291
+
292
+
The `additional_info` object can contain any of the following fields:
293
+
294
+
| Field | Type/Value | Description |
295
+
|-------|------------|-------------|
296
+
| description | string | Short description of the action |
297
+
| error | string | A message that describes what error occurred if the action failed |
298
+
| object_type | string | The type of object that was processed in the action, such as BDB or node |
299
+
| object_uid | string | The unique ID of the object processed in the action |
300
+
| pending_ops | JSON object | List of operations that are waiting to run (optional)<br />{{<code>}}"pending_ops": {<br /> "3": {<br /> "heartbeat": integer,<br /> "snapshot": { ... },<br /> "last_sample_time": integer,<br /> "op_name": string,<br /> "status_code": string,<br /> "status_description": string,<br /> "progress": float<br /> }<br />}{{</code>}}<br />`pending_ops` is a map where the key is the `shard_id`, and the value is a map that can include the following optional fields:<br />**heartbeat**: The last time in seconds since the epoch when a snapshot of the operation was saved.<br />**snapshot**: A map of properties stored by the operation that are needed to run.<br />**last_sample_time**: The last time in seconds since the epoch when a snapshot of the operation was saved.<br />**op_name**: The name of the operation from the state machine that is running.<br />**status_code**: The code for the operation's current status.<br />**status_description**: The operation's current status.<br />**progress**: The operation's progress in percentage (1 to 100). |
301
+
302
+
Regardless of an action’s source, each action contains the following attributes: `name`, `action_uid`, `status`, and `progress`.
|[200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok)| No error, response provides info about an ongoing action |
326
+
|[404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found)| Action does not exist (i.e. not currently running and no available status of last run) |
0 commit comments