Query Bare Metal Chassis

GET/zstack/v1/baremetal/chassis
GET/zstack/v1/baremetal/chassis/{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/baremetal/chassis?q=uuid=fcdbdc973fe138d991cb9e4c0c96bf24
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/baremetal/chassis/74db6aa9f4593fddbe914d86510e9244

Queryable Fields

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

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "adf78dd20777349f8b1a9f31b5b1de71",
      "ipmiAddress": "1.1.1.1",
      "ipmiPort": 623,
      "ipmiUsername": "root",
      "ipmiPassword": "password",
      "state": "Enabled",
      "status": "Available"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error2.6.0
inventoriesListFor details, see inventories2.6.0

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, for example SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, default is null0.6
opaqueLinkedHashMapReserved field, default is null0.6
causeErrorCodeRoot cause: the source error that triggered the current error. If there is no original error, this field is null0.6

inventories

NameTypeDescriptionStarting Version
uuidStringUUID of the resource, uniquely identifying the resource2.6.0
nameStringResource name2.6.0
descriptionStringDetailed description of the resource2.6.0
zoneUuidStringData Center UUID2.6.0
clusterUuidStringCluster UUID2.6.0
pxeServerUuidString 3.1.1
ipmiAddressStringIPMI address2.6.0
ipmiPortIntegerIPMI port2.6.0
ipmiUsernameStringIPMI username2.6.0
stateString 2.6.0
statusString 2.6.0
createDateTimestampCreate time2.6.0
lastOpDateTimestampLast modification time2.6.0

SDK Examples

Java SDK

QueryBaremetalChassisAction action = new QueryBaremetalChassisAction();
action.conditions = asList("uuid=79aa822340b2328793e624e0416cc55a");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryBaremetalChassisAction.Result res = action.call();

Python SDK

action = QueryBaremetalChassisAction()
action.conditions = ["uuid=41375a72ff0d381fac8f50f5b8e7a27f"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()