Skip to main content

Get Remote Console

POST/v2.1/servers/{server_id}/remote-consoles

Returns a temporary URL that opens the VM console in a browser. This is the API behind the console button in the dashboard, and it is the way back into a VM whose network or SSH access is broken.

info

Request​

Parameters​

server_idstringrequiredpath

The UUID of the VM.

remote_consoleobjectrequiredbody

Console request wrapper.

2 fields
protocolstringrequiredbody

Console protocol. The valid value is vnc.

typestringrequiredbody

Console client type. The valid value is novnc.

Sample Request​

curl -ks -X POST -H 'Content-Type: application/json' \
-H 'X-OpenStack-Nova-API-Version: 2.8' -H 'X-Auth-Token: gAAAAA<...>' \
-d '{
"remote_console": {
"protocol": "vnc",
"type": "novnc"
}
}' https://api.vietnix.cloud:8774/v2.1/servers/{server_id}/remote-consoles

Response​

Sample Response​

{
"remote_console": {
"protocol": "vnc",
"type": "novnc",
"url": "https://console.vietnix.cloud/vnc_auto.html?path=websockify&token=7d1f9c2e4b6a"
}
}
remote_console.protocolstringrequired

Console protocol that was granted.

remote_console.typestringrequired

Client type that was granted.

remote_console.urlstringrequired

Console URL. Open it in a browser.

Status Code​

Success​

Status CodeDescription
200 - OKConsole URL returned.

Error​

Status CodeDescription
400 - Bad RequestThe request body or its parameters are invalid.
401 - UnauthorizedUser must authenticate before making a request.
403 - ForbiddenPolicy does not allow current user to do this operation.
404 - Not FoundThe VM does not exist, or is not visible to your project.
409 - ConflictThe VM is in a status that cannot be reached by a console.
501 - Not ImplementedRemote console is not implemented for this VM or deployment.
warning

The URL is a bearer credential: anyone who has it can watch and type into the console until the token expires. Do not paste it into tickets, chat, or logs. Every call returns a new token.