With License Statistics API, you can easily generate information about Denials, i.e. about users that were denied access to applications due to checkout requests exceeding the number of available licenses.
This report shows how The Denials endpoint delivers metrics that License Statistics collects from the monitored license server. This endpoint is used to fetch license usage metrics specific to Denials, allowing you to see exactly how many license checkout requests were denied and how often the denials took place.
Obtaining information about checkout denials
If you want to retrieve information fetch metrics about the username and hostname for each denial, we recommend that you use the following URL request template.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
GET /api/v1/report/feature/${featureId}/denials/${returnType}?sd=${startDate}&ed=${endDate}&(additional parameters, as needed) |
where :- $ $ indicates a variable value that you can replace with a proper value, according to value that best suits your needs
- and the possible parameters are as follows:
Parameter | Required | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
${featureId} | Yes | integer | Specifies ID of the feature for which you want to view denied requests. | ||||||||||||||||
${returnType} | Yes | string | Specifies the format in which the data should be returned. The format can be one of the following: jsonJSON, csvCSV, xls XLS or pdfPDF. | ||||||||||||||||
sd | Yes | string | Specifies the starting date from which you want to generate the report. The date format is YYYY-MM-DD; for example, 2017-0105-20. | ||||||||||||||||
ed | Yes | string | Specifies the end date from which you want to generate the report. The date format is YYYY-MM-DD; for example, 2017-0105-20. The date is inclusive, meaning that all data from a particular day will be included in the report. | ||||||||||||||||
fieldsVisibility | No | json/string | Specifies field visibility settings, for example:
where number "1" indicates that a specific field is visible. | ||||||||||||||||
rn | No | string | Specifies the name of the report that will be displayed once the report has been exported to PDF or XLS. For CSV and JSON formats this parameter will be ignored. If you don't pass this parameter, it will be generated automatically for PDF and XLS types. If provided, it cannot be left empty. | ||||||||||||||||
filter | No | json/string | Applies filtering license usage data on all fields. To filter by a string column, use the following format:
To filter by a numeric column, use the following format:
| ||||||||||||||||
limit | No | integer | Determines the maximum number of data records that can be returned. The value must be greater than zero. | ||||||||||||||||
offset | No | integer | Specifies the offset of the first row to return. | ||||||||||||||||
orderBy | No | string | Specifies the field by which you want to order your data records. The field name can be one of the following: un, hn, ldt, ldt (See the section below for more field-specific information.) ldt, ldtc. | ||||||||||||||||
orderDirection | No | string | Determines whether the sorting results will be displayed in an ascending (ASC) or a descending (DESC) order. |
If your request is successful, you should see a response similar to the following: The following code block shows an example result of a successful request:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ success: ${success}, msg: ${message}, data: [{ "un": ${userName}, "hn": ${hostName}, "ldt": ${licenseDenialTime}, "ldtc": ${licenseDenialTotalCount} }], "code": ${errorCode}, "totalCount": ${totalCount} } |
where the response fields can be explained as follows: Anchor fields def fields def
Field | Type | Description |
---|---|---|
un | string | Username. |
hn | string | Hostname. |
ldt | string | Date on which the denial took place in YYYY-MM-DD format. |
ldtc | string | Total number of denied license checkout requests. |
msg | string | Error message returned on failure. |
success | boolean | Indicates whether the API request was successfully processed. |
code | integer | Error code for unsuccessful request. |
totalCount | integer | Total number of all matching results. |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
GET /api/v1/report/feature/${featureId}/denials/grouped/${returnType}?sd=${startDate}&ed=${endDate}&grat=${granularity}&(additional parameters, as needed) |
where :- $ $ indicates a variable value that you can replace with a proper value, according to value that best suits your needs
- and the possible parameters are as follows:
Parameter | Required | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
${featureId} | Yes | integer | Specifies ID of the feature for which you want to view grouped checkout denials. | ||||||||||||||||
${returnType} | Yes | string | Specifies format in which the data should be returned. The format can be one of the following: jsonJSON, csvCSV, xls XLS or pdfPDF. | ||||||||||||||||
sd | Yes | string | Specifies starting date from which you want to generate the report. The date and time format is YYYY-MM-DD; for example, 2017-0105-20. | ||||||||||||||||
ed | Yes | string | Specifies end date from which you want to generate the report. The date and time format is YYYY-MM-DD; for example, 2017-0105-20. The date is inclusive, meaning that all data from a particular day will be included in the report. | ||||||||||||||||
grat | Yes | integer | Specifies granularity of the returned data, and can be one of the following:
| ||||||||||||||||
fieldsVisibility | No | json/string | Specifies field visibility settings, for example:
where number "1" indicates that a specific field is visible. | ||||||||||||||||
rn | No | string | Specifies the name of the report that will be displayed once the report has been exported to PDF or XLS. For CSV and JSON formats this parameter will be ignored. If you don't pass this parameter, it will be generated automatically for PDF and XLS types. If provided, it cannot be left empty. | ||||||||||||||||
filter | No | json/string | Applies filtering license usage data on all fields. To filter by string column, use the following format:
To filter by numeric column, use the following format:
| ||||||||||||||||
limit | No | integer | Determines the maximum number of data records that can be returned. The value must be greater than zero. | ||||||||||||||||
offset | No | integer | Specifies the offset of the first row to return. | ||||||||||||||||
orderBy | No | string | Specifies the field by which you want to order your data records. The field name can be one of the following: un, hn, ldt, ldt (See the section above for more field-specific information.) ldtc. | ||||||||||||||||
orderDirection | No | string | Determines whether the sorting results will be displayed in ascending (ASC) or descending (DESC) order. |
If your request is successful, you should see a response similar to the following: The following code block shows an example result of a successful request:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ success: ${success}, msg: ${message}, data: [{ "ldt": ${licenseDenialTime}, "ldtc": ${licenseDenialTotalCount} }] } |
where the response fields can be explained as follows:
Field | Type | Description |
---|---|---|
ldt | string | Indicates period of time for which usage information is generated, i.e. date and time for hourly usage and dates for the remaining granularity options. |
ldtc | string | Total number of denied license checkout requests. |
msg | string | Error message returned on failure. |
success | boolean | Indicates if the API request was successfully processed. |
msg | string | Error message returned on failure. |
code | integer | Error code for unsuccessful request. |
totalCount | integer | Total number of denied license checkout requests. |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl --data "limit=100" --data "offset=0" --data "sd=2013-01-01" --data "ed=2015-01-02" --data "grat=6" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/feature/3/denials/grouped/json" |
Keep Please keep in mind that you can also put parameters directly into the URL, e.g. to generate data for the above example, the command would look like this:
...