• Elastic Cloud Server

ecs
  1. Help Center
  2. Elastic Cloud Server
  3. API Reference
  4. OpenStack Nova APIs
  5. Status Management
  6. Obtaining ECS Management Console Logs

Obtaining ECS Management Console Logs

Function

This interface is used to obtain ECS management console logs.

URI

POST /v2/{project_id}/servers/{server_id}/action

POST /v2.1/{project_id}/servers/{server_id}/action

Table 1 describes the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the 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

Request parameters

Table 2 describes the request parameters.

Table 2 Request parameters

Parameter

Type

Mandatory

Description

length

int

Yes

Specifies the number of request log rows.

Response

N/A

Examples

  • Example request
    POST /v2/9c53a566cb3443ab910cf0daebca90c4/servers/47e9be4e-a7b9-471f-92d9-ffc83814e07a/action
    POST /v2.1/9c53a566cb3443ab910cf0daebca90c4/servers/47e9be4e-a7b9-471f-92d9-ffc83814e07a/action
    {
       "os-getConsoleOutput " : {
            "length" : "50"
        }
    }
  • Example response
    {
        "output": "FAKE CONSOLEOUTPUT\nANOTHER\nLAST LINE"
    }

Returned Values

See General Request Returned Values.