Warning |
---|
This page refers to functionality that has been removed from License Statistics. This information no longer applies to License Statistics v6.3 and newer. |
The License Server Uptime endpoint delivers license usage metrics specific to license server status for the currently selected
License Statistics API lets you generate data from the License Server Uptime report. This report shows license server status for any license server during any period the server status was monitored.
Obtaining information about license server status
If you want to retrieve information You can easily fetch metrics about license server status history, we recommend that you use by sending the following URL HTTP request template.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
GET /api/v1/report/uptime/server/${licenseServerId}/json?sd=${startDateYYYY-MM-DD}&ed=${endDateYYYY-MM-DD} |
where :- $ $ indicates a variable value that you can replace with an appropriate value, as needed- a value that best suits your needs. The possible parameters are as follows:described below.
Parameter | Required | Type | Description |
---|---|---|---|
${licenseServerId} | Yes | integer |
Internal License Statistics identification of the |
license server for which you want to view status information. | ||
sd | Yes | string |
Start date |
for which you want to generate the report |
. | ||
ed | Yes | string |
End date |
for which you want to generate the report. |
If your request is successful, you should see a response similar to the following:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
success: ${success},
msg: ${message},
data: [{
"lsucd":${licenseServerUptimeCheckDateTime},
"lssid":${licenseServerStatusId},
"errid":${errorLogId}
}],
"code": ${errorCode},
"totalCount": ${totalCount}
} |
where the response fields can be explained as follows:
...
success
...
boolean
...
Indicates if the API request was successfully processed.
...
string
...
Error message returned on failure.
...
lsucd
...
Date and time when License Statistics checked if license server was up.
...
lssid
...
integer
...
Id of license server status. Can be one of the following:
Id | Status |
---|---|
1 | UNKNOWN |
2 | UP |
3 | DOWN |
4 | INTERNAL ERROR |
5 | VERIFYING |
6 | DISABLED |
...
errid
...
integer
...
Id of error log
...
This report supports only JSON format.
This report does not support standard options (filtering, limiting or ordering).
Response
On success, this report will contain one row for each event, such as query failure, server being disabled, successful query after period of failures, etc. See license server status descriptions for further details.
Each row consists of the following columns.
Column | Full name | Type | Description |
---|---|---|---|
lsucd | Time | date and time | Time when the event occurred. |
lssid | Status Id | integer | Numeric value of license server status. See license server status descriptions for further details. |
errmsg | Message | string | Optional message describing what went wrong. |
Example
The following example shows a command that obtains information about the uptime of license server "1" in January 2017. Example
For example, say you would like to view information about uptime of license server 1 in January of 2015. To generate such data, enter a command that is similar to the following:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl --data "sd=20152017-01-01" --data "ed=20152017-01-31" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/server/1/json" |
Keep in mind that you You can also put parameters directly in into the URL, e.g. for an equivalent of the above:. For the above example, the command would look like the following.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/server/1/json?sd=20152017-01-01&ed=20152017-01-31" |
Obtaining information about error messages
If you want to retrieve information about error message of any given log, we recommend that you use the following URL request template.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
GET /api/v1/report/uptime/error/json?errid=${errorId} |
where:
- $ indicates a variable value that you can replace with an appropriate value, as needed
- possible parameters are as follows:
...
Specifies id of error log, for which message should be retrieved.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
success: ${success},
msg: ${message},
data: {
"errmsg": ${errorMessage}
},
code: ${code}
} |
where the response fields can be explained as follows:
...
boolean
...
Indicates if the API request was successfully processed.
...
string
...
License Statistics error message returned on failure.
...
string
...
Requested message for error log
...
For example, say you would like to know what was message of error 1. To generate such data, enter a command that is similar to the following:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl --data "errid=1" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/error/json" |
Similarly as in the case of license server uptime, you can also put parameters directly in the URL, f.e for an equivalent of the above:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/error/json?errid=1" |