Some information on this page refers to License Statistics v5.7 or newer, which changed the API endpoint URL in order to maintain version integrity into the future. If you are running a previous version of License Statistics, please refer to v5.4-v5.6 documentation. |
License Statistics API allows you to generate data from User History endpoint delivers metrics License Statistics collects from the monitored license server. This endpoint is used to fetch license usage metrics specific to the User History report. This report shows , allowing you to see statistics for license usage per user, during any period that usage was tracked.
Showing sessions at a specific point in time
If you want to retrieve information fetch metrics about usage history at a particular point in time, we recommend that you use the following URL request template.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
GET /api/v1/report/feature/${featureId}/user-history/${returnType}?sdt=${sessionDateTime}&(additional parameters, as needed) |
where :- $ $ indicates a variable value that you can replace with a proper value, as needed- value that best suits your needs and the possible parameters are as follows:
Parameter | Required | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
${featureId} | Yes | integer | Specifies feature-specific parameters. | |||||||||
${returnType} | Yes | string | Specifies the format in which license usage data should be returned. The format can be one of the following: jsonJSON, csvCSV, xls XLS or pdfPDF. | |||||||||
sdt | Yes | string | Specifies point in time for which you want to generate the report. The date and time format is as follows: YYYY-MM-DD HH:MM; for example, 20152017-0105-20 11:00. | |||||||||
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. | |||||||||
filter | No | json/string | Applies filtering license usage data on all fields. To filter your data, 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: uid, un, hn, sst, set (See this section for more field-specific information.) | |||||||||
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 followingThe following code block shows an example result of a successful request:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ success: true, msg: ${message}, data: [{ uid: ${userId}, un: ${userName}, hn: ${hostName}, sst: ${sessionStartTime}, set: ${sessionEndTime}, il: ${hasUserLdapDetails} }] } |
where the response fields can be explained as follows: Anchor fields def fields def
Field | Type | Description |
---|---|---|
uid | integer | User ID. |
un | string | Username. |
hn | string | Hostname. |
sst | string | Date returned in YYYY-MM-DD HH:MM format; for example, 20162017-0105-20 11:00. |
set | string | Date returned in YYYY-MM-DD HH:MM format (for example, 20162017-0105-20 11:00), "Unknown", or "Still in use". |
il | boolean | Indicates whether user details have been imported from LDAP directory. Note that you cannot filter and order data by this field. |
msg | string | Error message returned on failure. |
success | boolean | Indicates that the your API request was successfully processed. |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
GET /api/v1/report/feature/${featureId}/user-history/${returnType}?ssd=${sessionStartDate}&sed={sessionEndDate}&(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 feature-specific parameters. | |||||||||
${returnType} | Yes | string | Specifies the format in which license usage data should be returned. The format can be one of the following: jsonJSON, csvCSV, xls XLS or pdfPDF. | |||||||||
ssd | Yes | string | Specifies the start date for which the report will be generated in YYYY-MM-DD format; for example, 20162017-0105-20. | |||||||||
sed | Yes | string | Specifies the end date for which the report will be generated in YYYY-MM-DD format; for example, 20162017-0105-27. | |||||||||
fieldsVisibility | 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 Excel. | |||||||||
filter | No | json/string | Applies filtering license usage data on all fields. To filter your data, 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: uid, un, hn, sst, set (See this section for more field-specific information.) | |||||||||
orderDirection | No | string | Determines whether the sorting results will be displayed in ascending (ASC) or descending (DESC) order. |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{success: true, msg: ${message}, data: [ uid: ${userId}, un: ${userName}, hn: ${hostName}, sst: ${sessionStartTime}, set: ${sessionEndTime}, il: ${hasUserLdapDetails} ]} |
where the response fields can be explained as followsThe following code block shows an example result of a successful request:
Field | Type | Description |
---|---|---|
uid | integer | User ID. |
un | string | Username. |
hn | string | Hostname. |
sst | string | Date returned in YYYY-MM-DD HH:MM format; for example, 20162017-0105-20 11:00. |
set | string | Date returned in YYYY-MM-DD HH:MM format (for example, 20162017-0105-20 11:00), "Unknown", or "Still in use". |
il | boolean | Indicates whether user details have been imported from LDAP directory. Note that you cannot filter and order data by this field. |
msg | string | Error message returned on failure. |
...