Querying Operations on an ECS¶
Function¶
This API is used to query all historical operations on an ECS.
URI¶
GET /v2.1/{project_id}/servers/{server_id}/os-instance-actions?limit={limit}&marker={marker}
GET /v2/{project_id}/servers/{server_id}/os-instance-actions?limit={limit}&marker={marker}
Table 1 describes the parameters in the URI.
Parameter | Mandatory | Description |
---|---|---|
project_id | Yes | Specifies the project ID. |
server_id | Yes | Specifies the ECS ID. |
Note
Pagination query is supported in microversion 2.58 and later. The query results are displayed by the creation time (created_at) of the records in descending order. If the creation time is not provided, the results are displayed by object ID in descending order. The number of records displayed on each page is limit. If the value of limit exceeds the maximum number configured in Nova, the maximum number configured in Nova is returned.
Parameter | Mandatory | Description |
---|---|---|
limit | No | Specifies the upper limit on the number of returned results. This parameter is supported in microversion 2.58 and later. |
marker | No | Specifies the marker that points to the operation. The query starts from the next piece of data indexed by this parameter. The value is request_id. This parameter is supported in microversion 2.58 and later. |
Request¶
None
Response¶
Table 3 describes the response parameters.
Parameter | Type | Description |
---|---|---|
instanceActions | Array of Object | Specifies operations performed on the ECS. For details, see Table 4. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
action | Yes | String | Specifies the action. Options: create, delete, evacuate, restore, stop, start, reboot, rebuild, revertResize, confirmResize, detach_volume, attach_volume, attach_interface, detach_interface, lock, unlock, resize, migrate, pause, unpause, rescue, unrescue, changePassword, shelve, unshelve, live-migration, live_migration_cancel, live_migration_force_complete, trigger_crash_dump, extend_volume |
instance_uuid | Yes | String | Specifies the ECS ID in UUID format. |
message | Yes | String | Specifies the result status of the operation. |
project_id | Yes | String | Specifies the project ID. |
request_id | Yes | String | Specifies the request ID. |
start_time | Yes | String | Specifies the time when the action was started. |
user_id | Yes | String | Specifies the user ID. |
Example Request¶
Query all historical operations on a specified ECS.
GET https://{endpoint}/v2/89655fe61c4c4a08b9f3e7f9095441b8/servers/e723eb40-f56e-40f9-8c8c-caa517fe06ba/os-instance-actions
GET https://{endpoint}/v2.1/89655fe61c4c4a08b9f3e7f9095441b8/servers/e723eb40-f56e-40f9-8c8c-caa517fe06ba/os-instance-actions
Example Response¶
{
"instanceActions": [
{
"instance_uuid": "e723eb40-f56e-40f9-8c8c-caa517fe06ba",
"user_id": "752be40780484291a9cc7ae50fff3e6d",
"start_time": "2014-12-16T10:58:14.000000",
"request_id": "req-ee56c2b5-d33b-4749-ae83-09281dbbb716",
"action": "resize",
"message": "Error",
"project_id": "89655fe61c4c4a08b9f3e7f9095441b8"
},
{
"instance_uuid": "e723eb40-f56e-40f9-8c8c-caa517fe06ba",
"user_id": "752be40780484291a9cc7ae50fff3e6d",
"start_time": "2014-12-16T10:57:56.000000",
"request_id": "req-23cfd57f-c58a-45cd-86a6-eab3e38f3753",
"action": "resize",
"message": "Error",
"project_id": "89655fe61c4c4a08b9f3e7f9095441b8"
},
]
}