Get Host Web Terminal Link

POST/zstack/v1/hosts/webssh

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "uuid": "1e6eb11de9d5347e9a5bc72269f45247",
    "https": false
  },
  "systemTags": [],
  "userTags": []
}

In the above example, systemTags and userTags fields can be omitted. They are listed to indicate that these two fields can be included in the body.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"uuid":"1e6eb11de9d5347e9a5bc72269f45247","https":false}}' //localhost:8080/zstack/v1/hosts/webssh

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringbody (contained in params structure)Resource UUID, uniquely identifies the resource 4.7.0
systemTags (optional)ListbodySystem tag 4.7.0
userTags (optional)ListbodyUser tag 4.7.0
https (optional)Booleanbody (contained in params structure)  4.7.11

API Response

Response Example

{
  "url": "ws://{{ip}}:8888/ws?id=140147795208568"
}
NameTypeDescriptionStarting Version
urlStringHost web terminal link4.7.0
successbooleanWhether succeeded4.7.0
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See details error4.7.0

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, e.g. SYS.1000, HOST.10014.7.0
descriptionStringBrief description of the error4.7.0
detailsStringDetailed error information4.7.0
elaborationStringReserved field, default is null4.7.0
opaqueLinkedHashMapReserved field, default is null4.7.0
causeErrorCodeRoot cause, the error that caused the current error. If there is no original error, this field is null4.7.0

SDK Examples

Java SDK

GetHostWebSshUrlAction action = new GetHostWebSshUrlAction();
action.uuid = "1e6eb11de9d5347e9a5bc72269f45247";
action.https = false;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetHostWebSshUrlAction.Result res = action.call();

Python SDK

GetHostWebSshUrlAction action = GetHostWebSshUrlAction()
action.uuid = "1e6eb11de9d5347e9a5bc72269f45247"
action.https = false
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetHostWebSshUrlAction.Result res = action.call()