Obtaining ECS Management Console Logs
Function
This API is used to obtain ECS management console logs.
URI
POST /v2.1/{project_id}/servers/{server_id}/action
Table 1 describes the parameters in the URI.
Parameter | Mandatory | Description |
---|---|---|
project_id | Yes | Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
server_id | Yes | Specifies the ECS ID. |
Constraints
This API will be discarded since a version later than microversion 2.5. When using this API, set the microversion to 2.5 or earlier.
Request
Table 2 describes the request parameters.
Parameter | Mandatory | Type | Description |
---|---|---|---|
os-getConsoleOutput | Yes | Object | Obtains ECS management console logs. For details, see Table 3. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
length | Yes | Integer | Specifies the number of request log rows. The value is greater than or equal to -1, which indicates that the output is not limited. |
Response
Table 4 describes the response parameter.
Parameter | Type | Description |
---|---|---|
output | String | Specifies the ECS console logs. |
Example Request
POST https://{endpoint}/v2.1/9c53a566cb3443ab910cf0daebca90c4/servers/47e9be4e-a7b9-471f-92d9-ffc83814e07a/action
{"os-getConsoleOutput" : {"length" : "50"}}
Example Response
{"output": "FAKE CONSOLEOUTPUT\nANOTHER\nLAST LINE"}
Returned Values
- Function
- URI
- Constraints
- Request
- Response
- Example Request
- Example Response
- Returned Values