System Global
Progress Bar
GetTaskProgress
API Request
GET zstack/v1/task-progresses/{apiId}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 8679db834cfc4b3b93fcbf8521581eff" \
-X GET http://localhost:8080/zstack/v1/task-progresses/7b016e3d2b4647e9abe3183728f77e57?all=false| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| apiId (Optional) | String | url | The API ID of the task | 1.11 | |
| all (Optional) | boolean | query | Specify to get all progress information | 1.11 | |
| systemTags (Optional) | List | query | System tags | 1.11 | |
| userTags (Optional) | List | query | User tags | 1.11 |
API Response
{
"inventories": [
{
"taskUuid": "931102503f64436ea649939ff3957406",
"taskName": "org.zstack.header.vm.APICreateVmInstanceMsg",
"type": "Task",
"content": "Choose backup storage for downloading the image",
"time": 1.510669257141E12
}
]
}| 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 |
| 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 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| taskUuid | String | The task UUID. | 0.6 |
| taskName | String | The task name. | 0.6 |
| parentUuid | String | The parent UUID. | 0.6 |
| type | String | The resource type. | 0.6 |
| content | String | The content. | 0.6 |
| opaque | LinkedHashMap | The opaque. | 0.6 |
| time | Long | The time. | 0.6 |
| totalSteps | Integer | The total steps. | 0.6 |
| currentStep | Integer | The current step. | 0.6 |
| subTasks | List | See subTasks for details | 0.6 |
SDK Examples
GetTaskProgressAction action = new GetTaskProgressAction();
action.apiId = "00c035b586634edeb3bfb21f17e02b40";
action.all = false;
action.sessionId = "dea874a205c04a838e46ff6f48294add";
GetTaskProgressAction.Result res = action.call();GetTaskProgressAction action = GetTaskProgressAction()
action.apiId = "82f5efb211394297b1d6a4f8d5e5618e"
action.all = false
action.sessionId = "2100b95ab4064c81acc5db473b2a1ef6"
GetTaskProgressAction.Result res = action.call()Available Resource Query
GetCpuMemoryCapacity
API Request
GET zstack/v1/hosts/capacities/cpu-memoryAuthorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/hosts/capacities/cpu-memory?zoneUuids=6510dcd4e77939d695b035ecbcfb217c&zoneUuids=33a39cd9391538a4a4d45666e8505dda&clusterUuids=b7c233dd9c573f63b5bb97f50028fa7f&clusterUuids=08d332af6fdb351da456aea3b6b5d029&hostUuids=ba1bfc20682136c4b2f76920af8f010e&hostUuids=b09cd47a6fa93302ae55918ef8da2af4&hypervisorType=KVM&all=true| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| zoneUuids (Optional) | List | query | Data Center UUID | 0.6 | |
| clusterUuids (Optional) | List | query | Cluster UUID. Used for attaching networks, storage, etc. | 0.6 | |
| hostUuids (Optional) | List | query | Host UUID. Used for adding, deleting hosts, etc. | 0.6 | |
| all (Optional) | boolean | query |
|
0.6 | |
| hypervisorType (Optional) | String | query | Optional. The hypervisor type. |
|
0.6 |
| systemTags (Optional) | List | query | System tags | 0.6 | |
| userTags (Optional) | List | query | User tags | 0.6 |
API Response
{
"totalCpu": 4.0,
"availableCpu": 2.0,
"totalMemory": 8.0,
"availableMemory": 4.0,
"managedCpuNum": 4.0,
"capacityData": [
{
"resourceUuid": "db558260b0b53e36aa8ebf7e40c7c9c6",
"totalCpu": 4.0,
"availableCpu": 2.0,
"totalMemory": 8.0,
"availableMemory": 4.0,
"managedCpuNum": 4.0
}
],
"resourceType": "HostVO"
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| totalCpu | long | Total CPU count | 0.6 |
| availableCpu | long | Available CPU count | 0.6 |
| totalMemory | long | Total memory | 0.6 |
| availableMemory | long | Available memory | 0.6 |
| managedCpuNum | long | Number of managed physical CPUs | 2.5.0 |
| resourceType | String | The type of queried resource (Host, Cluster, Data Center) | 3.9.0 |
| success | boolean | Success | 0.6 |
| 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 |
| capacityData | List | See capacityData for details | 3.9.0 |
| error | ErrorCode | See error for details | 0.6 |
| 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 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| resourceUuid | String | Resource UUID | 3.9.0 |
| totalCpu | long | Total CPU count | 3.9.0 |
| availableCpu | long | Available CPU count | 3.9.0 |
| totalMemory | long | Total memory | 3.9.0 |
| availableMemory | long | Available memory | 3.9.0 |
| managedCpuNum | long | Number of managed physical CPUs | 3.9.0 |
| 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 |
SDK Examples
GetCpuMemoryCapacityAction action = new GetCpuMemoryCapacityAction();
action.zoneUuids = asList("79383afd88f54a0b994515d84dbfa447","907c8ca71ee440e3bb0327f19d60754a");
action.clusterUuids = asList("9f5431123b834d95ae642c3cb923ba32","09cdcc7e28f340ccace7c427a32e2c05");
action.hostUuids = asList("2926839176934652ac3c6a77e4ce1484","c1b46284d0dd4d2a8a7637f0d4792d31");
action.hypervisorType = "KVM";
action.all = true;
action.sessionId = "f3aedb623b3c47a7bb215ea3f4be90d7";
GetCpuMemoryCapacityAction.Result res = action.call();GetCpuMemoryCapacityAction action = GetCpuMemoryCapacityAction()
action.zoneUuids = [28cd4ea55a72429d815205b0738b87b3, 2571613b0ba642b7a1c99ddc17aee8e3]
action.clusterUuids = [3e9e56c96fa545fea0b759cb601aad1c, 98ec43d31af446a9bf290b117af95e52]
action.hostUuids = [b5cf96f88a1943f89417d6bea0715b6c, b358d13ac15049a581e47c76183c1358]
action.hypervisorType = "KVM"
action.all = true
action.sessionId = "b0b7e398d33d4d7893255547d0859731"
GetCpuMemoryCapacityAction.Result res = action.call()GetExternalServices
API Request
GET zstack/v1/external/servicesAuthorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/external/services| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| systemTags (Optional) | List | query | System tags | 4.7.0 | |
| userTags (Optional) | List | query | User tags | 4.7.0 |
API Response
{
"inventories": [
{
"name": "prometheus",
"status": "RUNNING",
"capabilities": {
"reloadConfig": true
}
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeded. | 4.7.0 |
| inventories | List | See inventories for details | 4.7.0 |
| error | ErrorCode | The error code. If not null, the operation failed. This field is null when the operation succeeds. See error for details | 4.7.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 4.7.0 |
| status | String | Service status | 4.7.0 |
| capabilities | ExternalServiceCapabilities | See capabilities for details | 4.7.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| reloadConfig | boolean | Supports reloading configuration | 4.7.0 |
| 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 |
SDK Examples
GetExternalServicesAction action = new GetExternalServicesAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetExternalServicesAction.Result res = action.call();GetExternalServicesAction action = GetExternalServicesAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetExternalServicesAction.Result res = action.call()ReloadExternalService
API Request
PUT zstack/v1/external/servicesAuthorization: OAuth the-session-uuid{
"reloadExternalService": {
"name": "prometheus"
},
"systemTags": [],
"userTags": []
}
Note: In the above example, the systemTags and userTags fields are optional. They are listed to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"reloadExternalService":{"name":"prometheus"}}' \
http://localhost:8080/zstack/v1/external/services| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| name | String | body (included in the reloadExternalService structure) |
Resource name | 4.7.0 | |
| systemTags (Optional) | List | body | System tags | 4.7.0 | |
| userTags (Optional) | List | body | User tags | 4.7.0 |
API Response
{}. When an error occurs, the returned JSON structure contains 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 Examples
ReloadExternalServiceAction action = new ReloadExternalServiceAction();
action.name = "prometheus";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ReloadExternalServiceAction.Result res = action.call();ReloadExternalServiceAction action = ReloadExternalServiceAction()
action.name = "prometheus"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
ReloadExternalServiceAction.Result res = action.call()Garbage Collection
TriggerGCJob
API Request
PUT zstack/v1/gc-jobs/{uuid}/actionsAuthorization: OAuth the-session-uuid{
"triggerGCJob": {},
"systemTags": [],
"userTags": []
}
Note: In the above example, the systemTags and userTags fields are optional. They are listed to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"triggerGCJob":{}}' \
http://localhost:8080/zstack/v1/gc-jobs/1450275537b53cfeba9e6ac79ebadb16/actions| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The UUID of the resource. Uniquely identifies the resource | 0.6 | |
| systemTags (Optional) | List | body | Optional. The system tags. | 0.6 | |
| userTags (Optional) | List | body | Optional. The user tags. | 0.6 |
API Response
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Examples
TriggerGCJobAction action = new TriggerGCJobAction();
action.uuid = "ff4eb99f62364bcab4cbcebe4dea7de7";
action.sessionId = "7a51dbf52d5d41b0a877491143b6937a";
TriggerGCJobAction.Result res = action.call();TriggerGCJobAction action = TriggerGCJobAction()
action.uuid = "a1d1ab14128e4f7398924591915ac65c"
action.sessionId = "6dcc50cb3dc5401b8ce03540a225f623"
TriggerGCJobAction.Result res = action.call()DeleteGCJob
API Request
DELETE zstack/v1/gc-jobs/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth ea06449412a24699955ea802430000f3" \
-X DELETE http://localhost:8080/zstack/v1/gc-jobs/3a5d968dd8d743c280888a4973ea71d5| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The UUID of the resource. Uniquely identifies the resource | 0.6 | |
| systemTags (Optional) | List | body | Optional. The system tags. | 0.6 | |
| userTags (Optional) | List | body | Optional. The user tags. | 0.6 |
API Response
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Examples
DeleteGCJobAction action = new DeleteGCJobAction();
action.uuid = "6bac0ebceac44a198609b0019c40a8eb";
action.sessionId = "78e46c7bfe0249fe9613223642222085";
DeleteGCJobAction.Result res = action.call();DeleteGCJobAction action = DeleteGCJobAction()
action.uuid = "42db77385ebf4768bf105011ec8e6aaf"
action.sessionId = "331167c4de264088862128e5043c5a93"
DeleteGCJobAction.Result res = action.call()QueryGCJob
API Request
GET zstack/v1/gc-jobs
GET zstack/v1/gc-jobs/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 8a590138fd064e5b8747e9fa75dd6c63" \
-X GET http://localhost:8080/zstack/v1/gc-jobs?q=name=gc&q=state=Enabledcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 68ab95870cb4460fb9c82360f9ed64b2" \
-X GET http://localhost:8080/zstack/v1/gc-jobs/b41ea820e0bd47d5a028ddb3eb10bb98Queryable Fields
Run the CLI command line tool, enter QueryGCJob and press the Tab key to view all queryable fields and cross-table queryable resource names.
API Response
{
"inventories": [
{
"uuid": "c7606f2ed20b4212aa3d1ce4e00acc1c",
"name": "TestGC",
"type": "TimeBased",
"createDate": "Jun 7, 2017 9:21:16 PM",
"lastOpDate": "Jun 7, 2017 9:21:16 PM"
}
]
}| 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 |
| 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 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the resource. Uniquely identifies the resource | 0.6 |
| name | String | Resource name | 0.6 |
| runnerClass | String | The runner class. | 0.6 |
| context | String | The context. | 0.6 |
| status | String | The resource status. | 0.6 |
| managementNodeUuid | String | The management node UUID. | 0.6 |
| type | String | The resource type. | 0.6 |
| createDate | Timestamp | Creation time | 0.6 |
| lastOpDate | Timestamp | Last modification time | 0.6 |
SDK Examples
QueryGCJobAction action = new QueryGCJobAction();
action.conditions = asList("name=gc","state=Enabled");
action.sessionId = "3b403b588a96471cbee74a19d4a846aa";
QueryGCJobAction.Result res = action.call();QueryGCJobAction action = QueryGCJobAction()
action.conditions = ["name=gc","state=Enabled"]
action.sessionId = "76af9b84c87f4dcf9aa8f9042a982a6b"
QueryGCJobAction.Result res = action.call()License
GetLicenseInfo
Get License Info
API Request
GET zstack/v1/licenses
curl -H "Content-Type: application/json;charset=UTF-8" -X GET http://localhost:8080/zstack/v1/licenses?localOnly=false&licenseServerOnly=false
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| additionSession (Optional) | String | query | Additional information in a JSON string | 3.11.0 | |
| localOnly (Optional) | boolean | query | Query only local authorizations | 5.1.0 | |
| licenseServerOnly (Optional) | boolean | query | Query only authorizations from the authorization server | 5.1.0 | |
| systemTags (Optional) | List | query | System tags | 3.11.0 | |
| userTags (Optional) | List | query | User tags | 3.11.0 |
API Response
{
"inventory": {
"user": "example",
"hostNum": 10,
"licenseType": "Free",
"issuedDate": "2017-01-19T14:31:06.291+08:00",
"managementNodeUuid": "00898b3538e53e70bb7521e54ff80276",
"expired": true,
"platformId": "a95d3ee34r",
"licenseRequest": "example request",
"usage": {
"quotaType": "None",
"quota": 0,
"used": 0,
"available": 0,
"usageDetails": []
}
},
"additions": []
}
| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeded. | 0.6 |
| error | ErrorCode | Error code. If this field is not null, the operation failed. This field is null when the operation succeeds. For details, see error | 0.6 |
| inventory | LicenseInventory | For details, see inventory | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code, which globally and uniquely identifies the error, for example, SYS.1000 or HOST.1001 | 0.6 |
| description | String | Summary description of the error | 0.6 |
| details | String | Details of the error | 0.6 |
| elaboration | String | Reserved field. The default value is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. The default value is null | 0.6 |
| cause | ErrorCode | Root error that caused the current error. This field is null if there is no source error | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| licenseType | String | The license type. | 0.6 |
| licenseRequest | String | The license request. | 0.6 |
| expiredDate | String | The expired date. | 0.6 |
| issuedDate | String | The issued date. | 0.6 |
| user | String | The user. | 0.6 |
| prodInfo | String | License product name | 4.1 |
| hostNum | Integer | The number of host. | 0.6 |
| cpuNum | Integer | The number of CPUs. | 0.6 |
| availableHostNum | Integer | The number of available host. | 0.6 |
| availableCpuNum | Integer | The number of available CPU. | 0.6 |
| expired | boolean | The expired. | 0.6 |
SDK Examples
GetLicenseInfoAction action = new GetLicenseInfoAction();
action.localOnly = false;
action.licenseServerOnly = false;
GetLicenseInfoAction.Result res = action.call();
action = GetLicenseInfoAction()
action.localOnly = false
action.licenseServerOnly = false
res = action.call()
GetLicenseAddOns
Get License Add Ons
API Request
GET zstack/v1/licenses/addons
curl -H "Content-Type: application/json;charset=UTF-8" -X GET http://localhost:8080/zstack/v1/licenses/addons?localOnly=false&licenseServerOnly=false
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| localOnly (Optional) | boolean | query | Query only local authorizations | 5.1.0 | |
| licenseServerOnly (Optional) | boolean | query | Query only authorizations from the authorization server | 5.1.0 | |
| systemTags (Optional) | List | query | Optional. The system tags. | 3.11.0 | |
| userTags (Optional) | List | query | Optional. The user tags. | 3.11.0 |
API Response
{
"addons": []
}
| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeded. | 0.6 |
| error | ErrorCode | Error code. If this field is not null, the operation failed. This field is null when the operation succeeds. For details, see error | 0.6 |
| addons | List | For details, see addons | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code, which globally and uniquely identifies the error, for example, SYS.1000 or HOST.1001 | 0.6 |
| description | String | Summary description of the error | 0.6 |
| details | String | Details of the error | 0.6 |
| elaboration | String | Reserved field. The default value is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. The default value is null | 0.6 |
| cause | ErrorCode | Root error that caused the current error. This field is null if there is no source error | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, which uniquely identifies the resource | 0.6 |
| name | String | Resource name | 0.6 |
| licenseType | String | The license type. | 0.6 |
| expiredDate | String | The expired date. | 0.6 |
| issuedDate | String | The issued date. | 0.6 |
| modules | List | The modules. | 0.6 |
| expired | boolean | The expired. | 0.6 |
SDK Examples
GetLicenseAddOnsAction action = new GetLicenseAddOnsAction();
action.localOnly = false;
action.licenseServerOnly = false;
GetLicenseAddOnsAction.Result res = action.call();
action = GetLicenseAddOnsAction()
action.localOnly = false
action.licenseServerOnly = false
res = action.call()
GetLicenseUsages
Get License Usages
API Request
GET zstack/v1/licenses/usages
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/usages?licenseTypes=platform
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| licenseTypes (Optional) | List | query | List of license types. platform indicates the primary license; other values are add-on module names, such as disaster-recovery. If omitted or empty, the default is [platform] | 5.1.0 | |
| systemTags (Optional) | List | query | System tags | 5.1.0 | |
| userTags (Optional) | List | query | User tags | 5.1.0 |
API Response
SDK Examples
GetLicenseUsagesAction action = new GetLicenseUsagesAction();
action.licenseTypes = asList("platform");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetLicenseUsagesAction.Result res = action.call();
action = GetLicenseUsagesAction()
action.licenseTypes = [platform]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
GetMyLicenseClientAppId
Get My License Client App Id
API Request
GET zstack/v1/license-client/my-app-id
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/license-client/my-app-id?
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| systemTags (Optional) | List | query | System tags | 5.1.0 | |
| userTags (Optional) | List | query | User tags | 5.1.0 |
API Response
{
"appId": "ff003f16a1de37f69d377dfdc39cc300"
}
| Name | Type | Description | Starting Version |
|---|---|---|---|
| appId | String | APP ID of the current license client | 5.1.0 |
| success | boolean | Whether the get operation succeeded | 5.1.0 |
| error | ErrorCode | For details, see error | 5.1.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code, which globally and uniquely identifies the error, for example, SYS.1000 or HOST.1001 | 0.6 |
| description | String | Summary description of the error | 0.6 |
| details | String | Details of the error | 0.6 |
| elaboration | String | Reserved field. The default value is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. The default value is null | 0.6 |
| cause | ErrorCode | Root error that caused the current error. This field is null if there is no source error | 0.6 |
SDK Examples
GetMyLicenseClientAppIdAction action = new GetMyLicenseClientAppIdAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetMyLicenseClientAppIdAction.Result res = action.call();
action = GetMyLicenseClientAppIdAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
GetLicenseRecords
Get License Records
API Request
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&start=0&replyWithCount=true&count=false&sortBy=uploadDate&sortDirection=desc
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| limit (Optional) | Integer | query | Maximum number of records to return, similar to the MySQL limit. The default value is 20 | 3.11 | |
| start (Optional) | Integer | query | Starting position of the queried records, similar to the MySQL offset. Used with limit to implement pagination |
3.11 | |
| replyWithCount (Optional) | boolean | query | Count query that specifies whether to additionally return the number of data records. When set to true, the API returns data records and the number of records that meet the query conditions |
3.11 | |
| count (Optional) | boolean | query | Count query, equivalent to the MySQL count() function. When set to true, the API returns only the number of records that meet the query conditions |
3.11 | |
| sortBy (Optional) | String | query | Sort by field, equivalent to the MySQL sort by keyword, for example, sortBy=ip. This parameter must be used with sortDirection is used together |
|
3.11 |
| sortDirection (Optional) | String | query | Field sort direction. This parameter must be used with sortBy is used together |
|
3.11 |
| systemTags (Optional) | List | query | System tags | 3.11 | |
| userTags (Optional) | List | query | User tags | 3.11 |
API Response
{
"inventories": [
{
"id": 0,
"uuid": "ff0791ffeb0533f092d176d05617db00",
"quota": 32,
"quotaType": "CPUSocket",
"expiredDate": "1970-01-18T13:47:25.257Z",
"issuedDate": "1970-01-18T10:54:37.257Z",
"uploadDate": "1970-01-18T11:09:01.257Z",
"licenseType": "Paid",
"prodInfo": "Basic.ZSV",
"userName": "cloud",
"hash": "ff03d47b50873a4db2e41e730c6b0300",
"source": "UploadFile",
"cause": "UpdateLicense",
"managementNodeUuid": "ff000842a4673ab39dad7a3990df5300",
"mergedTo": 1,
"createDate": "Nov 14, 2017 2:20:57 PM",
"expired": false
}
],
"total": 1
}
| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeded. | 0.6 |
| total | Long | Total license history authorization data count. This value is returned when count or replyWithCount is set to true | 4.1 |
| error | ErrorCode | Error code. If this field is not null, the operation failed. This field is null when the operation succeeds. For details, see error | 0.6 |
| inventories | List | For details, see inventories | 4.1 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code, which globally and uniquely identifies the error, for example, SYS.1000 or HOST.1001 | 0.6 |
| description | String | Summary description of the error | 0.6 |
| details | String | Details of the error | 0.6 |
| elaboration | String | Reserved field. The default value is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. The default value is null | 0.6 |
| cause | ErrorCode | Root error that caused the current error. This field is null if there is no source error | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| licenseType | String | The license type. | 0.6 |
| licenseRequest | String | The license request. | 0.6 |
| expiredDate | String | The expired date. | 0.6 |
| issuedDate | String | The issued date. | 0.6 |
| user | String | The user. | 0.6 |
| prodInfo | String | License product name | 4.1 |
| hostNum | Integer | The number of host. | 0.6 |
| cpuNum | Integer | The number of CPUs. | 0.6 |
| availableHostNum | Integer | The number of available host. | 0.6 |
| availableCpuNum | Integer | The number of available CPU. | 0.6 |
| expired | boolean | The expired. | 0.6 |
SDK Examples
GetLicenseRecordsAction action = new GetLicenseRecordsAction();
action.limit = 20;
action.start = 0;
action.replyWithCount = true;
action.count = false;
action.sortBy = "uploadDate";
action.sortDirection = "desc";
GetLicenseRecordsAction.Result res = action.call();
action = GetLicenseRecordsAction()
action.limit = 20
action.start = 0
action.replyWithCount = true
action.count = false
action.sortBy = "uploadDate"
action.sortDirection = "desc"
res = action.call()
GetLicenseCapabilities
API Request
GET zstack/v1/licenses/capabilitiesAuthorization: OAuth the-session-uuidcurl -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 | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| systemTags (Optional) | List | query | System tags | 0.6 | |
| userTags (Optional) | List | query | User tags | 0.6 |
API Response
{}. On failure, the returned JSON structure contains 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 Examples
GetLicenseCapabilitiesAction action = new GetLicenseCapabilitiesAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetLicenseCapabilitiesAction.Result res = action.call();GetLicenseCapabilitiesAction action = GetLicenseCapabilitiesAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetLicenseCapabilitiesAction.Result res = action.call()DeleteLicense
API Request
DELETE /v1/licenses/mn/{managementNodeUuid}/actions?uuid={uuid}Authorization: OAuth the-session-uuidcurl -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| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid (Optional) | String | url | The UUID of the resource. Uniquely identifies the resource. | 0.6 | |
| managementNodeUuid | String | url | The UUID of the management node | 0.6 | |
| systemTags (Optional) | List | body | Optional. The system tags. | 0.6 | |
| userTags (Optional) | List | body | Optional. The user tags. | 0.6 |
API Response
{}. On failure, the returned JSON structure contains 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 Examples
DeleteLicenseAction action = new DeleteLicenseAction();
action.managementNodeUuid = "a762967a15a14d69833002d91119c493";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteLicenseAction.Result res = action.call();DeleteLicenseAction action = DeleteLicenseAction()
action.managementNodeUuid = "32875f270bfc4bdb842ede0b42ed39a3"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteLicenseAction.Result res = action.call()ReloadLicense
Reload License
API Request
PUT zstack/v1/licenses/actions
Authorization: OAuth the-session-uuid
{
"reloadLicense": {
"managementNodeUuids": [
"839034e1da8e37a08b67e3a8279a1650",
"7869acf9b8bd34079f14a93751e60810"
]
},
"systemTags": [],
"userTags": []
}
Note: In the preceding example, the systemTags and userTags fields can be omitted. They are shown to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X PUT -d '{"reloadLicense":{"managementNodeUuids":["839034e1da8e37a08b67e3a8279a1650","7869acf9b8bd34079f14a93751e60810"]}}' http://localhost:8080/zstack/v1/licenses/actions
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| managementNodeUuids (Optional) | List | body (included in the reloadLicense structure) |
Management Node UUID | 0.6 | |
| systemTags (Optional) | List | body | System tags | 0.6 | |
| userTags (Optional) | List | body | User tags | 0.6 |
API Response
{
"inventory": {
"user": " example@mevoco.com",
"hostNum": 10,
"expiredDate": "2017-02-05 19:44:21",
"issuedDate": " 2017-01-06 19:44:21",
"managementNodeUuid": "00f6cb270fb439d2a8a6dac5b4abf80c",
"expired": true,
"platformId": "a95d3ee34r",
"licenseRequest": "eyJwcml2YXRlS2V5IjoiLS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLVxuTUlJRWhnSUJBQUtCL0RjMGtxWGl2UmRPTGRWeC8xK1MzMUtaejNQd1dkek9ob3NvY29rU2wwdnBxYzc2cHF1V1xubDNwQ0FWZ01UaG1OUlo1Z05xaVM2MWdvcmY4WkY3eHBGUWd1cms0WjZxVEl3aDc3emo2NEhPMHBmYnpndzFmL1xuMm9Ga3l1N25GQU5wamxMUEpxalYva0xwL3RVeGpqY0w0ZG9TcDY1TGM3a2lrOXY1aTBpeXlYZEs5dWJsTnFNNVxuV2VNNWdFLzdzeG5IZS9TbFY1Nk1UeWtDeUdpbGVMMmwvUFlmQ2JuYUN4ZG9oOERzKzJ2RnpJaFZ3RWwyYkppZ1xuQkptMlU3VzNKZzltWGZEb2dDTHMyMTE4TXdDUGFQVWVMRTArWlBBNUduL2ZxZUZad2hDMElMcnM3ZTZyZThxK1xuVWpBN2RXeVoxVm50Y0xiWGUxbW94Vm1DSWx4VWd3SURBUUFCQW9IOE1JMXRXTFkxQmhVOUhGZVplVTRzV1hKclxuVVJXWGd5cWtqQ2t6cXJpT0ZqYllvUEF6dS8vREU4U1BlQWZDZkppU0hUdVRkdWxZVVAzZUlkakkxbTA1RVN3MVxuSXYyS01BbGRLWERmTUt3dXpLck1LbDBua1BLMkUwMDVhYW9VSVBncU0weDdQTXlRUmZ1VW81NWs3S2JucVNyMVxuRE1iUmJZY3FzYklrdlBoNGhOK3V0bHNvb3dFM0FZQ1FxNjkrL3NkVzhRd0V6dTRiOG9oYzFCWlJXUC9MdHhrUVxuemdxSVo4Qkw1R1BoLy9RN2xEeGZEa1d4Nkpia0o5blEyWVJKbnBSZGhYTk1mZndValpRRG9wcmhKbi9IektSdFxueWZDc1d5UUttSjBvMlJYVzBEczdycS9SeXJVelc5UElseHlqSnBBSEhMeUI0UndRUUhqbGVZczVBbjV6a0xSU1xuNGlhZFRGZFVZdi9UV0xvcVRtQ25ZNURmUWlnUTBqajNNRE0xRERmWUtKa2szazBHSkh6cjQ2WlZiaWRqMEdhU1xuaXNqc3l3RERtN2wxM1BSL1ZFRVo0bDk5L2F2OFY0bGs5ZkZVYmp5MG5sWEZZcjAzZ2NLZDBCYnlPbk84dU5MM1xuOUpWeG9GVUNqaG1HSm1WQk1tTXFXMjN1L013Y1l5b2pnbjhDZm5wS2RTWHd2ZCtrSzUycEwyWC9kQlBYcnhFU1xuT2hyYXpVN1lPamdKM2VuWVpVRG5oOEhFOGtzRTVVSk9RZDZ4enU4N2xmU1FkTEZnT29DdzFlSVVZNTl3TFdxTVxuRE9qaXdXdDlQdjBGSnFtOVBKaHpkTmZ3dVJhSU9QbDI3WTZ5ejVRQkRrcnIvOTdtODB6d21KYWxhNjkwV2VPbFxuSU9jcE85ekVqUk1qL1FKK09DUGF4Y3poRDFjUHNZbnFWMlJxQTdWUmxOOTBlRkN1SUFYUDhKMDBzeGQ5WlgvTFxuYmJLa1hsQ0pjeHFES2tzNXpXNW05ZGQvNWpCejdaS1AxT2NDeTN4RnArcGxrMUlSSTZQdXRlSVlXM2kxK3RSVVxuUEhCTUZWUHZGRFVMZ0o3T3JLWm9ybFhkNTNZSTloWEw1blJ1aWU2TlovMUVlVzNMUmhzU1ZHL0hBbjVrV2NOR1xuRGdhUmhiTnczZ3VTSkkwSlYxMUdvZkZpWmhoQjBmZjhVa1J6QjJzWFZxYzFYN3IveXBXaTBuc0ZGbDNjUE1ZeFxuK1hSNHRhRnNSekJNSkRVWCtjS2JBeS80ejFLdk5RakNNajdtM08zam9DTEtyTFFGaEdWVWVMNDU4Z3VheFQ4SVxuUmg4aXQ5d0JVQkcyMVNuSHdhK2R1YnlGVkhYV0ZNZzdZN1VDZm1TQWlyd0V0UFVkVUJId1dwY2Q4aFlqdHU1QlxuZWkzajQ5R1lmV1JYand0N3lLNnJheVpldE9KekJLNGZ5Ynp1a0ZjbkF4TzRtTmxGZnI5cWprc0tmTXBWMGVyU1xuTHYwVjhnSDRRYVZpQ0hqcDYxR1ZaeHcyaUp1OUxsZmNsK2x0Wjh0dURaNzA5MjRFWkpUY1FNN0RjQVcwY3ZKZlxudXFCNFRGYWNzbFNBTFFcdTAwM2RcdTAwM2Rcbi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tXG4iLCJsaWNlbnNlUmVxdWVzdCI6ImV5SjBhSFZ0WW5CeWFXNTBJam9pWlhsS2FtTklWblJpTWxKc1lrTkpOa2xyYkhWa1IxWnpTMFpKY0VsRlRuWmpiVlZ2VmtVd2NFbEhhek5NVkZFelQxUkJaMUV4UWxaSlJVRm5UWGswTWsxRlpFbGxhVWx6U1cxT2QyUllUV2xQYVVsNVNXbDNhVnB0UlRaWmFrazJXbTFKTmxsNlZUWk9la0UyVFVSQmFVOXBTbXhrUjJoc1kybEpjMGx0YUhaak0xSjFXVmN4YkVscWIybE5WRUYwVFVNd2VFNTZWWFJOYWxFMVNXbDNhV0pYVm5SaFZ6VnlXV2xKTmtscVRUUlBSRVUxVFhwWmFVeERTbnBsV0U0eFpGZHNhMGxxYjJsTlZWbDZUV3BHUjFKVVRYUk5ha0Y0VVhrd01GRjZRa05NVlVWNVVrVlZkRkZxWjNsTmFsRjVUa1ZaTVZKRVkzcEphWGRwWkcxV2VXTXliSFppYVVrMlNXcEJkVTFUU2praUxDSndkV0pyWlhraU9pSXRMUzB0TFVKRlIwbE9JRkJWUWt4SlF5QkxSVmt0TFMwdExWeHVUVWxKUWtoRVFVNUNaMnR4YUd0cFJ6bDNNRUpCVVVWR1FVRlBRMEZSYTBGTlNVbENRa0ZMUWk5RVl6QnJjVmhwZGxKa1QweGtWbmd2TVN0VE16RkxXbHh1ZWpOUWQxZGtlazlvYjNOdlkyOXJVMnd3ZG5CeFl6YzJjSEYxVjJ3emNFTkJWbWROVkdodFRsSmFOV2RPY1dsVE5qRm5iM0ptT0ZwR04zaHdSbEZuZFZ4dWNtczBXalp4VkVsM2FEYzNlbW8yTkVoUE1IQm1ZbnBuZHpGbUx6SnZSbXQ1ZFRkdVJrRk9jR3BzVEZCS2NXcFdMMnRNY0M5MFZYaHFhbU5NTkdSdlUxeHVjRFkxVEdNM2EybHJPWFkxYVRCcGVYbFlaRXM1ZFdKc1RuRk5OVmRsVFRWblJTODNjM2h1U0dVdlUyeFdOVFpOVkhsclEzbEhhV3hsVERKc0wxQlpabHh1UTJKdVlVTjRaRzlvT0VSekt6SjJSbnBKYUZaM1JXd3lZa3BwWjBKS2JUSlZOMWN6U21jNWJWaG1SRzluUTB4ek1qRXhPRTEzUTFCaFVGVmxURVV3SzF4dVdsQkJOVWR1TDJXA12SAWlRoeEsxVnFRVGRrVjNsYU1WWnVkR05NWWxobE1XMXZlRlp0UTBsc2VGVm5kMGxFUVZGQlFseHVMUzB0TFMxRlRrUWdVRlZDVEVsRElFdEZXUzB0TFMwdFhHNGlmUVx1MDAzZFx1MDAzZCJ9",
"usage": {
"quotaType": "None",
"quota": 0,
"used": 0,
"available": 0,
"usageDetails": []
}
}
}
| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeded. | 0.6 |
| error | ErrorCode | Error code. If this field is not null, the operation failed. This field is null when the operation succeeds. For details, see error | 0.6 |
| inventory | LicenseInventory | For details, see inventory | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code, which globally and uniquely identifies the error, for example, SYS.1000 or HOST.1001 | 0.6 |
| description | String | Summary description of the error | 0.6 |
| details | String | Details of the error | 0.6 |
| elaboration | String | Reserved field. The default value is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. The default value is null | 0.6 |
| cause | ErrorCode | Root error that caused the current error. This field is null if there is no source error | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| licenseType | String | The license type. | 0.6 |
| licenseRequest | String | The license request. | 0.6 |
| expiredDate | String | The expired date. | 0.6 |
| issuedDate | String | The issued date. | 0.6 |
| user | String | The user. | 0.6 |
| prodInfo | String | License product name | 4.1 |
| hostNum | Integer | The number of host. | 0.6 |
| cpuNum | Integer | The number of CPUs. | 0.6 |
| availableHostNum | Integer | The number of available host. | 0.6 |
| availableCpuNum | Integer | The number of available CPU. | 0.6 |
| expired | boolean | The expired. | 0.6 |
SDK Examples
ReloadLicenseAction action = new ReloadLicenseAction();
action.managementNodeUuids = asList("839034e1da8e37a08b67e3a8279a1650","7869acf9b8bd34079f14a93751e60810");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ReloadLicenseAction.Result res = action.call();
action = ReloadLicenseAction()
action.managementNodeUuids = [839034e1da8e37a08b67e3a8279a1650, 7869acf9b8bd34079f14a93751e60810]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
UpdateLicense
API Request
PUT zstack/v1/licenses/mn/{managementNodeUuid}/actionsAuthorization: OAuth the-session-uuid{
"updateLicense": {
"license": "this is license string"
},
"systemTags": [],
"userTags": []
}
Note: In the above example, the systemTags and userTags fields are optional. They are listed to indicate that these two fields can be included in the body.curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateLicense":{"license":"this is license string"}}' \
http://localhost:8080/zstack/v1/licenses/mn/f03b0d69643038f9812edbf4b259cac1/actions| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| managementNodeUuid | String | url | Management node UUID | 0.6 | |
| license | String | body (contained in the updateLicense structure) | The base64-encoded license content | 0.6 | |
| additionSession (Optional) | String | body (contained in the updateLicense structure) | Additional information in a JSON string | 4.1.0 | |
| systemTags (Optional) | List | body | Optional. The system tags. | 0.6 | |
| userTags (Optional) | List | body | Optional. The user tags. | 0.6 |
API Response
{
"inventory": {
"licenseRequest": "eyJwcml2YXRlS2V5IjoiLS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLVxuTUlJRWhnSUJBQUtCL0RjMGtxWGl2UmRPTGRWeC8xK1MzMUtaejNQd1dkek9ob3NvY29rU2wwdnBxYzc2cHF1V1xubDNwQ0FWZ01UaG1OUlo1Z05xaVM2MWdvcmY4WkY3eHBGUWd1cms0WjZxVEl3aDc3emo2NEhPMHBmYnpndzFmL1xuMm9Ga3l1N25GQU5wamxMUEpxalYva0xwL3RVeGpqY0w0ZG9TcDY1TGM3a2lrOXY1aTBpeXlYZEs5dWJsTnFNNVxuV2VNNWdFLzdzeG5IZS9TbFY1Nk1UeWtDeUdpbGVMMmwvUFlmQ2JuYUN4ZG9oOERzKzJ2RnpJaFZ3RWwyYkppZ1xuQkptMlU3VzNKZzltWGZEb2dDTHMyMTE4TXdDUGFQVWVMRTArWlBBNUduL2ZxZUZad2hDMElMcnM3ZTZyZThxK1xuVWpBN2RXeVoxVm50Y0xiWGUxbW94Vm1DSWx4VWd3SURBUUFCQW9IOE1JMXRXTFkxQmhVOUhGZVplVTRzV1hKclxuVVJXWGd5cWtqQ2t6cXJpT0ZqYllvUEF6dS8vREU4U1BlQWZDZkppU0hUdVRkdWxZVVAzZUlkakkxbTA1RVN3MVxuSXYyS01BbGRLWERmTUt3dXpLck1LbDBua1BLMkUwMDVhYW9VSVBncU0weDdQTXlRUmZ1VW81NWs3S2JucVNyMVxuRE1iUmJZY3FzYklrdlBoNGhOK3V0bHNvb3dFM0FZQ1FxNjkrL3NkVzhRd0V6dTRiOG9oYzFCWlJXUC9MdHhrUVxuemdxSVo4Qkw1R1BoLy9RN2xEeGZEa1d4Nkpia0o5blEyWVJKbnBSZGhYTk1mZndValpRRG9wcmhKbi9IektSdFxueWZDc1d5UUttSjBvMlJYVzBEczdycS9SeXJVelc5UElseHlqSnBBSEhMeUI0UndRUUhqbGVZczVBbjV6a0xSU1xuNGlhZFRGZFVZdi9UV0xvcVRtQ25ZNURmUWlnUTBqajNNRE0xRERmWUtKa2szazBHSkh6cjQ2WlZiaWRqMEdhU1xuaXNqc3l3RERtN2wxM1BSL1ZFRVo0bDk5L2F2OFY0bGs5ZkZVYmp5MG5sWEZZcjAzZ2NLZDBCYnlPbk84dU5MM1xuOUpWeG9GVUNqaG1HSm1WQk1tTXFXMjN1L013Y1l5b2pnbjhDZm5wS2RTWHd2ZCtrSzUycEwyWC9kQlBYcnhFU1xuT2hyYXpVN1lPamdKM2VuWVpVRG5oOEhFOGtzRTVVSk9RZDZ4enU4N2xmU1FkTEZnT29DdzFlSVVZNTl3TFdxTVxuRE9qaXdXdDlQdjBGSnFtOVBKaHpkTmZ3dVJhSU9QbDI3WTZ5ejVRQkRrcnIvOTdtODB6d21KYWxhNjkwV2VPbFxuSU9jcE85ekVqUk1qL1FKK09DUGF4Y3poRDFjUHNZbnFWMlJxQTdWUmxOOTBlRkN1SUFYUDhKMDBzeGQ5WlgvTFxuYmJLa1hsQ0pjeHFFS2tzNXpXNW05ZGQvNWpCejdaS1AxT2NDeTN4RnArcGxrMUlSSTZQdXRlSVlXM2kxK3RSVVxuUEhCTUZWUHZGRFVMZ0o3T3JLWm9ybFhkNTNZSTloWEw1blJ1aWU2TlovMUVlVzNMUmhzU1ZHL0hBbjVrV2NOR1xuRGdhUmhiTnczZ3VTSkkwSlYxMUdvZkZpWmhoQjBmZjhVa1J6QjJzWFZxYzFYN3IveXBXaTBuc0ZGbDNjUE1ZeFxuK1hSNHRhRnNSekJNSkRVWCtjS2JBeS80ejFLdk5RakNNajdtM08zam9DTEtyTFFGaEdWVWVMNDU4Z3VheFQ0SVxuUmg4aXQ5d0JVQkcyMVNuSHdhK2R1YnlGVkhYV0ZNZzdZN1VDZm1TQWlyd0V0UFVkVUJId1dwY2Q4aFlqdHU1QlxuZWkzajQ5R1lmV1JYand0N3lLNnJheVpldE9KekJLNGZ5Ynp1a0ZjbkF4TzRtTmxGZnI5cWprc0tmTXBWMGVyU1xuTHYwVjhnSDRRYVZpQ0hqcDYxR1ZaeHcyaUp1OUxsZmNsK2x0Wjh0dURaNzA5MjRFWkpUY1FNN0RjQVcwY3ZKZlxudXFCNFRGYWNzbFNBTFFcdTAwM2RcdTAwM2Rcbi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tXG4iLCJsaWNlbnNlUmVxdWVzdCI6ImV5SjBhSFZ0WW5CeWFXNTBJam9pWlhsS2FtTklWblJpTWxKc1lrTkpOa2xyYkhWa1IxWnpTMFpKY0VsRlRuWmpiVlZ2VmtVd2NFbEhhek5NVkZFelQxUkJaMUV4UWxaSlJVRm5UWGswTWsxRlpFbGxhVWx6U1cxT2QyUllUV2xQYVVsNVNXbDNhVnB0UlRaWmFrazJXbTFKTmxsNlZUWk9la0UyVFVSQmFVOXBTbXhrUjJoc1kybEpjMGx0YUhaak0xSjFXVmN4YkVscWIybE5WRUYwVFVNd2VFNTZWWFJOYWxFMVNXbDNhV0pYVm5SaFZ6VnlXV2xKTmtscVRUUlBSRVUxVFhwWmFVeERTbnBsV0U0eFpGZHNhMGxxYjJsTlZWbDZUV3BHUjFKVVRYUk5ha0Y0VVhrd01GRjZRa05NVlVWNVVrVlZkRkZxWjNsTmFsRjVUa1ZaTVZKRVkzcEphWGRwWkcxV2VXTXliSFppYVVrMlNXcEJkVTFUU2praUxDSndkV0pyWlhraU9pSXRMUzB0TFVKRlIwbE9JRkJWUWt4SlF5QkxSVmt0TFMwdExWeHVUVWxKUWtoRVFVNUNaMnR4YUd0cFJ6bDNNRUpCVVVWR1FVRlBRMEZSYTBGTlNVbENRa0ZMUWk5RVl6QnJjVmhwZGxKa1QweGtWbmd2TVN0VE16RkxXbHh1ZWpOUWQxZGtlazlvYjNOdlkyOXJVMnd3ZG5CeFl6YzJjSEYxVjJ3emNFTkJWbWROVkdodFRsSmFOV2RPY1dsVE5qRm5iM0ptT0ZwR04zaHdSbEZuZFZ4dWNtczBXalp4VkVsM2FEYzNlbW8yTkVoUE1IQm1ZbnBuZHpGbUx6SnZSbXQ1ZFRkdVJrRk9jR3BzVEZCS2NXcFdMMnRNY0M5MFZYaHFhbU5NTkdSdlUxeHVjRFkxVEdNM2EybHJPWFkxYVRCcGVYbFlaRXM1ZFdKc1RuRk5OVmRsVFRWblJTODNjM2h1U0dVdlUyeFdOVFpOVkhsclEzbEhhV3hsVERKc0wxQlpabHh1UTJKdVlVTjRaRzlvT0VSekt6SjJSbnBKYUZaM1JXd3lZa3BwWjBKS2JUSlZOMWN6U21jNWJWaG1SRzluUTB4ek1qRXhPRTEzUTFCaFVGVmxURVV3SzF4dVdsQkJOVWR1TDJXA12SAWlRoeEsxVnFRVGRrVjNsYU1WWnVkR05NWWxobE1XMXZlRlp0UTBsc2VGVm5kMGxFUVZGQlFseHVMUzB0TFMxRlRrUWdVRlZDVEVsRElFdEZXUzB0TFMwdFhHNGlmUVx1MDAzZFx1MDAzZCJ9",
"expiredDate": "2017-02-05 19:44:21",
"issuedDate": " 2017-01-06 19:44:21",
"user": " example@mevoco.com",
"hostNum": 10.0,
"expired": true
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, such as 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 | A reserved field. Default is null. | 0.6 |
| opaque | LinkedHashMap | A reserved field. Default is null. | 0.6 |
| cause | ErrorCode | The root error. The source error that caused the current error. This field is null if there is no root error. | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| licenseType | String | The license type. | 0.6 |
| licenseRequest | String | The license request. | 0.6 |
| expiredDate | String | The expired date. | 0.6 |
| issuedDate | String | The issued date. | 0.6 |
| user | String | The user. | 0.6 |
| hostNum | Integer | The number of host. | 0.6 |
| cpuNum | Integer | The number of CPUs. | 0.6 |
| availableHostNum | Integer | The number of available host. | 0.6 |
| availableCpuNum | Integer | The number of available CPU. | 0.6 |
| expired | boolean | The expired. | 0.6 |
SDK Examples
UpdateLicenseAction action = new UpdateLicenseAction();
action.managementNodeUuid = "f03b0d69643038f9812edbf4b259cac1";
action.license = "this is license string";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateLicenseAction.Result res = action.call();UpdateLicenseAction action = UpdateLicenseAction()
action.managementNodeUuid = "f03b0d69643038f9812edbf4b259cac1"
action.license = "this is license string"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateLicenseAction.Result res = action.call()RegisterLicenseRequestedApplication
Register License Requested Application
API Request
POST zstack/v1/licenses/applications
Authorization: OAuth the-session-uuid
{
"params": {
"licenseRequestCode": "example request code"
},
"systemTags": [],
"userTags": []
}
Note: In the preceding example, the systemTags and userTags fields can be omitted. They are shown to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X POST -d '{"params":{"licenseRequestCode":"example request code"}}' http://localhost:8080/zstack/v1/licenses/applications
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| licenseRequestCode | String | body (included in the params structure) |
The license request code. | 0.6 | |
| clientPubKey (Optional) | String | body (included in the params structure) |
Optional. The client pub key. | 0.6 | |
| currentTimeMillis (Optional) | Long | body (included in the params structure) |
Client timestamp used to check time synchronization between the two sides | 5.1.0 | |
| systemTags (Optional) | List | body | System tags | 0.6 | |
| userTags (Optional) | List | body | User tags | 0.6 |
API Response
{
"appId": "6568cda2a0863a4188a26fbdb740681e"
}
| Name | Type | Description | Starting Version |
|---|---|---|---|
| appId | String | The app ID. | 0.6 |
| servicePubKey | String | The service pub key. | 0.6 |
| success | boolean | Whether the operation succeeded. | 0.6 |
| error | ErrorCode | Error code. If this field is not null, the operation failed. This field is null when the operation succeeds. For details, see error | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code, which globally and uniquely identifies the error, for example, SYS.1000 or HOST.1001 | 0.6 |
| description | String | Summary description of the error | 0.6 |
| details | String | Details of the error | 0.6 |
| elaboration | String | Reserved field. The default value is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. The default value is null | 0.6 |
| cause | ErrorCode | Root error that caused the current error. This field is null if there is no source error | 0.6 |
SDK Examples
RegisterLicenseRequestedApplicationAction action = new RegisterLicenseRequestedApplicationAction();
action.licenseRequestCode = "example request code";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RegisterLicenseRequestedApplicationAction.Result res = action.call();
action = RegisterLicenseRequestedApplicationAction()
action.licenseRequestCode = "example request code"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
RegisterLicenseServer
Register License Server
API Request
POST zstack/v1/license-server/client
Authorization: OAuth the-session-uuid
{
"params": {
"ip": "172.20.20.20",
"loginParams": {
"password": "sos-admin-password",
"username": "sos-admin"
},
"protocol": "Normal"
},
"systemTags": [],
"userTags": []
}
Note: In the preceding example, the systemTags and userTags fields can be omitted. They are shown to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X POST -d '{"params":{"ip":"172.20.20.20","loginParams":{"password":"sos-admin-password","username":"sos-admin"},"protocol":"Normal"}}' http://localhost:8080/zstack/v1/license-server/client
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| ip | String | body (included in the params structure) |
Authorization server IP address | 5.1.0 | |
| port (Optional) | Integer | body (included in the params structure) |
Authorization server port number | 5.1.0 | |
| loginParams (Optional) | Map | body (included in the params structure) |
Parameters required to log in to the authorization server | 5.1.0 | |
| protocol (Optional) | String | body (included in the params structure) |
Protocol used to log in to the authorization server |
|
5.1.0 |
| systemTags (Optional) | List | body | System tags | 5.1.0 | |
| userTags (Optional) | List | body | User tags | 5.1.0 |
API Response
SDK Examples
Java SDK
The Java SDK example could not be generated automatically
Python SDK
The Python SDK example could not be generated automatically
VerifyLicenseServer
Verify License Server
API Request
POST zstack/v1/license-server/register-verify
Authorization: OAuth the-session-uuid
{
"params": {
"appId": "ca667f9fcd013d57b79ffd9b8d897bd8",
"clientAccessKeyId": "1234567890abcdedfghij",
"clientAccessKeySecret": "******"
},
"systemTags": [],
"userTags": []
}
Note: In the preceding example, the systemTags and userTags fields can be omitted. They are shown to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X POST -d '{"params":{"appId":"ca667f9fcd013d57b79ffd9b8d897bd8","clientAccessKeyId":"1234567890abcdedfghij","clientAccessKeySecret":"******"}}' http://localhost:8080/zstack/v1/license-server/register-verify
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| appId | String | body (included in the params structure) |
APP ID used when the local management node registers with the authorization server | 5.1.0 | |
| clientAccessKeyId | String | body (included in the params structure) |
Passwordless login ID used by the authorization server to log in to itself | 5.1.0 | |
| clientAccessKeySecret | String | body (included in the params structure) |
Passwordless login credential used by the authorization server to log in to itself | 5.1.0 | |
| systemTags (Optional) | List | body | System tags | 5.1.0 | |
| userTags (Optional) | List | body | User tags | 5.1.0 |
API Response
SDK Examples
VerifyLicenseServerAction action = new VerifyLicenseServerAction();
action.appId = "ca667f9fcd013d57b79ffd9b8d897bd8";
action.clientAccessKeyId = "1234567890abcdedfghij";
action.clientAccessKeySecret = "******";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
VerifyLicenseServerAction.Result res = action.call();
action = VerifyLicenseServerAction()
action.appId = "ca667f9fcd013d57b79ffd9b8d897bd8"
action.clientAccessKeyId = "1234567890abcdedfghij"
action.clientAccessKeySecret = "******"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
RequestLicenseCapacity
Request License Capacity
API Request
POST zstack/v1/license-server/capacity-application
Authorization: OAuth the-session-uuid
{
"params": {
"resourceUuid": "ff01ec80fd11327cba7519b66119d900",
"quotaType": "CPUSocket",
"quota": 24,
"clientAuthorizedNodeUuid": "ff003f16a1de37f69d377dfdc39cc300",
"licenseType": "platform",
"resourceInfo": "ff00edf850633a37b727ce0ccfb03500"
},
"systemTags": [],
"userTags": []
}
Note: In the preceding example, the systemTags and userTags fields can be omitted. They are shown to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X POST -d '{"params":{"resourceUuid":"ff01ec80fd11327cba7519b66119d900","quotaType":"CPUSocket","quota":24,"clientAuthorizedNodeUuid":"ff003f16a1de37f69d377dfdc39cc300","licenseType":"platform","resourceInfo":"ff00edf850633a37b727ce0ccfb03500"}}' http://localhost:8080/zstack/v1/license-server/capacity-application
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| resourceUuid | String | body (included in the params structure) |
UUID of the resource bound to the license quota | 5.1.0 | |
| quotaType | String | body (included in the params structure) |
Requested quota type |
|
5.1.0 |
| quota | Long | body (included in the params structure) |
Requested quota amount | 5.1.0 | |
| clientAuthorizedNodeUuid | String | body (included in the params structure) |
UUID of the authorized node | 5.1.0 | |
| licenseType | String | body (included in the params structure) |
Requested license type: the platform license 'platform' or an add-on license | 5.1.0 | |
| systemTags (Optional) | List | body | System tags | 5.1.0 | |
| userTags (Optional) | List | body | User tags | 5.1.0 | |
| resourceInfo (Optional) | String | body (included in the params structure) |
Detailed resource information | 5.1.0 |
API Response
SDK Examples
RequestLicenseCapacityAction action = new RequestLicenseCapacityAction();
action.resourceUuid = "ff01ec80fd11327cba7519b66119d900";
action.quotaType = "CPUSocket";
action.quota = 24;
action.clientAuthorizedNodeUuid = "ff003f16a1de37f69d377dfdc39cc300";
action.licenseType = "platform";
action.resourceInfo = "ff00edf850633a37b727ce0ccfb03500";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RequestLicenseCapacityAction.Result res = action.call();
action = RequestLicenseCapacityAction()
action.resourceUuid = "ff01ec80fd11327cba7519b66119d900"
action.quotaType = "CPUSocket"
action.quota = 24
action.clientAuthorizedNodeUuid = "ff003f16a1de37f69d377dfdc39cc300"
action.licenseType = "platform"
action.resourceInfo = "ff00edf850633a37b727ce0ccfb03500"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
WithdrawLicenseCapacityApplication
Withdraw License Capacity Application
API Request
DELETE zstack/v1/license-server/capacity-application
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X DELETE http://localhost:8080/zstack/v1/license-server/capacity-application?resourceUuidList=ff01ec80fd11327cba7519b66119d900&clientAuthorizedNodeUuid=ff003f16a1de37f69d377dfdc39cc300&licenseType=platform
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| resourceUuidList | List | query | List of resource UUIDs bound to the license quota | 5.1.0 | |
| clientAuthorizedNodeUuid | String | query | UUID of the authorized node | 5.1.0 | |
| licenseType | String | query | Requested license type: the platform license 'platform' or an add-on license | 5.1.0 | |
| systemTags (Optional) | List | query | System tags | 5.1.0 | |
| userTags (Optional) | List | query | User tags | 5.1.0 |
API Response
When the API succeeds, it returns an empty JSON structure{}. If an error occurs, the returned JSON structure contains 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 Examples
WithdrawLicenseCapacityApplicationAction action = new WithdrawLicenseCapacityApplicationAction();
action.resourceUuidList = asList("ff01ec80fd11327cba7519b66119d900");
action.clientAuthorizedNodeUuid = "ff003f16a1de37f69d377dfdc39cc300";
action.licenseType = "platform";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
WithdrawLicenseCapacityApplicationAction.Result res = action.call();
action = WithdrawLicenseCapacityApplicationAction()
action.resourceUuidList = [ff01ec80fd11327cba7519b66119d900]
action.clientAuthorizedNodeUuid = "ff003f16a1de37f69d377dfdc39cc300"
action.licenseType = "platform"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
SyncLicenseCapacity
Sync License Capacity
API Request
PUT zstack/v1/license-server/authorized-capacity/sync
Authorization: OAuth the-session-uuid
{
"syncLicenseCapacity": {},
"systemTags": [],
"userTags": []
}
Note: In the preceding example, the systemTags and userTags fields can be omitted. They are shown to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X PUT -d '{"syncLicenseCapacity":{}}' http://localhost:8080/zstack/v1/license-server/authorized-capacity/sync
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| systemTags (Optional) | List | body | System tags | 5.1.0 | |
| userTags (Optional) | List | body | User tags | 5.1.0 |
API Response
When the API succeeds, it returns an empty JSON structure{}. If an error occurs, the returned JSON structure contains 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 Examples
SyncLicenseCapacityAction action = new SyncLicenseCapacityAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SyncLicenseCapacityAction.Result res = action.call();
action = SyncLicenseCapacityAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
UnregisterLicenseRequestedApplication
Unregister License Requested Application
API Request
PUT zstack/v1/license/unregister-applications
Authorization: OAuth the-session-uuid
{
"unregisterLicenseRequestedApplication": {
"appId": "ff05b5413a1e33168c9714619a126200"
},
"systemTags": [],
"userTags": []
}
Note: In the preceding example, the systemTags and userTags fields can be omitted. They are shown to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X PUT -d '{"unregisterLicenseRequestedApplication":{"appId":"ff05b5413a1e33168c9714619a126200"}}' http://localhost:8080/zstack/v1/license/unregister-applications
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| appId | String | body (included in the unregisterLicenseRequestedApplication structure) |
Application ID | 5.1.0 | |
| systemTags (Optional) | List | body | System tags | 5.1.0 | |
| userTags (Optional) | List | body | User tags | 5.1.0 |
API Response
When the API succeeds, it returns an empty JSON structure{}. If an error occurs, the returned JSON structure contains 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 Examples
UnregisterLicenseRequestedApplicationAction action = new UnregisterLicenseRequestedApplicationAction();
action.appId = "ff05b5413a1e33168c9714619a126200";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UnregisterLicenseRequestedApplicationAction.Result res = action.call();
action = UnregisterLicenseRequestedApplicationAction()
action.appId = "ff05b5413a1e33168c9714619a126200"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
UnregisterLicenseServer
Unregister License Server
API Request
DELETE zstack/v1/license-server/client
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X DELETE http://localhost:8080/zstack/v1/license-server/client?force=false
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| clientAuthorizedNodeUuid (Optional) | String | query | Node UUID of the authorized management node, used when unregistering it from the authorization server | 5.1.0 | |
| systemTags (Optional) | List | query | System tags | 5.1.0 | |
| userTags (Optional) | List | query | User tags | 5.1.0 | |
| force (Optional) | boolean | query | Whether to force unregistration | 5.1.0 |
API Response
When the API succeeds, it returns an empty JSON structure{}. If an error occurs, the returned JSON structure contains 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 Examples
UnregisterLicenseServerAction action = new UnregisterLicenseServerAction();
action.force = false;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UnregisterLicenseServerAction.Result res = action.call();
action = UnregisterLicenseServerAction()
action.force = false
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
Long Job Interfaces
SubmitLongJob
API Request
POST zstack/v1/longjobsAuthorization: OAuth the-session-uuid{
"params": {
"name": "migrate-volume",
"description": "migrate volume to another Ceph primary storage",
"jobName": "APIPrimaryStorageMigrateVolumeMsg",
"jobData": "{\"volumeUuid\":\"45a53d3d93384433add8ead7616586cf\", \"dstPrimaryStorageUuid\":\"70a0618804864b3dabe8be9824c8028c\"}",
"targetResourceUuid": "45a53d3d93384433add8ead7616586cf"
},
"systemTags": [],
"userTags": []
}
Note: In the above example, the systemTags and userTags fields are optional. They are listed to indicate that these two fields can be included in the body.curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"name":"migrate-volume","description":"migrate volume to another Ceph primary storage","jobName":"APIPrimaryStorageMigrateVolumeMsg","jobData":"{\"volumeUuid\":\"45a53d3d93384433add8ead7616586cf\", \"dstPrimaryStorageUuid\":\"70a0618804864b3dabe8be9824c8028c\"}","targetResourceUuid":"45a53d3d93384433add8ead7616586cf"}}' \
http://localhost:8080/zstack/v1/longjobs| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| name (Optional) | String | body (contained in the params structure) | Resource name | 2.3 | |
| description (Optional) | String | body (contained in the params structure) | Detailed description of the resource | 2.3 | |
| jobName | String | body (contained in the params structure) | Job name | 2.3 | |
| jobData | String | body (contained in the params structure) | Job data | 2.3 | |
| resourceUuid (Optional) | String | body (contained in the params structure) | Resource UUID | 2.3 | |
| systemTags (Optional) | List | body | System tags | 2.3 | |
| userTags (Optional) | List | body | User tags | 2.3 | |
| targetResourceUuid (Optional) | String | body (contained in the params structure) | Optional. The target resource UUID. | 2.3 |
Note:
- ZStack ZSphere uses an identifier to mark the upload of a specific image for this longjob. The IMAGE_ID is specified by the user, typically as an
md5 value. Add the uploadImage option to SystemTags.
- Option format:
uploadImage::{IMAGE_ID} - Example:
uploadImage::68b329da9893e34099c7d8ad5cb9c940
- Option format:
API Response
{
"inventory": {
"uuid": "23598186b9ef35aa89fbebf8f04d497a"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.3 |
| inventory | LongJobInventory | For details, see inventory | 2.3 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, such as SYS.1000, HOST.1001. | 2.3 |
| description | String | A brief description of the error | 2.3 |
| details | String | The detailed error information | 2.3 |
| elaboration | String | A reserved field. Default is null. | 2.3 |
| opaque | LinkedHashMap | A reserved field. Default is null. | 2.3 |
| cause | ErrorCode | The root error. The source error that caused the current error. This field is null if there is no root error. | 2.3 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the resource. Uniquely identifies the resource. | 2.3 |
| name | String | Resource name | 2.3 |
| description | String | Detailed description of the resource | 2.3 |
| apiId | String | The API ID used to associate with TaskProgress | 2.3 |
| jobName | String | Job name | 2.3 |
| jobData | String | Job data | 2.3 |
| jobResult | String | Job result | 2.3 |
| targetResourceUuid | String | Target resource UUID | 2.3 |
| managementNodeUuid | String | Management node UUID | 2.3 |
| createDate | Timestamp | Creation time | 2.3 |
| lastOpDate | Timestamp | Last modification time | 2.3 |
| state | LongJobState | For details, see state | 2.3 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3 |
| ordinal | int | The ordinal number. | 2.3 |
SDK Examples
SubmitLongJobAction action = new SubmitLongJobAction();
action.name = "migrate-volume";
action.description = "migrate volume to another Ceph primary storage";
action.jobName = "APIPrimaryStorageMigrateVolumeMsg";
action.jobData = "{"volumeUuid":"45a53d3d93384433add8ead7616586cf", "dstPrimaryStorageUuid":"70a0618804864b3dabe8be9824c8028c"}";
action.targetResourceUuid = "45a53d3d93384433add8ead7616586cf";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SubmitLongJobAction.Result res = action.call();SubmitLongJobAction action = SubmitLongJobAction()
action.name = "migrate-volume"
action.description = "migrate volume to another Ceph primary storage"
action.jobName = "APIPrimaryStorageMigrateVolumeMsg"
action.jobData = "{"volumeUuid":"45a53d3d93384433add8ead7616586cf", "dstPrimaryStorageUuid":"70a0618804864b3dabe8be9824c8028c"}"
action.targetResourceUuid = "45a53d3d93384433add8ead7616586cf"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SubmitLongJobAction.Result res = action.call()DeleteLongJob
API Request
DELETE zstack/v1/longjobs/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/longjobs/a87ae356c6583cc7b312412337f96609?| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The UUID of the resource. Uniquely identifies the resource. | 2.3 | |
| systemTags (Optional) | List | body | System tags | 2.3 | |
| userTags (Optional) | List | body | User tags | 2.3 |
API Response
{}. On failure, the returned JSON structure contains 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 Examples
DeleteLongJobAction action = new DeleteLongJobAction();
action.uuid = "a87ae356c6583cc7b312412337f96609";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteLongJobAction.Result res = action.call();DeleteLongJobAction action = DeleteLongJobAction()
action.uuid = "a87ae356c6583cc7b312412337f96609"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteLongJobAction.Result res = action.call()UpdateLongJob
API Request
PUT zstack/v1/longjobs/{uuid}/actionsAuthorization: OAuth the-session-uuid{
"updateLongJob": {
"name": "new-name",
"description": "new-description"
},
"systemTags": [],
"userTags": []
}
Note: In the above example, the systemTags and userTags fields are optional. They are listed to indicate that these two fields can be included in the body.curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateLongJob":{"name":"new-name","description":"new-description"}}' http://localhost:8080/zstack/v1/longjobs/dee3e1e3706f3e52a2cb9a47850508e7/actions| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The UUID of the resource. Uniquely identifies the resource. | 3.9.0 | |
| name (Optional) | String | body (contained in the updateLongJob structure) | Resource name | 3.9.0 | |
| description (Optional) | String | body (contained in the updateLongJob structure) | Detailed description of the resource | 3.9.0 | |
| systemTags (Optional) | List | body | System tags | 3.9.0 | |
| userTags (Optional) | List | body | User tags | 3.9.0 |
API Response
{
"inventory": {
"uuid": "464cdf695427358696dae171544b67ef",
"name": "new-name",
"description": "new-description"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 3.9.0 |
| inventory | LongJobInventory | For details, see inventory | 3.9.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, such as SYS.1000, HOST.1001. | 3.9.0 |
| description | String | A brief description of the error | 3.9.0 |
| details | String | The detailed error information | 3.9.0 |
| elaboration | String | A reserved field. Default is null. | 3.9.0 |
| opaque | LinkedHashMap | A reserved field. Default is null. | 3.9.0 |
| cause | ErrorCode | The root error. The source error that caused the current error. This field is null if there is no root error. | 3.9.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the resource. Uniquely identifies the resource. | 3.9.0 |
| name | String | Resource name | 3.9.0 |
| description | String | Detailed description of the resource | 3.9.0 |
| apiId | String | The API ID used to associate with TaskProgress | 3.9.0 |
| jobName | String | Job name | 3.9.0 |
| jobData | String | Job data | 3.9.0 |
| jobResult | String | Job result | 3.9.0 |
| targetResourceUuid | String | Target resource UUID | 3.9.0 |
| managementNodeUuid | String | Management node UUID | 3.9.0 |
| createDate | Timestamp | Creation time | 3.9.0 |
| lastOpDate | Timestamp | Last modification time | 3.9.0 |
| state | LongJobState | For details, see state | 3.9.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| Waiting | LongJobState | The Waiting value. | 3.9.0 |
| Suspended | LongJobState | The Suspended value. | 3.9.0 |
| Running | LongJobState | The Running value. | 3.9.0 |
| Succeeded | LongJobState | The Succeeded value. | 3.9.0 |
| Canceling | LongJobState | The Canceling value. | 3.9.0 |
| Canceled | LongJobState | The Canceled value. | 3.9.0 |
| Failed | LongJobState | The Failed value. | 3.9.0 |
SDK Examples
UpdateLongJobAction action = new UpdateLongJobAction();
action.uuid = "dee3e1e3706f3e52a2cb9a47850508e7";
action.name = "new-name";
action.description = "new-description";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateLongJobAction.Result res = action.call();UpdateLongJobAction action = UpdateLongJobAction()
action.uuid = "dee3e1e3706f3e52a2cb9a47850508e7"
action.name = "new-name"
action.description = "new-description"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateLongJobAction.Result res = action.call()QueryLongJob
API Request
GET zstack/v1/longjobs
GET zstack/v1/longjobs/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/longjobscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/longjobs/f031e4ea64673a5f96e022f4eb81fc59
Queryable Fields
Run the CLI command line tool, enter QueryLongJob and press Tab to view all queryable fields and cross-table queryable resource names.
API Response
{
"inventories": [
{
"uuid": "e8a3fcaa8c393684b78a6dc1b20db49f"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.3 |
| inventories | List | For details, see inventories | 2.3 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, such as SYS.1000, HOST.1001. | 2.3 |
| description | String | A brief description of the error | 2.3 |
| details | String | The detailed error information | 2.3 |
| elaboration | String | A reserved field. Default is null. | 2.3 |
| opaque | LinkedHashMap | A reserved field. Default is null. | 2.3 |
| cause | ErrorCode | The root error. The source error that caused the current error. This field is null if there is no root error. | 2.3 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the resource. Uniquely identifies the resource. | 2.3 |
| name | String | Resource name | 2.3 |
| description | String | Detailed description of the resource | 2.3 |
| apiId | String | The API ID used to associate with TaskProgress | 2.3 |
| jobName | String | Job name | 2.3 |
| jobData | String | Job data | 2.3 |
| jobResult | String | Job result | 2.3 |
| targetResourceUuid | String | Target resource UUID | 2.3 |
| managementNodeUuid | String | Management node UUID | 2.3 |
| createDate | Timestamp | Creation time | 2.3 |
| lastOpDate | Timestamp | Last modification time | 2.3 |
| state | LongJobState | For details, see state | 2.3 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.3 |
| ordinal | int | The ordinal number. | 2.3 |
SDK Examples
QueryLongJobAction action = new QueryLongJobAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryLongJobAction.Result res = action.call();QueryLongJobAction action = QueryLongJobAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryLongJobAction.Result res = action.call()CleanLongJob
API Request
PUT zstack/v1/longjobs/{uuid}/actionsAuthorization: OAuth the-session-uuid{
"cleanLongJob": {},
"systemTags": [],
"userTags": []
}
Note: In the above example, the systemTags and userTags fields are optional. They are listed to indicate that these two fields can be included in the body.curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"cleanLongJob":{}}' \
http://localhost:8080/zstack/v1/longjobs/5733dce937ca3ecdb47adcb08c25a552/actions| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The UUID of the resource. Uniquely identifies the resource. | 4.3.0 | |
| systemTags (Optional) | List | body | System tags | 4.3.0 | |
| userTags (Optional) | List | body | User tags | 4.3.0 |
API Response
{}. On failure, the returned JSON structure contains 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 Examples
CleanLongJobAction action = new CleanLongJobAction();
action.uuid = "5733dce937ca3ecdb47adcb08c25a552";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CleanLongJobAction.Result res = action.call();CleanLongJobAction action = CleanLongJobAction()
action.uuid = "5733dce937ca3ecdb47adcb08c25a552"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CleanLongJobAction.Result res = action.call()RerunLongJob
API Request
PUT zstack/v1/longjobs/{uuid}/actionsAuthorization: OAuth the-session-uuid{
"cleanLongJob": {},
"systemTags": [],
"userTags": []
}
Note: In the above example, the systemTags and userTags fields are optional. They are listed to indicate that these two fields can be included in the body.curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"rerunLongJob":{}}' \
http://localhost:8080/zstack/v1/longjobs/6b0baa24019d331fad1548dbd3ec3eb1/actions| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The UUID of the resource. Uniquely identifies the resource. | 3.0.1 | |
| systemTags (Optional) | List | body | System tags | 3.0.1 | |
| userTags (Optional) | List | body | User tags | 3.0.1 |
API Response
{
"inventory": {
"uuid": "bdff1ecf1cab3029ace943626708678a"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, such as 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 | A reserved field. Default is null. | 0.6 |
| opaque | LinkedHashMap | A reserved field. Default is null. | 0.6 |
| cause | ErrorCode | The root error. The source error that caused the current error. This field is null if there is no root error. | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the resource. Uniquely identifies the resource. | 2.2.4 |
| name | String | Resource name | 2.2.4 |
| description | String | Detailed description of the resource | 2.2.4 |
| apiId | String | The API ID used to associate with TaskProgress | 2.2.4 |
| jobName | String | Job name | 2.2.4 |
| jobData | String | Job data | 2.2.4 |
| jobResult | String | Job result | 2.2.4 |
| targetResourceUuid | String | Target resource UUID | 2.2.4 |
| managementNodeUuid | String | Management node UUID | 2.2.4 |
| createDate | Timestamp | Creation time | 2.2.4 |
| lastOpDate | Timestamp | Last modification time | 2.2.4 |
| state | LongJobState | For details, see state | 2.2.4 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource name | 2.2.4 |
| ordinal | int | The ordinal number. | 2.2.4 |
SDK Examples
RerunLongJobAction action = new RerunLongJobAction();
action.uuid = "6b0baa24019d331fad1548dbd3ec3eb1";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RerunLongJobAction.Result res = action.call();RerunLongJobAction action = RerunLongJobAction()
action.uuid = "6b0baa24019d331fad1548dbd3ec3eb1"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RerunLongJobAction.Result res = action.call()Error Code Interfaces
GetElaborations
API Request
GET zstack/v1/errorcode/elaborationsAuthorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/errorcode/elaborations?category=BS®ex=certificate has expired or is not yet valid| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| category (Optional) | String | query | The category of the error code, pointing to a resource or service category, such as HOST | 3.3.0 | |
| regex (Optional) | String | query | Error code keyword | 3.3.0 | |
| code (Optional) | String | query | Error code, used together with category | 3.6.0 | |
| systemTags (Optional) | List | query | System tags | 3.3.0 | |
| userTags (Optional) | List | query | User tags | 3.3.0 |
API Response
{
"contents": [
{
"category": "HOST",
"code": "1003",
"regex": "host[uuid:%s, name:%s] is in status[%s], cannot perform required operation",
"message_cn": "主机正处于[停止]状态,不能进行该操作",
"message_en": "Host is in status[Stopped], cannot perform required operation",
"source": "zstack",
"method": "regex",
"distance": 0.0
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 3.3.0 |
| contents | List | For details, see contents | 3.3.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, such as 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 | A reserved field. Default is null. | 0.6 |
| opaque | LinkedHashMap | A reserved field. Default is null. | 0.6 |
| cause | ErrorCode | The root error. The source error that caused the current error. This field is null if there is no root error. | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| category | String | The category to which the error code belongs | 3.3.0 |
| code | String | The error code identifier | 3.3.0 |
| regex | String | The error code matching keyword | 3.3.0 |
| message_cn | String | The error code message in Chinese | 3.3.0 |
| message_en | String | The error code message in English | 3.3.0 |
| source | String | The error source | 3.3.0 |
| method | String | The matching method: distance (string comparison) or regex (regular expression) | 3.6.0 |
| distance | Double | If the distance matching method is used, this is the accuracy (1 is the most accurate) | 3.6.0 |
SDK Examples
GetElaborationsAction action = new GetElaborationsAction();
action.category = "BS";
action.regex = "certificate has expired or is not yet valid";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetElaborationsAction.Result res = action.call();GetElaborationsAction action = GetElaborationsAction()
action.category = "BS"
action.regex = "certificate has expired or is not yet valid"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetElaborationsAction.Result res = action.call()GetElaborationCategories
API Request
GET zstack/v1/errorcode/elaborations/categoriesAuthorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/errorcode/elaborations/categories| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| systemTags (Optional) | List | query | System tags | 4.5.0 | |
| userTags (Optional) | List | query | User tags | 4.5.0 |
API Response
{
"categories": [
{
"category": "ACCOUNT",
"num": 5.0
},
{
"category": "BS",
"num": 3.0
},
{
"category": "VM",
"num": 20.0
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 4.5.0 |
| categories | List | For details, see categories | 4.5.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, such as SYS.1000, HOST.1001. | 4.5.0 |
| description | String | A brief description of the error | 4.5.0 |
| details | String | The detailed error information | 4.5.0 |
| elaboration | String | A reserved field. Default is null. | 4.5.0 |
| opaque | LinkedHashMap | A reserved field. Default is null. | 4.5.0 |
| cause | ErrorCode | The root error. The source error that caused the current error. This field is null if there is no root error. | 4.5.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| category | String | Category name | 4.5.0 |
| num | Integer | The number of error codes in this category | 4.5.0 |
SDK Examples
GetElaborationCategoriesAction action = new GetElaborationCategoriesAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetElaborationCategoriesAction.Result res = action.call();GetElaborationCategoriesAction action = GetElaborationCategoriesAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetElaborationCategoriesAction.Result res = action.call()Search Interfaces
RefreshSearchIndexes
API Request
GET zstack/v1/search/indexes/refreshAuthorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/search/indexes/refresh| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| systemTags (Optional) | List | query | System tags | 4.0.0 | |
| userTags (Optional) | List | query | User tags | 4.0.0 |
API Response
{}. On failure, the returned JSON structure contains 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 Examples
RefreshSearchIndexesAction action = new RefreshSearchIndexesAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RefreshSearchIndexesAction.Result res = action.call();RefreshSearchIndexesAction action = RefreshSearchIndexesAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RefreshSearchIndexesAction.Result res = action.call()