Query Console Proxy Agent

GET/zstack/v1/consoles/agents
GET/zstack/v1/consoles/agents/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 350b72c2d3f24641a767acbcec744b19" \
-X GET http://localhost:8080/zstack/v1/consoles/agents?q=uuid=745b7c17cd224025b3adfef4ae61b3d2
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth bb08e240616b482984c397e4517a021c" \
-X GET http://localhost:8080/zstack/v1/consoles/agents/8a3cc2be7e20420db29925e381c598bc

Queryable Fields

Run the CLI command line tool, enter QueryConsoleProxyAgent and press the Tab key to view all queryable fields and cross-table queryable resource names.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "c77bbc7d3364449e9543d0776a6087de",
      "managementIp": "127.0.0.1",
      "type": "ManagementServerConsoleProxy",
      "state": "Connected"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error0.6
inventoriesListFor details, see inventories0.6

error

NameTypeDescriptionStarting Version
codeStringError code number. The globally unique identifier of the error, for example, SYS.1000 or HOST.1001.0.6
descriptionStringBrief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null.0.6
opaqueLinkedHashMapReserved field. Default is null.0.6
causeErrorCodeRoot error. The source error that caused the current error. This field is null if no root error exists.0.6

inventories

NameTypeDescriptionStarting Version
uuidStringResource UUID. Uniquely identifies the resource.0.6
descriptionStringDetailed description of the resource0.6
managementIpStringManagement node IP0.6
typeStringType0.6
statusStringStatus (Connected, Disconnected)0.6
stateStringState (Enabled, Disabled)0.6
createDateTimestampCreation time0.6
lastOpDateTimestampLast modification time0.6

SDK Examples

Java SDK

QueryConsoleProxyAgentAction action = new QueryConsoleProxyAgentAction();
action.conditions = asList("uuid=dfbe49d87cb94d93b69354fa1270012b");
action.sessionId = "e2300cd4f74a457e87f13842aeb8fdef";
QueryConsoleProxyAgentAction.Result res = action.call();

Python SDK

QueryConsoleProxyAgentAction action = QueryConsoleProxyAgentAction()
action.conditions = ["uuid=1e47046946f849ee871de20a2b045750"]
action.sessionId = "1655d7f2e56d4710824cd1082bd5cc94"
QueryConsoleProxyAgentAction.Result res = action.call()