QueryGlobalConfig

API Request

URLs
GET zstack/v1/global-configurations
Headers
Authorization: OAuth the-session-uuid
Curl Sample
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.

API Response

Sample Response
{   "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
#error
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
#inventories
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

SDK Sample

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()

UpdateGlobalConfig

API Request

URLs
PUT zstack/v1/global-configurations/{category}/{name}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{ "updateGlobalConfig": { "value": "90"   }, "systemTags": [], "userTags": [] }
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
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
Request Parameters
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

API Response

Sample Response
{   "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
#error
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
#inventory
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

SDK Sample

Java SDK
UpdateGlobalConfigAction action = new UpdateGlobalConfigAction(); action.category = "quota"; action.name = "scheduler.num"; action.value = "90"; action.sessionId = "84a1a9ed2d54449db13e01f7d6face7e"; UpdateGlobalConfigAction.Result res = action.call();
Python SDK
UpdateGlobalConfigAction action = UpdateGlobalConfigAction() action.category = "quota" action.name = "scheduler.num" action.value = "90" action.sessionId = "b077cfa8599a4ff1ac4fd7ba67b20a82" UpdateGlobalConfigAction.Result res = action.call()
















Archives

Download Document Archives

Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.