The User Hosts List endpoint delivers license usage metrics specific to the Realtime Users Count report, namely "User history for last 14 days"; that is, a list of all user-on-host pairs using a license on all realtime servers over a given time period.
Obtaining information about user hosts
You can easily list user-on-host pairs by sending the following HTTP request.
GET /api/v1/report/features/user-history/user-hosts/${returnType}?sd=${YYYY-MM-DD}&ed=${YYYY-MM-DD}&(additional parameters, as needed)
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 |
${returnType} | Yes | string | Standard format option. See Making an API request for details. |
sd | Yes | date | Specifies the start date for which the report will be generated. |
ed | Yes | date | Specifies the end date for which the report will be generated. |
standard report options | No | various | See Making an API request for details. |
Response
On success, this report will contain one row for each user that used any license in the specified time range and each host on which the license was used. 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. | Yes |
un | User | string | Name of the user that checked out licenses. | Yes |
hn | Host | string | The host where the user checked out licenses. | 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
The following example shows a command that downloads data in CSV format about user-on-host pairs that were using licenses for 2019-01-01 through 2019-01-14.
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/features/user-history/user-hosts/csv?sd=2019-01-01&ed=2019-01-14"