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 Current Feature Usage endpoint delivers license usage metrics specific to the Current Feature Usage, allowing you to monitor statistics for the currently selected feature on the license server of your choosing.
...
where $ indicates a variable value that you can replace with a value that best suits your needs and the . The possible parameters are as follows:described below.
Parameter | Required | Type | Description | |||||||
---|---|---|---|---|---|---|---|---|---|---|
${featureId} | Yes | integer/string | Internal LicStat identification Specifies ID of the feature for which you want to view current usage. | |||||||
${returnType} | Yes | string | Specifies the format in which the data should be returned. The format can be one of the following: json, csv, xls or pdf. | |||||||
fieldsVisibility | No | json/string | Specifies field visibility settings, for example:
where number "1" indicates that a specific field is visible. Note that the order of the settings you make is important – when exported, the fields will be visible in exactly the same order you specify here. | |||||||
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 |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[
{
"type": "string",
"field": "${un | hn | lco | lbe}",
"value": "${value}"
}
] |
To filter by a numeric column, use the following format:
Code Block | ||
---|---|---|
| ||
[
{
"type": "numeric",
"comparison": "${gt | lt | eq}",
"field": "${uid, lus}",
"value": "${value}"
}
] |
Specifies the field by which you want to order your data records. The field name can be one of the following:
uid, un, hn, lus, lco, tu, lbe
(See this section for more field-specific information.)
The following code block shows an example result of a successful request:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
success: ${success},
msg: ${message},
data: [{
"uid": ${userId},
"un": ${userName},
"hn": ${hostName},
"lus": ${licensesUsed},
"lco": ${checkoutTime},
"tu": ${licensesUsed},
"lbe": ${borrowExpire},
"uil": ${ldapUser}
}],
"code": ${errorCode},
"totalCount": ${totalCount}
} |
...
Standard format option. See Making an API request for details. | |||
standard report options | No | various | See Making an API request for details. |
Response
On success, the report will contain one row for each license session for a specified feature. Each row consists of the following columns.
Column | Full name | Type | Description | Visible by default in export |
---|---|---|---|---|
uid | User Id | integer | Internal License Statistics identification of user that checked out licenses. | No |
un | User | string | Name of user that checked out licenses. | Yes |
hn | Host | string | Name of host where licenses were checked out to. | Yes |
lus | Used |
uid
integer
User ID.
un
string
Username.
hn
string
Hostname.
integer | Total number of licenses used by user on host. | Yes | |
lco |
Checked Out | date and time | Date when |
lbe
string
Borrow expiration date. The date is in YYYY-MM-DD HH:MM format; for example, 2017-05-20 10:20.
licenses were checked out. |
Yes | ||||
tu | Time Used | string | How long the licenses have been in use. Note that you cannot filter on this field. | Yes |
lbe | Borrow Expiration | date and time | Borrow expiration date. |
Returns an empty string if |
not |
applicable. | Yes | ||
uil | User is from LDAP | boolean | Indicates whether user details have been imported from an LDAP directory. Note that you cannot filter and order data by this field. |
msg
string
Error message returned on failure.
success
boolean
Indicates whether your API request was successfully processed.
Error code for an unsuccessful request.
Unavailable |
Note that the order in the table is the default order of the columns in the exported file.
Example
Say you would like to download data in a CSV format file about current feature usage for feature "1". To generate this data set, enter a command similar to the following.
...
You can easily fetch metrics about feature usage during a given day by sending the following HTTP request:.
Code Block | ||||
---|---|---|---|---|
| ||||
GET /api/v1/report/feature/${featureId}/usage/chart/json?day=${dayYYYY-MM-DD} |
where $ indicates a variable value that you can replace with a value that best suits your needs and the . The possible parameters are as follows:described below.
Parameter | Required | Type | Description | |
---|---|---|---|---|
${featureId} | Yes | integer | ID Internal License Statistics identification of the feature for which you want to get data. | |
${day} | No | string | date | Date in YYYY-MM-DD format. Indicates day for which you want to gather data. If not provided, it defaults to today. |
The following code block shows an example result of a successful request:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
success: ${success},
msg: ${message},
data: [{
"fid": ${featureId},
"lud": ${dateAndTime},
"ltc": ${totalCount},
"lumax": ${licenseUsageMax},
"lbmax": ${licensesBorrowedMax}
}],
"code": ${errorCode},
"totalCount": ${totalCount}
} |
where the response fields can be explained as follows:
This report supports only JSON format.
Response
On success, this report will contain one row for each 5-minute-long period with usage statistic for the specified feature throughout the period.
Periods are from midnight, each 5 minutes (00:00-00:05, 00:05-00:10, 00:10-0:15, ...).
Each row consists of the following columns:
Column | Full name | Type | Description |
---|---|---|---|
fid | Feature ID | integer | Return specified feature ID from request. |
lud | Period Start | date and time | Beginning of the period. |
ltc | Total | integer | Total number of licenses available for feature in the period. |
lumax | Max Used |
integer | Maximum amount of used licenses during the period. | ||
lbmax | Max Borrowed | integer | Maximum amount of borrowed licenses |
msg
string
Error message returned on failure.
success
boolean
Indicates whether the API request was successfully processed.
Error code for unsuccessful request.
during the period. |