ZStack Cloud Platform
Single Server, Free Trial for One Year
GET zstack/v1/global-configurations
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth 036d9a68cd8243e99e8d740eaf8b4baf" \ -X GET http://localhost:8080/zstack/v1/global-configurations
Queryable Fields
You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryGlobalConfig, and pressing the Tab key.
{ "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 fails, or vice versa. For more information, see error. | 0.6 |
inventories | List | See inventories. | 0.6 |
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
description | String | The brief description of the error. | 0.6 |
details | String | The details about the error. | 0.6 |
elaboration | String | The reserved field. Default value: null. | 0.6 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
Name | Type | Description | Starting Version |
---|---|---|---|
name | String | The 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 |
QueryGlobalConfigAction action = new QueryGlobalConfigAction(); action.conditions = asList(); action.sessionId = "8509eaa6301b4935a4b100a05f1fe2ba"; QueryGlobalConfigAction.Result res = action.call();
QueryGlobalConfigAction action = QueryGlobalConfigAction() action.conditions = [] action.sessionId = "e085fdf6aa354291b71ae8dc5fa880fe" QueryGlobalConfigAction.Result res = action.call()
PUT zstack/v1/global-configurations/{category}/{name}/actions
Authorization: OAuth the-session-uuid
{ "updateGlobalConfig": { "value": "90" }, "systemTags": [], "userTags": [] }
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X PUT -d '{"updateGlobalConfig":{"value":"90"}}' \ http://localhost:8080/zstack/v1/global-configurations/quota/scheduler.num/actions
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
category | String | url | The category. | 0.6 | |
name | String | url | The resource name. | 0.6 | |
value | String | body (contained in the updateGlobalConfig structure) | Optional. The value. | 0.6 | |
systemTags | List | body | Optional. The system tags. | 0.6 | |
userTags | List | body | Optional. The user tags. | 0.6 |
{ "inventory": { "name": "scheduler.num", "category": "quota", "description": "default quota for scheduler.num", "defaultValue": "80", "value": "90" } }
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
inventory | GlobalConfigInventory | See inventory. | 0.6 |
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
description | String | The brief description of the error. | 0.6 |
details | String | The details about the error. | 0.6 |
elaboration | String | The reserved field. Default value: null. | 0.6 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
Name | Type | Description | Starting Version |
---|---|---|---|
name | String | The 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 |
UpdateGlobalConfigAction action = new UpdateGlobalConfigAction(); action.category = "quota"; action.name = "scheduler.num"; action.value = "90"; action.sessionId = "84a1a9ed2d54449db13e01f7d6face7e"; UpdateGlobalConfigAction.Result res = action.call();
UpdateGlobalConfigAction action = UpdateGlobalConfigAction() action.category = "quota" action.name = "scheduler.num" action.value = "90" action.sessionId = "b077cfa8599a4ff1ac4fd7ba67b20a82" UpdateGlobalConfigAction.Result res = action.call()