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

Compare with Current View Page History

Version 1 Next »

 

License Statistics API lets you generate data from the Expiring Features report. This report shows statistics for features expiring in the future.

Obtaining information about expiring features

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

 

GET /api/v1/report/expiry/server/${licenseServerId}/json?sd=${startDate}&ed=${endDate}$(additional parameters, as needed)


 
where

 

 - $ indicates a variable value that you can replace with an appropriate value, as needed

 

 - possible parameters are as follows:

 

ParameterRequiredTypeDescription
${licenseServerId}Yesinteger/string

Specifies id of license server for which we want to gather data about feature expirations. It can also be set to 'all' to gather data from all 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 pdf.
sdNostringSpecifies the 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
edNostringSpecifies the 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

Applies filtering license usage data on all fields.

To filter by string column, use the following format: 

[
	{ 
		"type": "string",
		"field": "${fn | ft | fe | lsn | lsvn | fv}",
		"value": "${value}"
	}
]

To filter by numeric column, use the following format:

[
	{ 
		"type": "numeric", 
		"comparison": "${gt | lt | eq}", 
		"field": "${fig | lsid}",
		"value": "${value}" 
	}
]


fieldsVisibilityNojson/string

Specifies field visibility settings, like this:

{ 
	"fn": "1", 
	"fv": "1", 
	"ft": "1", 
	"lsvn": "1", 
	"lsn": "1", 
	"fe": "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:

fn | fv | ft | lsvn | lsn | fe
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": [
    	{
      		"fid": ${featureId},
      		"fn": ${featureName},
      		"ft": ${featureType},
      		"fv": ${featureVersion},
      		"fe": ${featureExpires},
      		"lsid": ${licenseServerId},
      		"lsn": ${licenseServerName},
      		"lsvn": ${licenseServerVendorName},
    	}
  	],
  	"code": ${code},
  	"totalCount": ${count}
}

 

where the response fields can be explained as follows:

 

FieldTypeDescription
successbooleanIndicates that your API request was successfully processed.
msgstringError message returned on failure.
fidintegerFeature ID.
fnstring

Feature Name

ftstringFeature Type
fvstringFeature Version
festringFeature Expires (feature expiration date)
lsidintegerLicense Server Id
lsnstringLicense Server Name

lsvn

stringLicense Server Vendor Name
codeinteger

Error code if success equals false, null otherwise.

totalCountintegerTotal number of rows returned.

 

Obtaining information about expiring features amounts in some period of time

If you want to retrieve information about how many features expire in some period, we recommend that you use the following URL request template. 

GET /api/v1/report/expiry/server/{licenseServerId}/count/grouped/json?sd=${startDate}&ed=${endDate}&granularity=${granularity}&filter=${filter}

Parameters are as follows

ParameterRequiredTypeDescription
licenseServerIdYesarrayArrays of feature IDs in the following format: id1, id2, id3... for example fi=1,2,3,5.
sdNostringSpecifies the 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.
edNostringSpecifies the 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]
granularityNointeger Specifies granularity of the returned data, which can be one of the following (defaults to Month):
  • Quarter - 2
  • Month - 3
  • Week - 4
  • Day - 5
filterNostring

Applies filtering license usage data on all fields.

To filter by string column, use the following format: 

[
	{ 
		"type": "string",
		"field": "${fn | ft | fe | lsn | lsvn | fv}",
		"value": "${value}"
	}
]

To filter by numeric column, use the following format:

 

[
	{ 
		"type": "numeric", 
		"comparison": "${gt | lt | eq}", 
		"field": "${fig | lsid}",
		"value": "${value}" 
	}
]


 


  • No labels