Query ZCE-X

GET/zstack/v1/zce-x-plugin
GET/zstack/v1/zce-x-plugin/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/zce-x-plugin?q=name=zce-x
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/zce-x-plugin/7746a57778193dcd9201c12a6dbc20fb

Queryable Fields

Run the CLI command tool, enter QueryZceX and press Tab to view all queryable fields and resource names that can be queried across tables.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "77e1393bf5aa4536a018b4c0c4e29c72",
      "name": "zce-x-plugin",
      "managementIp": "127.0.0.1",
      "apiPort": 8056,
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successbooleanWhether the query was successful4.10.6
inventoriesListFor details, see inventories4.10.6
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. For details, see error4.10.6

inventories

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource4.10.6
nameStringResource name4.10.6
managementIpStringIP address for accessing ZCE-X4.10.6
apiPortintAPI port for accessing ZCE-X4.10.6
createDateTimestampCreation time4.10.6
lastOpDateTimestampLast modification time4.10.6

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, for example SYS.1000, HOST.10014.10.0
descriptionStringBrief summary of the error4.10.0
detailsStringDetailed error information4.10.0
elaborationStringReserved field, defaults to null4.10.0
opaqueLinkedHashMapReserved field, defaults to null4.10.0
causeErrorCodeRoot cause: the source error that triggered the current error. If there is no original error, this field is null4.10.0

SDK Examples

Java SDK

QueryZceXAction action = new QueryZceXAction();
action.conditions = asList("name=zce-x");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryZceXAction.Result res = action.call();

Python SDK

QueryZceXAction action = QueryZceXAction()
action.conditions = ["name=zce-x"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryZceXAction.Result res = action.call()