Versions Compared

Key

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

...

where $ indicates a variable value that you can replace with a value that best suits your needs and the . The possible parameters can be explained as follows:are described below.

ParameterRequiredTypeDescription
${licenseServerId}Yesinteger/string

Specifies ID of license server for which we want to gather data about 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 pdf.
sdNostringSpecifies the start date for which the report will be generated. The date is in YYYY-MM-DD format; for example, 2017-05-20. If neither this field, nor "ed" is provided, it defaults to today.
edNostringSpecifies the end date for which the report will be generated. The date is in YYYY-MM-DD format; for example, 2017-05-27. If neither this field, nor "sd" is 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, 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 a string column, use the following format: 

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

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

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


fieldsVisibilityNojson/string

Specifies field visibility settings, like this:

Code Block
languagejs
firstline1
linenumberstrue
{ 
	"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.

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:

fid | fns | fv | ftype | vn | lsn | fexp

(See this section for more field-specific information.)

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

Response

The following code block shows an example result of a successful request.

Code Block
languagejs
firstline1
linenumberstrue
{
	"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}
}

...

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

Feature name.

ftypestringFeature type.
fvstringFeature version.
fexpstringFeature expiration date.
lsidintegerLicense server ID.
lsnstringLicense server name.

vn

stringLicense server vendor name.
codeinteger

Error code if success equals false, null otherwise.

totalCountintegerTotal number of rows that will be returned.


Example 1

Say you would like to obtain The following example shows a command that obtains statistics about all features expiring in the next 12 months on all of you license servers. To generate such data set, enter a command that is similar to the following. 

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

Example 2

If you would like to obtain The following example shows a command that obtains information about all features expiring in some a specified period of time on a license server that has licenseServerId=1, enter a command similar to the following.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"

...

ParameterRequiredTypeDescription
licenseServerIdYesinteger/stringID of the license server or 'all' string for all license servers.
sdNostringSpecifies the start date for which the report will be generated. The date is in YYYY-MM-DD format; for example, 2017-05-20. If neither this field, nor "ed" is provided, it defaults to today.
edNostringSpecifies the end date for which the report will be generated. The date format is YYYY-MM-DD; for example, 2017-05-27. If neither this field, nor "sd" is provided, it defaults to [today + 12 months].
granularityNointegerSpecifies granularity of the returned data, and can be one of the following:
  • Quarter - 2
  • Month - 3
  • Week - 4
  • Day - 5

By default, this parameter is set to show monthly statistics.

filterNostring

Applies filtering license usage data on all fields.

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

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

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

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


Response

The following code block shows an example result of a successful request.

Code Block
languagejs
firstline1
linenumberstrue
{
	"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 for which the period number has been specified.
fexpminteger

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

fexpcintegerCount of features expiring in the given period of time.
granularityintegerSpecifies granularity of the returned data, and can be one of the following:
  • Quarter - 2
  • Month - 3
  • Week - 4
  • Day - 5
By default, this parameter is set to show monthly statistics.
codeinteger

Error code if success equals false, null otherwise.

totalCountintegerTotal number of rows returned.

 

Example 1

If you would like to obtain 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 servers, enter a command 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

Say you would like to obtain 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 server with an ID of "1. To generate such data set, enter a command similar to the following."

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"

...