Query Global Settings
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 036d9a68cd8243e99e8d740eaf8b4baf" \
-X GET http://localhost:8080/zstack/v1/global-configurationsQueryable Fields
Run the CLI command line tool, enter QueryGlobalConfig and press the Tab key to view all queryable fields and cross-table queryable resource names.
API Response
Response Example
{
"inventories": [
{
"name": "reservedCapacity",
"category": "backupStorage",
"description": "Reserved capcacity on every backup storage",
"defaultValue": "1G",
"value": "2G"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation failed. This field is null when the operation succeeds. See error for details | 0.6 |
| inventories | List | See inventories for details | 0.6 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001 | 0.6 |
| description | String | A brief description of the error | 0.6 |
| details | String | The detailed error information | 0.6 |
| elaboration | String | Reserved field. Default is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. Default is null | 0.6 |
| cause | ErrorCode | The root error that caused the current error. If no root error exists, this field is null | 0.6 |
inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 0.6 |
| category | String | 0.6 | |
| description | String | The detailed description of the resource | 0.6 |
| defaultValue | String | 0.6 | |
| value | String | 0.6 |
SDK Examples
Java SDK
QueryGlobalConfigAction action = new QueryGlobalConfigAction();
action.conditions = asList();
action.sessionId = "8509eaa6301b4935a4b100a05f1fe2ba";
QueryGlobalConfigAction.Result res = action.call();Python SDK
QueryGlobalConfigAction action = QueryGlobalConfigAction()
action.conditions = []
action.sessionId = "e085fdf6aa354291b71ae8dc5fa880fe"
QueryGlobalConfigAction.Result res = action.call()