Register License Requested Application
Headers
Authorization: OAuth the-session-uuidBody
{
"params": {
"licenseRequestCode": "example request code"
},
"systemTags": [],
"userTags": []
}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 Example
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/applicationsParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| licenseRequestCode | String | body (contained in the params structure) | 0.6 | ||
| clientPubKey (Optional) | String | body (contained in the params structure) | 0.6 | ||
| systemTags (Optional) | List | body | System tags | 0.6 | |
| userTags (Optional) | List | body | User tags | 0.6 |
API Response
Response example
{
"appId": "6568cda2a0863a4188a26fbdb740681e"
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| appId | String | 0.6 | |
| servicePubKey | String | 0.6 | |
| success | boolean | 0.6 | |
| error | ErrorCode | The error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 0.6 |
error
| 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 |
SDK Examples
Java SDK
RegisterLicenseRequestedApplicationAction action = new RegisterLicenseRequestedApplicationAction();
action.licenseRequestCode = "example request code";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RegisterLicenseRequestedApplicationAction.Result res = action.call();Python SDK
RegisterLicenseRequestedApplicationAction action = RegisterLicenseRequestedApplicationAction()
action.licenseRequestCode = "example request code"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RegisterLicenseRequestedApplicationAction.Result res = action.call()