Versions Compared

Key

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

Currently, the License Statistics API lets you generate data from the User history report. This report shows 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 about usage history at a particular point in time, we recommend that you use the following Url or URL ?? request template.

Code Block
languagejs
firstline1
linenumberstrue
GET /api/report/user-history/${featureId}/${returnType}?sdt=${sessionDateTime}

...

ParameterRequiredTypeDescription
${featureId}Yesinteger

You can find more general, feature-related information here. Dunno why we have to redirect them to that table on End-user API. Cannot we provide a brief definition here? (big grin)

${returnType}YesstringSpecifies the format in which license usage data should be returned. The format can be one of the following: json, csv, xls or pdf.
sdtYesstringSpecifies the format point in time for which you want to generate the report. The date and time are returned. The format is yyyyas follows: YYYY-MM-dd DD HH:mmMM; for example, 2015-01-20 11:00. (why not YYY-MM-DD HH: MM–all capital letters??)? Just verify if this is OK please.
fieldsVisibility-I feel like changing this to "fieldVisibility" Can we do this? Nojson/string

Specifies field visibility settings, for example:

Code Block
languagejs
firstline1
linenumberstrue
{"un": "1", "hn": "1", "sst": "1", "set": "1"}

where number 1 indicates that a specific field is visible.
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.

rnNostringSpecifies the name of the report that will be displayed once the report has been exported to PDF , CSV, or Excel.
filterNojson/string

Applies filtering license usage data on all fields. To filter your data, use the following format:

Code Block
languagejs
firstline1
linenumberstrue
[{"value": intOrString, "field": "${fid | fns | fv | ftype | lsid | lsn | vn | gtn}"}]
limitNointegerSpecifies Determines the maximum ?? number of records that can be returned. The value must be greater than zero.
offsetNointegerSpecifies the offset of the first row to return.
orderByNostring

Specifies the column field by which you want to order your data records. The column field name can be one of the following: uid, un, hn, sst, set.tu chyba jednak trzumamy si? termonologii field zamiast column nie?

orderDirectionNostringDetermines whether the sorting results will be displayed in ascending (ASC) or descending (DESC) order.

...

FieldTypeDescription
uidintegerUser Id.
unstringUsername.
hnstringHostname.
sststringThe date returned in yyyYYYY-MM-dd DD HH:mm MM format.
setstringThe date returned in yyyYYYY-MM-dd DD HH:mm MM format (for example, 2015-01-20 11:00), "Unknown", or "Still in use".
ilbooleanThis field/column  indicates whether user details have been imported from LDAP directory. Note that currently you cannot filter and order data by this field.
messagestringUnlimited string.

...

Code Block
languagejs
firstline1
linenumberstrue
curl --data-urlencode "sdt=2015-10-30 00:00" -H "X-Auth-token: abcdtoken" "http://youdomainyourdomain/api/report/user-history/3/json"

...

Code Block
languagejs
firstline1
linenumberstrue
curl --data "orderBy=un" --data-urlencode "sdt=2015-10-30 00:00" -H "X-Auth-token: abcdtoken" "http://yourdomain/api/report/user-history/3/json"

...

Code Block
languagejs
firstline1
linenumberstrue
  curl --data "limit=100" --data "offset=0" --data-urlencode "sdt=2015-10-30 00:00" -H "X-Auth-token: abcdtoken" "http://yourdomain/api/report/user-history/3/json"

...

Showing sessions over a specific time periodResponse fields can be explained as follows: