You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

License Statistics API allows you to generate data from the Realtime Users Count report. The report shows user count for all realtime servers.

Obtaining information about realtime user count

If you want to retrieve information about realtime user count, we recommend that you send following HTTP request.

GET /api/v1/report/users-count/${returnType}

The possible parameters are as follows:

ParameterRequiredTypeDescription
${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.
fieldsVisibilityNojson/string

Specifies field visibility settings, for example:

{"ucd": "1", "uct": "1", "ucdy": "1", "ucde": "1", "ucch": "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

NostringSpecifies the name of the report that will be displayed once the report has been exported to PDF or XLS. For CSV and JSON formats, this parameter will be ignored.
If you don't pass this parameter, it will be generated automatically for PDF and XLS types. If provided, it cannot be left empty.
filterNojson/string

Applies filtering license usage data on all fields.

To filter by string column, use the following format:

[
	{ 
		"type": "string",
		"field": "ucd",
		"value": "${value}"
	}
]

To filter by a numeric column, use the following format:

 

[
    {
        "type": "numeric",
        "comparison": "${gt | lt | eq}",
        "field": "${uct | ucdy | ucde | ucch}",
        "value": "${value}"
    }
]
limitNointegerDetermines the maximum number of data records that can be returned. The value must be greater than zero.
offsetNointegerSpecifies the offset of the first row to return.
orderByNostringSpecifies the field by which you want to order your data records. The field name can be one of the following: ucd, uct, ucdy, ucde, ucch.
orderDirectionNostringDetermines 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 following:

{
    success: ${success},
    msg: ${message},
    data: [{
        "ucd": ${date},
        "uct": ${totalUsers},
        "ucdy": ${dailyUsers},
        "ucde": ${deniedUsers},
        "ucch": ${consurrentHosts}
    }],
    "code": ${errorCode},
    "totalCount": ${totalNumberOfRecords}
}

where the response fields can be explained as follows:

FieldTypeDescription

ucd

stringDate returned in YYYY-MM-DD format.

uct

integerTotal number of users specified in the license.

ucdy

integerNumber of daily users using a license on a particular date.

ucde

integerNumber of all users that were denied a license.

ucch

integerNumber of hosts that were concurrently active on a particular date.

msg

stringError message returned on failure.

success

booleanIndicates if the API request was successfully processed. 
codeintegerError code for unsuccessful request.
totalCountintegerTotal number of rows.

Example 1

To download realtime users count as an XSL file, enter a command similar to the following:

curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/users-count/xsl"

 

 

  • No labels