ZStack Cloud Platform
Single Server, Free Trial for One Year
GET zstack/v1/licenses
curl -H "Content-Type: application/json;charset=UTF-8" \ -X GET http://localhost:8080/zstack/v1/licenses?
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
additionSession | String | query | Optional. The additional information. The value is a JSON-formatted string. | 4.1.0 | |
systemTags | List | query | Optional. The system tags. | 0.6 | |
userTags | List | query | Optional. The user tags. | 0.6 |
platformId::{%s}
。{%s}represents the first 10 digits of the md5 value calculated using the request key of the Cloud.platformId::a95d3ee34r
{ "inventory": { "licenseType": "Free", "licenseRequest": "example request", "issuedDate": "2017-01-19 14:31:06", "user": "example", "hostNum": 10.0, "expired": true, "managementNodeUuid": "00898b3538e53e70bb7521e54ff80276" }, "additions": [] }
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 | LicenseInventory | 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 |
---|---|---|---|
licenseType | String | 0.6 | |
licenseRequest | String | 0.6 | |
expiredDate | String | 0.6 | |
issuedDate | String | 0.6 | |
user | String | 0.6 | |
prodInfo | String | The license product name. | 4.1.0 |
hostNum | Integer | 0.6 | |
cpuNum | Integer | 0.6 | |
availableHostNum | Integer | 0.6 | |
availableCpuNum | Integer | 0.6 | |
expired | boolean | 0.6 |
GetLicenseInfoAction action = new GetLicenseInfoAction(); GetLicenseInfoAction.Result res = action.call();
GetLicenseInfoAction action = GetLicenseInfoAction() GetLicenseInfoAction.Result res = action.call()
GET zstack/v1/licenses/records
curl -H "Content-Type: application/json;charset=UTF-8" \ -X GET http://localhost:8080/zstack/v1/licenses/records?limit=20.0&start=0.0&replyWithCount=true&count=false&sortBy=uploadDate&sortDirection=desc
Name | Type | Location | Description | Valid Value | Starting Version |
---|---|---|---|---|---|
limit | Integer | query | Optional. The maximum number of records that cab be retrieved. Default: 20. This parameter is similar to the limit parameter in MySQL. | 4.1.0 | |
start | Integer | query | Optional. The position to start a query. You need to set this parameter if you specify thelimit parameter. This parameter is similar to the offset parameter in MySQL. | 4.1.0 | |
replyWithCount | boolean | query | Optional. Specifies whether to return the number of records. If you set the value to true, the number of records are returned. | 4.1.0 | |
count | boolean | query | Optional. Specifies whether to count the number of records that meet the specified conditions. This parameter is similar to the count() function. If you set the value to true , the number of records that meet the specified conditions is calculated and returned. | 4.1.0 | |
sortBy | String | query | Optional. Specifies to start records by a key, for example sortBy=ip. You need to specify the sortDirection parameter if you specify this parameter. This parameter is similar to the sort by parameter in MySQL. | 4.1.0 | |
sortDirection | String | query | Optional. The sort direction. You need to set this parameter if you specify the sortByparameter. | 4.1.0 | |
systemTags | List | query | Optional. The system tags. | 4.1.0 | |
userTags | List | query | Optional. The user tags. | 4.1.0 |
{ "inventories": [ { "user": "example", "hostNum": 10.0, "licenseType": "Free", "issuedDate": "2017-01-19 14:31:06", "managementNodeUuid": "00898b3538e53e70bb7521e54ff80276", "expired": true } ], "total": 1.0 }
Name | Type | Description | Starting Version |
---|---|---|---|
total | Long | The total number of historic license authorizations. This parameter is returned if you set count or replyWithCount to true. | 4.1.0 |
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error | 4.1.0 |
inventory | LicenseInventory | See inventory | 4.1.0 |
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. | 4.1.0 |
description | String | The brief description of the error. | 4.1.0 |
details | String | The details about the error. | 4.1.0 |
elaboration | String | The reserved field. Default value: null. | 4.1.0 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 4.1.0 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 4.1.0 |
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | 4.1.0 | |
licenseType | String | 4.1.0 | |
expiredDate | String | 4.1.0 | |
issuedDate | String | 4.1.0 | |
uploadDate | String | The license update time. | 4.1.0 |
user | String | 4.1.0 | |
prodInfo | String | The license product name. | 4.1.0 |
hostNum | Integer | 4.1.0 | |
cpuNum | Integer | 4.1.0 | |
vmNum | Integer | 4.1.0 | |
expired | boolean | 4.1.0 | |
managementNodeUuid | String | 4.1.0 |
GetLicenseRecordsAction action = new GetLicenseRecordsAction(); action.limit = 20.0; action.start = 0.0; action.replyWithCount = true; action.count = false; action.sortBy = "uploadDate"; action.sortDirection = "desc"; GetLicenseRecordsAction.Result res = action.call();
GetLicenseRecordsAction action = GetLicenseRecordsAction() action.limit = 20.0 action.start = 0.0 action.replyWithCount = true action.count = false action.sortBy = "uploadDate" action.sortDirection = "desc" GetLicenseRecordsAction.Result res = action.call()
GET zstack/v1/licenses/capabilities
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/licenses/capabilities
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
systemTags | List | query | Optional. The system tags. | 0.6 | |
userTags | List | query | Optional. The user tags. | 0.6 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }
GetLicenseCapabilitiesAction action = new GetLicenseCapabilitiesAction(); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; GetLicenseCapabilitiesAction.Result res = action.call();
GetLicenseCapabilitiesAction action = GetLicenseCapabilitiesAction() action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" GetLicenseCapabilitiesAction.Result res = action.call()