Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
firstline1
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 a value that best suits your needs. The possible parameters are described below.

ParameterRequiredTypeDescription
${licenseServerId}Yesinteger

Specifies ID Internal License Statistics identification of the license server for which you want to view status information.  

sdYesstring

Specifies starting Start date from for which you want to generate the report. The date is in YYYY-MM-DD format; for example, 2017-05-20.

ed

Yes

string

Specifies end End date from for which you want to generate the report. The date is in YYYY-MM-DD format; for example, 2017-05-20. The date is inclusive, meaning that all data from a particular day will be included in the report.

Response

The following code block shows an example result of a successful request.

Code Block
languagejs
firstline1
linenumberstrue
  {
      success: ${success},
      msg: ${message},
      data: [{  
         "lsucd":${licenseServerUptimeCheckDateTime},
         "lssid":${licenseServerStatusId},
         "errid":${errorLogId}
      }],
	  "code": ${errorCode},
	  "totalCount": ${totalCount}
  }

where the response fields can be explained as follows.


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.

ColumnFull nameTypeDescription

lsucd

Timedate 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

FieldTypeDescription

success

boolean

Indicates whether your API request was successfully processed. 

msg

string

Error message returned on failure.

lsucd

string

Date and time when License Statistics checked if license server was up.

lssid

integer

ID of license server status, which can be one of the following:

IDStatus
0LICSTAT DOWN
1UNKNOWN
2UP
3DOWN
4INTERNAL ERROR

errid

integer

ID of the entry in the License Statistics error log.

codeintegerError code for unsuccessful request.totalCountintegerTotal number of all matching results

.


Example

The following example shows a command that obtains information about the uptime of license server "1" in January 2017.

...

You can also put parameters directly into the URL; for . For the above example, the command would look like the following.

Code Block
languagejs
firstline1
linenumberstrue
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/server/1/json?sd=2017-01-01&ed=2017-01-31"

Obtaining information about error messages

You can easily list error messages for any given log by sending the following HTTP request.

Code Block
languagejs
firstline1
GET /api/v1/report/uptime/error/json?errid=${errorId}

where $ indicates a variable value that you can replace with a value that best suits your needs. The possible parameters are described below.

...

Specifies ID of the error log for which the error message should be retrieved.

Response

The following code block shows an example result of a successful request.

Code Block
languagejs
firstline1
linenumberstrue
 {
      success: ${success},
      msg: ${message},
      data: {
        "errmsg": ${errorMessage}
      },
      code: ${code}
 }

where the response fields can be explained as follows.

...

boolean

...

Indicates that your API request was successfully processed.

...

string

...

License Statistics error message returned on failure.

...

string

...

The message you want to retrieve for a specific error log.

...

Error code for unsuccessful request.

...

The following example shows a command that lets you view the message for error "1."

Code Block
languagejs
firstline1
linenumberstrue
curl --data "errid=1" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/error/json"

You can also put parameters directly in the URL; for the above example, the command would look like the following.

Code Block
languagejs
firstline1
linenumberstrue
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/uptime/error/json?errid=1"