2016-04-12 09:03:46 -04:00
|
|
|
.. -*- rst -*-
|
|
|
|
|
|
|
|
Show Console Output (Os-Getconsoleoutput Action)
|
|
|
|
================================================
|
|
|
|
|
|
|
|
.. rest_method:: POST /v2.1/{tenant_id}/servers/{server_id}/action
|
|
|
|
|
|
|
|
Shows console output for a server instance.
|
|
|
|
|
2016-05-09 15:49:38 -04:00
|
|
|
This returns the text of the console since boot in a REST
|
|
|
|
response. The console content may be large, you can limit it with the
|
|
|
|
optional ``length`` parameter.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-05-09 15:49:38 -04:00
|
|
|
Error response codes: unauthorized(401), forbidden(403),
|
|
|
|
notFound(404), conflict(409), methodNotImplemented(501)
|
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
|
|
|
|
|
|
|
|
- tenant_id: tenant_id
|
2016-05-09 15:49:38 -04:00
|
|
|
- server_id: server_id_path
|
2016-04-12 09:03:46 -04:00
|
|
|
- os-getConsoleOutput: os-getConsoleOutput
|
|
|
|
- length: length
|
|
|
|
|
2016-05-09 15:49:38 -04:00
|
|
|
**Example Get console output**
|
|
|
|
|
|
|
|
This requests the last 50 lines of the server in question.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-19 17:12:00 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-req.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 15:49:38 -04:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- output: console_output
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
**Example Get console output: JSON response**
|
|
|
|
|
2016-04-19 17:12:00 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|