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 License Server Current Usage endpoint delivers license usage metrics specific to the License Server Current Usage, allowing you to monitor all the features for the currently selected license server.
...
You can easily fetch metrics about current usage for a single license serverby sending one of the following HTTP requestrequests.
Code Block | ||||
---|---|---|---|---|
| ||||
GET /api/v1/report/license-server/${lsid}/current-usage/${returnType} |
...
Code Block | ||||
---|---|---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
GET /api/v1/report/license-server-group/${lsgid}/current-usage/${returnType} |
where $ indicates a variable value that you can replace with a value that best suits your needs and the . The possible parameters can be explained as followsare described below.
Parameter | Required | Type | Description |
---|---|---|---|
${lsid} | Yes | integer |
Internal License Statistics identification of license server to show usage on. | ||
${lsgid} | Yes | integer |
Internal License Statistics identification of license server group to show usage on. | ||
${returnType} | Yes | string |
Specifies field visibility settings, for example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"fid": "1",
"fns": "1",
"fv": "1",
"ftype": "1",
"fu": "1",
"fbrwd": "1",
"frvd": "1",
"ft": "1",
"futil": "1",
"fexp": "1",
"flu": "1"
} |
where "1" indicates that a specific field is visible and ''0" indicates it is not.
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
If you don't pass this parameter, it will be generated automatically for PDF and XLS types. If provided, it cannot be left empty.
Applies filtering license usage data on all fields.
To filter by a string column, use the following format.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[
{
"type": "string",
"field": "${ fns | fv | ftype | fexp | flu }",
"value": "${value}"
}
] |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[
{
"type": "numeric",
"comparison": "${gt | lt | eq}",
"field": "${ fu | fbrwd | frvd | ft | futil}",
"value": "${value}"
}
] |
Specifies the field by which you want to order your data records. The field name can be one of the following:
fid, fns, fv, ftype, fu, fbrwd, frvd, ft, futil, fexp, flu
(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: [{
"fid": "${featureId}",
"fns": "${featureName}",
"fv": "${featureVersion}",
"ftype": "${featureType}",
"fu": "${licensesUsed}",
"fbrwd": "${licensesBorrowed}",
"frvd": "${licensesReservations}",
"ft": "${total}",
"futil": "${licenseUtilization}",
"fexp": "${expireDate}",
"flu": "${lastUsageUpdateDate}",
"fiexp": "${isExpired}"
}],
"code": ${errorCode},
"totalCount": ${totalNumberOfRecords}
} |
...
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, this report will contain one row for each feature hosted on the license server, or one of the license server groups, that currently has checked out licenses. Each row consists of the following columns.
Column | Full name | Type | Description | Visible by default in export |
---|---|---|---|---|
fid | Feature Id | integer | Internal License Statistics identification of the feature. | No |
fns | Feature Name | string | Feature name. | Yes |
fv | Feature Version | string | Feature version. | Yes |
ftype | Feature Type | enumeration | See feature type descriptions for details. | Yes |
fu | Used |
...
integer | Number of used licenses. | Yes | ||
fbrwd | Borrowed | integer | Number of borrowed licenses. | Yes |
frvd | Reserved | integer/string | Number of reserved licenses, or "N/A" |
if License Reservations are not supported by the license server. | Yes | ||
ft | Total | integer/string | Total licenses for a feature or "Unlimited" |
if an unlimited license. | Yes | |||
futil | Utilization | integer | Percentage of feature utilization. | Yes |
fexp | Feature Expires |
date | Feature expiration date |
. | Yes | |||
flu | Last Update | date and time | Time of last update. For realtime, the time the feature was last seen on the license server. | Yes |
fiexp | Expired |
flu
boolean | Indicates whether the feature has expired. |
msg
success
No |
Note that the order in the table is the default order of the columns in the exported file.
Note: Data returned for a license server group consists of a summary of all features of all license servers in the group, including hidden ones. (See License server groups for more information.)
Example 1
Say you want to download data in XSL format The following example shows a command that downloads data about current usage for license server "7". To generate this data set, enter a command similar to the following. in XLSX format.
Code Block | ||
---|---|---|
| ||
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/license-server/7/current-usage/xslxlsx" |
Example 2
If you want to obtain The following example shows a command that obtains information about features with current usage higher than 90% for license server "13.", enter the following command.
Code Block | ||
---|---|---|
| ||
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/license-server/13/current-usage/json" --data-urlencode 'filters=[{"type":"numeric","comparison":"gt","field":"futil","value":"90"}]' |
Example 3
Let's assume you want to download data in CSV format The following example shows a command that downloads data about current usage for license server group "1" in CSV . To generate this data set, enter a command similar to the followingformat.
Code Block | ||
---|---|---|
| ||
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/license-server-group/131/current-usage/csv" |