Query Resource Custom Attributes

GET/zstack/v1/resource-configurations

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/resource-configurations

Queryable Fields

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

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "4944c2599c394bd5be5ccc1099dfdb4b",
      "resourceUuid": "45a511dfef1b474dbef3c1ff88275465",
      "resourceType": "ClusterVO",
      "name": "cpu.overProvisioning.ratio",
      "category": "host",
      "value": "10",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. See error for details3.4.0
inventoriesListSee inventories for details3.4.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10013.4.0
descriptionStringA brief description of the error3.4.0
detailsStringThe detailed error information3.4.0
elaborationStringReserved field. Default is null3.4.0
opaqueLinkedHashMapReserved field. Default is null3.4.0
causeErrorCodeThe root error that caused the current error. If no root error exists, this field is null3.4.0

inventories

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource, uniquely identifying the resource3.4.0
resourceUuidStringThe resource UUID associated with the configuration3.4.0
resourceTypeStringThe resource type associated with the configuration3.4.0
nameStringConfiguration name3.4.0
descriptionStringThe detailed description of the configuration3.4.0
categoryStringConfiguration category3.4.0
valueStringThe configuration value3.4.0
createDateTimestampCreation time3.4.0
lastOpDateTimestampLast modification time3.4.0

SDK Examples

Java SDK

QueryResourceConfigAction action = new QueryResourceConfigAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryResourceConfigAction.Result res = action.call();

Python SDK

QueryResourceConfigAction action = QueryResourceConfigAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryResourceConfigAction.Result res = action.call()