nova/api-ref/source/servers-action-console-output.inc
Sean Dague c9f5ad3bcf remove /v2.1/{tenant_id} from all urls
As discussed at summit, the version part of the URL is not really
relevant, or a thing a user should be filling out themselves, this
should instead be set by the service catalog and extracted from the
token.

This removes it's reference in all documented REST urls, and adds a
new section describing how one gets the base URL for all calls.

Change-Id: I4306b8c3de0225e54f3909dd8a1fb293c4e5944c
2016-06-03 08:47:33 -04:00

47 lines
1.1 KiB
ReStructuredText

.. -*- rst -*-
Show Console Output (Os-Getconsoleoutput Action)
================================================
.. rest_method:: POST /servers/{server_id}/action
Shows console output for a server instance.
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.
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 Get console output**
This requests the last 50 lines of the server in question.
.. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-req.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- output: console_output
**Example Get console output: JSON response**
.. literalinclude:: ../../doc/api_samples/os-console-output/console-output-post-resp.json
:language: javascript