2016-04-12 09:03:46 -04:00
|
|
|
.. -*- rst -*-
|
|
|
|
|
2016-04-23 22:13:01 +08:00
|
|
|
================================================
|
|
|
|
Servers actions (servers, os-instance-actions)
|
|
|
|
================================================
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-07-07 16:10:45 +08:00
|
|
|
List actions and action details for a server.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
List Actions For Server
|
|
|
|
=======================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /servers/{server_id}/os-instance-actions
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Lists actions for a server.
|
|
|
|
|
2016-07-07 16:10:45 +08:00
|
|
|
Action information of deleted instances can be returned for requests later
|
|
|
|
than microversion 2.21.
|
|
|
|
|
2016-04-23 22:13:01 +08:00
|
|
|
Policy defaults enable only users with the administrative role or the owner of
|
|
|
|
the server to perform this operation. Cloud providers can change these permissions
|
|
|
|
through the ``policy.json`` file.
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-23 22:13:01 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-07-06 11:42:41 +08:00
|
|
|
- server_id: server_id_path
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-07-06 11:42:41 +08:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
|
|
|
|
- instanceActions: instanceActions
|
|
|
|
- action: action
|
|
|
|
- instance_uuid: instance_id_body
|
|
|
|
- message: message
|
|
|
|
- project_id: project_id_instance_action
|
|
|
|
- request_id: request_id_body
|
|
|
|
- start_time: start_time
|
|
|
|
- user_id: user_id
|
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example List Actions For Server: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-instance-actions/instance-actions-list-resp.json
|
|
|
|
:language: javascript
|
|
|
|
|
2016-07-07 16:10:45 +08:00
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
Show Server Action Details
|
|
|
|
==========================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /servers/{server_id}/os-instance-actions/{request_id}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Shows details for a server action.
|
|
|
|
|
2016-07-07 16:10:45 +08:00
|
|
|
Action details of deleted instances can be returned for requests later
|
|
|
|
than microversion 2.21.
|
|
|
|
|
2016-04-23 22:13:01 +08:00
|
|
|
Policy defaults enable only users with the administrative role to perform this operation.
|
|
|
|
Cloud providers can change these permissions through the ``policy.json`` file.
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-23 22:13:01 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-07-06 11:42:41 +08:00
|
|
|
- server_id: server_id_path
|
2016-04-12 09:03:46 -04:00
|
|
|
- request_id: request_id
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-07-06 11:42:41 +08:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
|
|
|
|
- instanceAction: instanceAction
|
|
|
|
- action: action
|
|
|
|
- instance_uuid: instance_id_body
|
|
|
|
- message: message
|
|
|
|
- project_id: project_id_instance_action
|
|
|
|
- request_id: request_id_body
|
|
|
|
- start_time: start_time
|
|
|
|
- user_id: user_id
|
|
|
|
- events: instance_action_events
|
|
|
|
- events.event: event
|
|
|
|
- events.start_time: event_start_time
|
|
|
|
- events.finish_time: event_finish_time
|
|
|
|
- events.result: event_result
|
|
|
|
- events.traceback: event_traceback
|
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example Show Server Action Details: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-20 11:38:31 +09:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-instance-actions/instance-action-get-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|