Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Obtaining information about current feature usage

If you want to You can easily fetch metrics about current feature usage for a given feature, use the following URL request template. by calling this HTTP GET request:

Code Block
languagejs
firstline1
linenumberstrue
GET /api/v1/report/feature/${featureId}/current-usage/${returnType}

...

Field
Type
Description

uid

integer

User ID.

un

string

Username.

hn

string

Hostname.

lus

integer

Total number of licenses used by user on host.

lco

string

Date when license was checked out. The date format is 'in YYYY-MM-DD HH:MM 'format; for example, 2017-05-20 10:20.

lbe

string

Borrow expiration date. The date format is 'in YYYY-MM-DD HH:MM 'format; for example, 2017-05-20 10:20.

Returns an empty string if does not apply.

uil

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 the that your API request was successfully processed. 

codeinteger

Error code for an unsuccessful request.

totalCountinteger

Total number of all matching results.

 Example

Say you want to obtain information would like to download data in CSV format about current feature usage for feature "1 in CSV format". To fetch such metricsgenerate this data set, enter a command similar to this one: the following.

Code Block
linenumberstrue
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/feature/1/current-usage/csv"

Obtaining information about feature usage during given day

If you want to You can easily fetch metrics about feature usage during any selected day, use the following URL templatea given day by calling this HTTP GET request:

Code Block
languagejs
firstline1
linenumberstrue
GET /api/v1/report/feature/${featureId}/usage/chart/json?day=${day}

...

Parameter
Required
Type
Description
${featureId}YesintegerID of the feature for which you want to get data.
${day} NostringDate in format ' 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
languagejs
firstline1
linenumberstrue
{
    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:

...