Register License Requested Application

POST/zstack/v1/licenses/applications

Headers

Authorization: OAuth the-session-uuid

Body

{
  "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/applications

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
licenseRequestCodeStringbody (contained in the params structure)  0.6
clientPubKey (Optional)Stringbody (contained in the params structure)  0.6
systemTags (Optional)ListbodySystem tags 0.6
userTags (Optional)ListbodyUser tags 0.6

API Response

Response example

{
  "appId": "6568cda2a0863a4188a26fbdb740681e"
}
NameTypeDescriptionStarting Version
appIdString 0.6
servicePubKeyString 0.6
successboolean 0.6
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, such as SYS.1000, HOST.1001.0.6
descriptionStringA brief description of the error0.6
detailsStringThe detailed error information0.6
elaborationStringA reserved field. Default is null.0.6
opaqueLinkedHashMapA reserved field. Default is null.0.6
causeErrorCodeThe 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()