Versions Compared

Key

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


Warning
This page refers to functionality that has been removed from License Statistics. This information no longer applies to License Statistics v6.3 and newer.

 

License Statistics API lets you generate data from The Expiring Features endpoint delivers license usage metrics specific to  This the Expiring Features report.report shows statistics for features expiring in the futurethat are nearing expiration.

Obtaining information about expiring features

If you want to retrieve information about expiring features, we recommend that you use the following URL request template.

 

You can easily list features that are nearing expiration by sending the following HTTP request.

Code Block
languagejs
firstline1linenumberstrue
GET /api/v1/report/expiry/server/${licenseServerId}/json${returnType}?sd=${startDateYYYY-MM-DD}&ed=${endDateYYYY-MM-DD}$(additional parameters, as needed)

 where  - $ $ indicates a variable value that you can replace with an appropriate value, as needed - a value that best suits your needs. The possible parameters are as follows:described below.

Applies filtering license usage data on all fields.

To filter by string column, use the following format: 

ParameterRequiredTypeDescription
${licenseServerId}Yesinteger/string

Specifies id of Internal License Statistics identification of the license server for which we you want to gather data about feature expirations. It can also be set features nearing expiration. You can set this parameter to 'all' to gather data from all license servers.

${returnType}YesstringSpecifies the format in which license data will be returned. The format can be one of the following: json, csv, xls, xlsx or pdfStandard format option. See Making an API request for details.
sdNostringdateSpecifies the start Start date for which the report will be generated in YYYY-MM-DD format; for example, 2017-01-20. If not provided it defaults to today. If neither this field nor "ed" is provided, the date defaults to the current date.
edNostringdateSpecifies the end End date for which the report will be generated in YYYY-MM-DD format; for example, 2017-01-27. If not provided it defaults to [today + 12 months]
rn

No

string

Specifies 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
Code Block
languagejs
[
	{ 
		"type": "string",
		"field": "${fns | ftype | fexp | lsn | vn | fv}",
		"value": "${value}"
	}
]

To filter by numeric column, use the following format:

Code Block
languagejs
[
	{ 
		"type": "numeric", 
		"comparison": "${gt | lt | eq}", 
		"field": "${fid | lsid}",
		"value": "${value}" 
	}
]
fieldsVisibilityNojson/string

Specifies field visibility settings, like this:

Code Block
languagejs
{ 
	"fns": "1", 
	"fv": "1", 
	"ftype": "1", 
	"vn": "1", 
	"lsn": "1", 
	"fexp": "1"
}

where "1" indicates that a specific field is visible and ''0" indicates that 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.

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.orderByNostring

Specifies the field by which you want to order your data records. The field name can be one of the following:

fns | fv | ftype | vn | lsn | fexp
orderDirectionNostringDetermines whether the sorting results will be displayed in ascending (ASC) or descending (DESC) order.

 

...

. If neither this field nor "sd" is provided, the date defaults to the current date + 12 months.
standard report optionsNovarious

See Making an API request for details.

Response

On success, this report will contain one row for each feature expiring in the specified time range. Each row consists of the following columns.

Column
Full nameTypeDescriptionVisible by default in export
fidFeature IDintegerInternal License Statistics identification of the feature.(tick)Yes
fnsFeature Namestring

Feature name.

(tick)Yes
fvFeature VersionenumerationFeature version.(tick)Yes
ftypeFeature TypestringSee feature type descriptions for details.
(tick)Yes

vn

VendorstringName of license server vendor hosting the feature.(tick)Yes
lsidLicense Server IDintegerInternal License Statistics identification of license server hosting the feature.(tick)Yes
lsnLicense ServerstringName of license server hosting the feature.(tick)Yes
fexpFeature ExpiresdateDay when the feature expires.
(tick)Yes

Note that the order in the table is the default order of the columns in the exported file.

Example 1

The following example shows a command that obtains statistics about all features expiring in the next 12 months on all license servers. 

Code Block
languagebash
firstline1
linenumberstrue

...

Code Block
languagejs
{
	"success": ${success},
  	"msg": ${message},
  	"data": [
    	{
      		"fid": ${featureId},
      		"fns": ${featureName},
      		"ftype": ${featureType},
      		"fv": ${featureVersion},
      		"fexp": ${featureExpires},
      		"lsid": ${licenseServerId},
      		"lsn": ${licenseServerName},
      		"vn": ${licenseServerVendorName},
    	}
  	],
  	"code": ${code},
  	"totalCount": ${count}
}

 

where the response fields can be explained as follows:

...

Feature Name.

...

vn

...

Error code if success equals false, null otherwise.

...

 

Example 1

