Skip to content

Commit fa5c530

Browse files
committed
DOC-4812 Feedback updates for creation_time, additional_info, heartbeat, and last_sample_time in v2 action REST API reference
1 parent 0c4e702 commit fa5c530

File tree

1 file changed

+10
-10
lines changed
  • content/operate/rs/references/rest-api/requests/actions

1 file changed

+10
-10
lines changed

content/operate/rs/references/rest-api/requests/actions/_index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ weight: $weight
1919
| [GET](#get-action) | `/v1/actions/{uid}` | Get a single action |
2020
| [GET](#get-action-v2) | `/v2/actions/{uid}` | Get a single action |
2121

22-
## Get all actions {#get-all-actions}
22+
## Get all actions v1 {#get-all-actions}
2323

2424
```
2525
GET /v1/actions
@@ -102,7 +102,7 @@ Regardless of an action’s source, each action in the response contains the fol
102102
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error, response provides info about an ongoing action |
103103
| [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).|
104104

105-
## Get all actions {#get-all-actions-v2}
105+
## Get all actions v2 {#get-all-actions-v2}
106106

107107
```
108108
GET /v2/actions
@@ -138,7 +138,7 @@ The v2 action object includes the following fields:
138138
| name | string | Name of the running or failed state machine |
139139
| progress | float (range: 0-100) | Percent of completed steps for the action |
140140
| 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 |
141+
| additional_info | JSON object | A dictionary that can include additional information about the action; only included in the response if it contains at least one key-value pair |
142142

143143
The `additional_info` object can contain any of the following fields:
144144

@@ -148,9 +148,9 @@ The `additional_info` object can contain any of the following fields:
148148
| error | string | A message that describes what error occurred if the action failed |
149149
| object_type | string | The type of object that was processed in the action, such as BDB or node |
150150
| 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). |
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 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**: **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). |
152152

153-
Regardless of an action’s source, each action in the response contains the following attributes: `name`, `action_uid`, `status`, and `progress`.
153+
Regardless of an action’s source, each action in the response contains the following attributes: `name`, `action_uid`, `creation_time`, `status`, and `progress`.
154154

155155
#### Example JSON body
156156

@@ -178,7 +178,7 @@ Regardless of an action’s source, each action in the response contains the fol
178178
|------|-------------|
179179
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error, response provides info about an ongoing action |
180180

181-
## Get a specific action {#get-action}
181+
## Get a specific action v1 {#get-action}
182182

183183
```
184184
GET /v1/actions/{uid}
@@ -245,7 +245,7 @@ Regardless of an action’s source, each action contains the following attribute
245245
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error, response provides info about an ongoing action |
246246
| [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) |
247247

248-
## Get a specific action {#get-action-v2}
248+
## Get a specific action v2 {#get-action-v2}
249249

250250
```
251251
GET /v2/actions/{uid}
@@ -287,7 +287,7 @@ The v2 action object includes the following fields:
287287
| name | string | Name of the running or failed state machine |
288288
| progress | float (range: 0-100) | Percent of completed steps for the action |
289289
| 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 |
290+
| additional_info | JSON object | A dictionary that can include additional information about the action; only included in the response if it contains at least one key-value pair |
291291

292292
The `additional_info` object can contain any of the following fields:
293293

@@ -297,9 +297,9 @@ The `additional_info` object can contain any of the following fields:
297297
| error | string | A message that describes what error occurred if the action failed |
298298
| object_type | string | The type of object that was processed in the action, such as BDB or node |
299299
| 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). |
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 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). |
301301

302-
Regardless of an action’s source, each action contains the following attributes: `name`, `action_uid`, `status`, and `progress`.
302+
Regardless of an action’s source, each action contains the following attributes: `name`, `action_uid`, `creation_time`, `status`, and `progress`.
303303

304304
#### Example JSON body
305305

0 commit comments

Comments
 (0)