GetLicenseInfo

API Request

URLs
GET zstack/v1/licenses
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \ -X GET http://localhost:8080/zstack/v1/licenses?
Request Parameters
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

API Response

Sample Response
{   "inventory": {     "licenseType": "Free",     "licenseRequest": "example request",     "issuedDate": "2017-01-19 14:31:06",     "user": "example",     "hostNum": 10.0,     "expired": true   } }
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
#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 detailed 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
licenseType String 0.6
licenseRequest String 0.6
expiredDate String 0.6
issuedDate String 0.6
user String 0.6
hostNum Integer 0.6
cpuNum Integer 0.6
availableHostNum Integer 0.6
availableCpuNum Integer 0.6
expired boolean 0.6

SDK Sample

Java SDK
GetLicenseInfoAction action = new GetLicenseInfoAction(); GetLicenseInfoAction.Result res = action.call();
Python SDK
GetLicenseInfoAction action = GetLicenseInfoAction() GetLicenseInfoAction.Result res = action.call()

GetLicenseCapabilities

API Request
URLs
GET zstack/v1/licenses/capabilities
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/licenses/capabilities
Request Parameters
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

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,
{     "error": {         "code": "SYS.1001",         "description": "A message or a operation timeout",         "details": "Create VM on KVM timeout after 300s"     } }

SDK Sample

Java SDK
GetLicenseCapabilitiesAction action = new GetLicenseCapabilitiesAction(); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; GetLicenseCapabilitiesAction.Result res = action.call();
Python SDK
GetLicenseCapabilitiesAction action = GetLicenseCapabilitiesAction() action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" GetLicenseCapabilitiesAction.Result res = action.call()

DeleteLicense

API Request

URLs
DELETE /v1/licenses/mn/{managementNodeUuid}/actions?uuid={uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X DELETE http://localhost:8080/zstack/v1/licenses/mn/4a1821df62404868ada349c672e79a5b/actions?uuid=jh34g5uy4g5434i5h45ui93457348
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url Optional. The resource UUID. 0.6
managementNodeUuid String url The management node UUID. 0.6
systemTags List body Optional. 0.6
userTags List body Optional. 0.6

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,
{ 	"error": { 		"code": "SYS.1001", 		"description": "A message or a operation timeout", 		"details": "Create VM on KVM timeout after 300s" 	} }

SDK Sample

Java SDK
DeleteLicenseAction action = new DeleteLicenseAction(); action.managementNodeUuid = "a762967a15a14d69833002d91119c493"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; DeleteLicenseAction.Result res = action.call();
Python SDK
DeleteLicenseAction action = DeleteLicenseAction() action.managementNodeUuid = "32875f270bfc4bdb842ede0b42ed39a3" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" DeleteLicenseAction.Result res = action.call()


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.

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.

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)

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)

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.