For example, say you would like to view all features expiring in next 12 months on all of you license servers. To generate such data, enter a command that is similar to the following:

Code Block
languagebash
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/expiry/server/all/json"

Example 2

For example, say you would like to view The following example shows a command that obtains information about all features expiring in some a specified period of time on one of your license servers that have licenseServerId=1. To generate such data, enter a command that is similar to the following:a license server with an ID of "1."

Code Block
languagebash
curl --data "sd=2015-01-01" --data "ed=2015-03-01" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/expiry/server/1/json"

 

Obtaining information about the number of features expiring features amounts in some period of timeIf you want to retrieve information about how many features expires in some period, we recommend that you use the following URL request template. 

You can easily list features that are going to expire in some period of time by sending the following HTTP request:

Code Block
languagejs
firstline1linenumberstrue
GET /api/v1/report/expiry/server/{licenseServerId}/count/grouped/json?sd=${startDateYYYY-MM-DD}&ed=${endDateYYYY-MM-DD}&granularity=${granularity}&filter=${filter}

Parameters are where the possible parameters can be explained as follows:

ParameterRequiredTypeDescription
licenseServerIdYes
arrayArrays of feature IDs in the following format: id1, id2, id3... for example fi=1,2,3,5
integer/stringInternal License Statistics identification of license server for which you want to gather data about features nearing expiration. You can set this parameter to 'all' to gather data from all license servers.
sdNo
string
date
Specifies the start
Start date for which the report will be generated
in YYYY-MM-DD format; for example, 2017-01-20. If not provided defaults to today
.If neither this field nor "ed" is provided, the date defaults to the current date.
edNo
string
date
Specifies the end
End date for which the report will be generated
in YYYY-MM-DD format; for example, 2017-01-27. If not provided defaults to [today + 12 months]
. If neither this field nor "sd" is provided, the date defaults to the current date + 12 months.
granularityNo
integer Specifies granularity of the returned data, which can be one of the following (defaults to Month):
  • Quarter - 2
  • Month - 3
  • Week - 4
  • Day - 5
enumeration

Period type the result is aggregated for. HOUR granularity is not supported. See granularity descriptions for further details.

By default, this parameter is set to MONTH

filterNo
string

Applies filtering license usage data on all fields.

To filter by string column, use the following format: 

Code Block
languagejs
[
	{ 
		"type": "string",
		"field": "${fns | ftype | fexp | lsn | vn | fv}",
		"value": "${value}"
	}
]

To filter by numeric column, use the following format:

 

Code Block
languagejs
[
	{ 
		"type": "numeric", 
		"comparison": "${gt | lt | eq}", 
		"field": "${fid | lsid}",
		"value": "${value}" 
	}
]

...

JSON

See Making an API request for details.

This report supports only JSON format.

This report supports filtering, but does not support other standard options (limiting or ordering).

Response

On success, this report will contain one row for each feature expiring in the specified time range. Each row consists of the following columns.


Column
Full nameTypeDescription
fexpyYearintegerYear for which the time period number has been specified.
fexpmPeriod Numberinteger

Number of time period such as day, week, month, etc.

fexpcCountintegerCount of features expiring in the given period of time.
granularityGranularityenumeration

Granularity given in parameter. Defaults to MONTH if unspecified

...

Code Block
languagejs
{
	"success": ${success},
  	"msg": ${message},
  	"data": [
    	{
      		"fexpy": ${featureId},
      		"fexpm": ${featureName},
      		"fexpc": ${featureVersion},
      		"granularity": ${granularity}
    	}
  	],
  	"code": ${code},
  	"totalCount": ${count}
}

...

FieldTypeDescription
successbooleanIndicates that your API request was successfully processed.
msgstringError message returned on failure.
fexpyintegerYear
fexpminteger

Number of period

fexpcintegerCount of expiring features in period
granularityinteger

Period granularity: 

  • QUARTER
  • MONTH
  • WEEK
  • DAY
codeinteger

Error code if success equals false, null otherwise.

totalCountintegerTotal number of rows returned

.

 

Example 1

For example, say you would like to get The following example shows a command that obtains a count of features that will expire for every month in the next 12 months on all your license servers. To generate such data, enter a command that is similar to the following:

Code Block
languagebash
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/report/expiry/server/all/count/grouped/json"


Example 2

For example, say you would like to get The following example shows a command that obtains a count of features that will expire for every week in some a specified period of time on a license server with id 1. To generate such data, enter a command that is similar to the following: an ID of "1."

Code Block
languagebash
curl --data "sd=2015-01-01" --data "ed=2015-03-01" --data "granularity=4" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/expiry/server/1/count/grouped/json"

...