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
RS: Add fields and descriptions returned by /v1/actions to REST API reference (#1257)
* DOC-4920 RS: Add fields and descriptions returned by /v1/actions to REST API reference
* DOC-4920 Added more details about pending_ops structure and fields
* Added missing commas to JSON example
* DOC-4920 Fixed pending_ops heartbeat and last_sample_time descriptions in action REST API reference
Copy file name to clipboardExpand all lines: content/operate/rs/references/rest-api/requests/actions/_index.md
+25-3Lines changed: 25 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ weight: $weight
23
23
GET /v1/actions
24
24
```
25
25
26
-
Get the status of all actions (executing, queued, or completed) on all entities (clusters, nodes, and databases). This API tracks long-lived API requests that return either a `task_id` or an `action_uid`.
26
+
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
27
28
28
#### Required permissions
29
29
@@ -41,7 +41,18 @@ GET /v1/actions
41
41
42
42
### Response {#get-all-response}
43
43
44
-
Returns a JSON array of [action objects]({{< relref "/operate/rs/references/rest-api/objects/action" >}}) and an array of [state-machine objects]({{< relref "/operate/rs/references/rest-api/objects/state-machine" >}}).
44
+
Returns a JSON array of [action objects]({{< relref "/operate/rs/references/rest-api/objects/action" >}}), which represent tasks, and an array of [state-machine objects]({{< relref "/operate/rs/references/rest-api/objects/state-machine" >}}).
| name | string | Name of the running or failed state machine |
50
+
| progress | float (range: 0-100) | Percent of completed steps for the action |
51
+
| status | "pending"<br />"active"<br />"completed"<br />"failed" | The action's status |
52
+
| node_uid | string | UID of the node where the operation runs (optional) |
53
+
| object_name | string | The object that the action runs on (optional) |
54
+
| state | string | The current state of the state machine (optional) |
55
+
| 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 time, in seconds since the Unix epoch, since the last change in the progress of the operation.<br />**snapshot**: A map of properties stored by the operation that are needed to run.<br />**last_sample_time**: The time, in seconds since the Unix epoch, when the last snapshot of the operation was taken.<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). |
45
56
46
57
Regardless of an action’s source, each action in the response contains the following attributes: `name`, `action_uid`, `status`, and `progress`.
47
58
@@ -93,7 +104,7 @@ Regardless of an action’s source, each action in the response contains the fol
93
104
GET /v1/actions/{uid}
94
105
```
95
106
96
-
Get the status of a currently executing, queued, or completed action.
107
+
Get the status of a specific action.
97
108
98
109
#### Required permissions
99
110
@@ -119,6 +130,17 @@ GET /v1/actions/{uid}
119
130
120
131
Returns an [action object]({{< relref "/operate/rs/references/rest-api/objects/action" >}}).
| name | string | Name of the running or failed state machine |
137
+
| progress | float (range: 0-100) | Percent of completed steps for the action |
138
+
| status | "pending"<br />"active"<br />"completed"<br />"failed" | The action's status |
139
+
| node_uid | string | UID of the node where the operation runs (optional) |
140
+
| object_name | string | The object that the action runs on (optional) |
141
+
| state | string | The current state of the state machine (optional) |
142
+
| 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 time, in seconds since the Unix epoch, since the last change in the progress of the operation.<br />**snapshot**: A map of properties stored by the operation that are needed to run.<br />**last_sample_time**: The time, in seconds since the Unix epoch, when the last snapshot of the operation was taken.<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). |
143
+
122
144
Regardless of an action’s source, each action contains the following attributes: `name`, `action_uid`, `status`, and `progress`.
0 commit comments