You can register a license on the Analyzer detail view. If the license already exists, the new license overwrites the old license. To register the license, you can either upload a license file or use the JSON with the license keys.
Request line
POST baseURL/licenseapi.do?action=registerLicense
Request payload is a JSON array with the license keys or license file.
Request body
JSON array with the license keys or license file :
[ XXXX-XXXX-XXXX-XXXX, YYYY-YYYY-YYYY-YYYY ]
Request examples
Upload the license file:
POST /licenseapi.do?action=registerLicense&type=file x-authorization:<license authentication key> Content-Type:text/plain
Send the license keys:
POST /licenseapi.do?action=registerLicense x-authorization:<license authentication key>
[ XXXX-XXXX-XXXX-XXXX, YYYY-YYYY-YYYY-YYYY ]
Request parameters
Parameter | Type | Description |
---|---|---|
type | String | The type is file.
To upload the license, set the parameter value to file and the header Content-Type to text/plain. Required if payload is a license file.Optional if payload is a JSON with license keys. |
Response body
{ "status": "" } { "code": "", "error": "" } { "failed":[ "xxxx-xxxx-xxxx-xxxx-xxxx" ], "registered":[ "xxxx-xxxx-xxxx-xxxx-xxxx" ] }
Response examples
Response message when the correct license file is provided:
{ "status": "License registered successfully" }
Response message when the incorrect license file is provided:
{ "code": "D1040002", "error": "Specified license file is invalid" }
Response message when one of the provided license keys are invalid:
{ "failed":[ "xxxx-xxxx-xxxx-xxxx-xxxx" ], "registered":[ "xxxx-xxxx-xxxx-xxxx-xxxx" ] }
Status codes
Status code |
Message |
Description |
---|---|---|
400 | BAD REQUEST | Request URL or request body validation failed. Check the response body for details. |
401 | UNAUTHORIZED | Supplied authentication token is invalid or does not have the appropriate credentials to access the resource. |
405 | METHOD NOT ALLOWED | Request HTTP method is not allowed for the operation. |
Response codes
The following table lists the common API response codes that might be generated through the standard API. If an error response is not listed, examine the HTTP status codes to determine the best method for addressing the issue.
Response code | Message | Condition |
---|---|---|
D10100E0 | HTTP method [GET] is not supported for action [registerLicense]. | HTTP method is not POST. |
D1010001 | Authorization failed. | Request is sent with an invalid authentication token. |
D1040003 | Specified license type is invalid. | License type is incorrect. |
D1040004 | Specified JSON input is invalid. | Specified JSON input is invalid. |