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.
Obtaining information about current feature usage
You can easily fetch metrics about current feature usage for a given feature by sending the following HTTP request.
License Statistics API allows you to obtain information about Current Feature Usage. The report consists of two parts: Current Feature Usage grid that shows usage at current moment, and Feature Usage chart, that shows how usage was shaped during the day
Obtaining information about feature usage during given day
To get data about feature usage during selected day use following URL template
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
GET /api/v1/report/feature/${featureId}/current-usage/chart/json?day=${dayreturnType} |
where :- $ $ indicates a variable value that you can replace with a proper value, according to your needs- the value that best suits your needs. The possible parameters are as follows:described below.
Parameter | Required | Type | Description | ||
---|---|---|---|---|---|
${featureId} | Yes | integer | IdInternal LicStat identification of the feature for which you want to | gather dataview current usage. | |
${returnType} | Yes | day | No | string | Date in format 'YYYY-MM-DD'. States for which day we want to get the data. If not provided defaults to today
|
If your request is successful, you should see a response similar to the following:
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 | integer | Total number of licenses used by user on host. | Yes |
lco | Checked Out | date and time | Date when 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. | 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 file about current feature usage for feature "1". To generate this data set, enter a command similar to the following.
Code Block | ||
---|---|---|
| ||
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/feature/1/current-usage/csv" |
Obtaining information about feature usage during given day
You can easily fetch metrics about feature usage during a given day by sending the following HTTP 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:
GET /api/v1/report/feature/${featureId}/usage/chart/json?day=${YYYY-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.
Parameter | Required | Type | Description |
---|---|---|---|
${featureId} | Yes | integer | Internal License Statistics identification of the feature for which you want to get data. |
day | No | date | Indicates day for which you want to gather data. If not provided, it defaults to today. |
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 during the period |
. |