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 Denials endpoint delivers 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
You can easily list the username and hostname for each denial denials for given feature that took place by sending the following HTTP request.
Code Block | ||||
---|---|---|---|---|
| ||||
GET /api/v1/report/feature/${featureId}/denials/${returnType}?sd=${startDateYYYY-MM-DD}&ed=${endDateYYYY-MM-DD}&(additional parameters, as needed) |
...
Parameter | Required | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
${featureId} | Yes | integer | Specifies ID Internal License Statistics identification 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: json, csv, xlsx, or pdfStandard format option. See Making an API request for details. | |||||||||
sd | Yes | stringdate | Specifies the 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 | stringdate | Specifies the 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. | |||||||||
fieldsVisibilitystandard report options | 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 XLSX. 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 XLSX types. If provided, it cannot be left empty. | filter | No | json/string |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[
{
"type": "string",
"field": "${un | hn | ldt}",
"value": "${value}"
}
] |
Code Block | ||||
---|---|---|---|---|
| ||||
[
{
"type": "numeric",
"comparison": "${gt | lt | eq}",
"field": "ldtc",
"value": "${value}"
}
] |
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 this section for more field-specific information.)
Response
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}
} |
...
various | See Making an API request for details. |
Response
On success, report will contain one row for each denial, from the given date range. Each row consists of the following columns.
Column | Full name | Type | Description | Visible by default in export |
---|---|---|---|---|
ldt | Date | date and time | Time when the denial took place. | Yes |
ldtc | Denials | integer | Number of denied licenses. | Yes |
un | User | string | Name of the denied user. | Yes |
hn | Host | string | Host from which the denied user tried to check out the license. | Yes |
Note that the order in the table is the default order of the columns in the exported file.
...
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 your API request was successfully processed.
...
Error code for unsuccessful request.
...
Total number of all matching results.
Example 1
The following example shows a command that lets you obtain information about denials for feature "3" over a given specified time period.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl --data "sd=2015-01-01" --data "ed=2015-01-02" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/feature/3/denials/json" |
...
The following example shows a command that lets you obtain information about all denials for feature "3" over a specific specified time period, with data ordered by username.
...
The following example shows a command that lets you view the first 100 denials for feature "3" over a given specified time period.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl --data "limit=100" --data "offset=0" --data "sd=2015-01-01" --data "ed=2015-01-02" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/feature/3/denials/json" |
You can also put parameters directly into the URL; for . For the above example, the command would be similar to the following.
...
Obtaining information about grouped checkout denials
You can easily list the cumulative number of denials for username and hostname a given feature per fixed time period by sending the following HTTP request.
...
Parameter | Required | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
${featureId} | Yes | integer | Specifies ID Internal License Statistics identification 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: json, csv, xlsx, or pdfStandard format option. See Making an API request for details. | |||||||||
sd | Yes | stringdate | Specifies starting Start date from which you want to generate the report. The date is in YYYY-MM-DD format; for example, 2017-05-20. | |||||||||
ed | Yes | stringdate | Specifies endEnd date from which you want to generate the report. The date is | in YYYY-MM-DD format; for example, 2017-05-20. The date isinclusive, meaning that all data from a particular day will be included in the report. | ||||||||
grat | Yes | string | Specifies granularity of the returned data, which 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 XLSX. 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 XLSX types. If provided, it cannot be left empty. | filter | No | json/string |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[
{
"type": "string",
"field": "ldt",
"value": "${value}"
}
] |
Code Block | ||||
---|---|---|---|---|
| ||||
[
{
"type": "numeric",
"comparison": "${gt | lt | eq}",
"field": "ldtc",
"value": "${value}"
}
] |
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 this section for more field-specific information.)
Response
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:
...
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.
...
Error code for unsuccessful request.
enumeration | Period type the result is aggregated for. See granularity descriptions for further details | ||
standard report options | No | various | See Making an API request for details. |
Response
On success, this report will contain one row for each period (e.g., each day or week) from the specified date range. Each row consists of the following columns.
Column | Full name | Type | Description | Visible by default in export |
---|---|---|---|---|
ldt | Date | various | The time period. Format depends on granularity. | Yes |
ldtc | Denials | string | Cumulative number of denials licenses in the time period for the feature. | Yes |
Note that the order in the table is the default order of the columns in the exported file
...
.
Example 1
The following example shows a command that obtains information about denials for feature "3" grouped by month.
...
You can also put parameters directly into the URL; for . For the above example, the command would look like the following:
...