Overview
Overview
The documentation pages in this section describe the RESTful APIs included with NetProfiler products. It is assumed that the reader has practical knowledge of RESTful APIs, so the documentation does not go into detail about what REST is and how to use it. Instead the documentation focuses on what operations can be performed.
The following operations can be performed via the API:
- Get downloaded licenses.
- Add licenses.
- Delete licenses.
- Fetch license updates.
- Request license token.
- Get auto license download value.
- Set auto license download value.
Details about REST resources can be found in the Resources section. This overview continues with how to run these API's.
Authentication
All REST requests must be authenticated. The Authentication section of the Common API describes which authentication methods are presently supported.
Resources
licenses: Get licenses
Display all downloaded licenses .
GET https://{device}/api/mgmt.licenses/1.0/licensesAuthorization
This request requires authorization.
Response BodyOn success, the server returns a response body with the following structure:
- JSON
[ { "key": string, "description": string, "device serial number": string, "installed date": string, "status": string } ] Example: { "Licenses": [ { "key": "BAFBG-ABIAA-AAAAA-AAAAA-BRBK6-IAAAA-PU3NC-AK2J6", "description": "SteelCentral Virtual Flow Gateway 2M Flows Per Minute Feature Key", "device serial number": "AABA-ACAA-4W4C-QVXB", "installed date": "Thu, 24 Feb 2022 00:16:43 GMT", "status": "Valid" }, { "key": "SSIF1-VUDHF-7QGZJ-YUHYW-YYA5J-EK9WS-V4/W4-CC3D6", "description": "Unrecognized License", "device serial number": "AABA-ACAA-4W4C-QVXB", "installed date": "Fri, 25 Feb 2022 01:37:08 GMT", "status": "Invalid" } ] }
Property Name | Type | Description | Notes |
---|---|---|---|
response | <array of <object>> | list of downloaded licenses. | |
response[item] | <object> | license object | |
response[item].key | <string> | license key | |
response[item].description | <string> | description | |
response[item].device serial number | <string> | device serial number | |
response[item].installed date | <string> | installation date | |
response[item].status | <string> | status of license |
licenses: Add licenses
Add licenses.
POST https://{device}/api/mgmt.licenses/1.0/licensesAuthorization
This request requires authorization.
Request BodyProvide a request body with the following structure:
- JSON
[ string ] Example: [ "MMZDK-ZS86U-AVVIP-U82CV-56SXK-AIXT0-VLAPI-7B574", "SSIF1-VUDHF-7QGZJ-YUHYW-YYA5J-EK9WS-V4/W4-CC3D6", "abcd" ]
Property Name | Type | Description | Notes |
---|---|---|---|
request | <array of <string>> | List of license keys to add. | |
request[item] | <string> | License key |
On success, the server returns a response body with the following structure:
- JSON
[ { "<license key>": string } ] Example: [ { "MMZDK-ZS86U-AVVIP-U82CV-56SXK-AIXT0-VLAPI-7B574": "success" }, { "SSIF1-VUDHF-7QGZJ-YUHYW-YYA5J-EK9WS-V4/W4-CC3D6": "success" }, { "abcd": "License key format not supported" } ]
Property Name | Type | Description | Notes |
---|---|---|---|
response | <array of <object>> | list of results of each license key | |
response[item] | <object> | ||
response[item].<license key> | <string> |
licenses: Delete licenses
Delete licenses
DELETE https://{device}/api/mgmt.licenses/1.0/licensesAuthorization
This request requires authorization.
Request BodyProvide a request body with the following structure:
- JSON
[ string ] Example: [ { "MMZDK-ZS86U-AVVIP-U82CV-56SXK-AIXT0-VLAPI-7B574": "success" }, { "SSIF1-VUDHF-7QGZJ-YUHYW-YYA5J-EK9WS-V4/W4-CC3D": "License key format not supported" } ]
Property Name | Type | Description | Notes |
---|---|---|---|
request | <array of <string>> | List of license keys to delete. | |
request[item] | <string> | License key |
On success, the server returns a response body with the following structure:
- JSON
[ { "<license key>": string } ] Example: [ { "MMZDK-ZS86U-AVVIP-U82CV-56SXK-AIXT0-VLAPI-7B574": "success" }, { "SSIF1-VUDHF-7QGZJ-YUHYW-YYA5J-EK9WS-V4/W4-CC3D": "License key format not supported" } ]
Property Name | Type | Description | Notes |
---|---|---|---|
response | <array of <object>> | list of results of each license key | |
response[item] | <object> | ||
response[item].<license key> | <string> |
licenses: Fetch licenses
GET https://{device}/api/mgmt.licenses/1.0/licenses/fetchAuthorization
This request requires authorization.
Response BodyOn success, the server returns a response body with the following structure:
- JSON
{ "Message": string } Example: { "Message": "Could not contact license server or there are currently no licenses available for this host." }
Property Name | Type | Description | Notes |
---|---|---|---|
response | <object> | Outcome of fetch operation. | |
response.Message | <string> |
licenses: Request license activation code
POST https://{device}/api/mgmt.licenses/1.0/licenses/requestAuthorization
This request requires authorization.
Request BodyProvide a request body with the following structure:
- JSON
{ "value": string } Example: { "value": "abcd1234" }
Property Name | Type | Description | Notes |
---|---|---|---|
request | <object> | Enter a token that you receive when you purchase the license. | |
request.value | <string> |
On success, the server returns a response body with the following structure:
- JSON
{ "Message": string } Example: { "Message": "Invalid token abcd1234" }
Property Name | Type | Description | Notes |
---|---|---|---|
response | <object> | Generates a license activation code token that you receive when you purchase the license. | |
response.Message | <string> |
licenses: Get auto download value
Get value of auto download feature.
GET https://{device}/api/mgmt.licenses/1.0/licenses/auto_downloadAuthorization
This request requires authorization.
Response BodyOn success, the server returns a response body with the following structure:
- JSON
{ "value": string } Example: { "value": "true" }
Property Name | Type | Description | Notes |
---|---|---|---|
response | <object> | ||
response.value | <string> |
licenses: Set auto download value
Set value of auto download feature.
POST https://{device}/api/mgmt.licenses/1.0/licenses/auto_downloadAuthorization
This request requires authorization.
Request BodyProvide a request body with the following structure:
- JSON
{ "value": string } Example: { "value": "true" }
Property Name | Type | Description | Notes |
---|---|---|---|
request | <object> | ||
request.value | <string> |
On success, the server does not provide any body in the responses.
Error Codes
In the event that an error occurs while processing a request, the server will respond with appropriate HTTP status code and additional information in the response body:
{ "error_id": "{error identifier}", "error_text": "{error description}", "error_info": {error specific data structure, optional} }
The table below lists the possible errors and the associated HTTP status codes that may returned.
Error ID | HTTP Status | Comments |
---|---|---|
BAD_REQUEST | 400 | Invalid argument. |
AUTH_REQUIRED | 401 | Authentication required. |
AUTH_INVALID_CREDENTIALS | 401 | Make sure the user name is correct and type your password again. Be sure to use the correct case for the user name and password. |
HTTP_INVALID_METHOD | 405 | Requested method is not available for this resource. |
INTERNAL_ERROR | 500 | Internal error. |