49cade591f
some api-ref have sentence like '..for a server instance' which is inconsistent and confusing as we use server for VM terminology. I think here 'instance' word is being considered object of server which is wrong. We should always mention server only. part of bp:api-ref-in-rst-pike Change-Id: I32afe56cfc66b34b76d1f7e1b507d3d5e722e6a1
51 lines
1.3 KiB
ReStructuredText
51 lines
1.3 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
Show Console Output (os-getConsoleOutput Action)
|
|
================================================
|
|
|
|
.. rest_method:: POST /servers/{server_id}/action
|
|
|
|
Shows console output for a server.
|
|
|
|
This API returns the text of the console since boot.
|
|
The content returned may be large. Limit the lines of console
|
|
text, beginning at the tail of the content, by setting
|
|
the optional ``length`` parameter in the request body.
|
|
|
|
The server to get console log from should set
|
|
``export LC_ALL=en_US.UTF-8`` in order to avoid incorrect unicode error.
|
|
|
|
Normal response codes: 200
|
|
|
|
Error response codes: unauthorized(401), forbidden(403),
|
|
notFound(404), conflict(409), methodNotImplemented(501)
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- server_id: server_id_path
|
|
- os-getConsoleOutput: os-getConsoleOutput
|
|
- length: length
|
|
|
|
**Example Show Console Output (os-getConsoleOutput Action)**
|
|
|
|
This example requests the last 50 lines of console content
|
|
from the specified server.
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-req.json
|
|
:language: javascript
|
|
|
|
Response
|
|
--------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- output: console_output
|
|
|
|
**Example Show Console Output (os-getConsoleOutput Action)**
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-resp.json
|
|
:language: javascript
|