• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Server Actions
  6. Obtaining Console Logs

Obtaining Console Logs

Function

This interface is used to obtain ECS management console logs.

URI

  • URI format

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

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

  • Parameter description

    Parameter

    Mandatory

    Description

    tenant_id

    Yes

    Specifies the tenant or project ID.

    server_id

    Yes

    Specifies the ECS ID.

Restrictions

This interface will become invalid from micro version 2.5 and will be replaced by the remote API console in micro version 2.6.

Extension Description

N/A

Request

Table 1 Request parameters

Parameter

Type

Mandatory

Description

length

int

Yes

Specifies the number of request log rows.

Response

N/A

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.