Versions Compared

Key

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

...

Code Block
languagejs
linenumberstrue
{
	"success": ${success},
  	"msg": ${message},
  	"data": [
    	{
      		"fid": ${featureId},
      		"lud": ${date},
      		"lumin": ${minUsed},
      		"lua": ${averageUsed},
      		"lumax": ${maxUsed},
      		"lbmin": ${minBorrowed},
      		"lbmax": ${maxBorrowed},
      		"ldtc": ${denials},
      		"hu": ${hoursUsed},
      		"ft": ${total}
    	}
  	],
  	"code": ${code},
  	"totalCount": ${count}
}

where Where the response fields can be explained as follows.

Anchor
fields def
fields def

...

Code Block
languagejs
firstline1
GET /api/v1/report/feature/usage-history/comparison/json${returnType}?fi=${featureIds}&sd=${startDate}&ed=${endDate}&granularity=${granularity}

...

Code Block
languagejs
firstline1
 GET /api/v1/report/usage-history/comparison/json${returnType}?fi=${featureIds}&sd=${startDate}&ed=${endDate}&granularity=${granularity}

...

ParameterRequiredTypeDescription
${returnType}YesstringSpecifies the format in which usage history comparison data will be returned. The format can be one of the following: json, csv, xls, xlsx or pdf.
featureIdsYesarrayArrays of feature IDs in the following format: id1, id2, id3... for example fi=1,2,3,5.
sdYesstringSpecifies the start date for which the report will be generated in YYYY-MM-DD format; for example, 2017-05-20.
edYesstringSpecifies the end date for which the report will be generated in YYYY-MM-DD format; for example, 2017-05-27.
granularityYesinteger Specifies granularity of the returned data, which can be one of the following:
  • Quarter - 2
  • Month - 3
  • Week - 4
  • Day - 5
  • Hour - 6

Currently the report is only returned only in JSON syntax. There are plans to introduce CSV, XLS and PDF formats in the future.

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

Code Block
languagejs
linenumberstrue
{
	"success": ${success},
  	"msg": ${message},
  	"data": [
    	{
      		"fid": ${featureId_1},
            "fns": ${featureName},
			"ludftype": ${datefeatureType},
      			"luminfv": ${minUsedfeatureVersion},
      		"lualud": ${averageUseddate},
      		"lumaxlumin": ${maxUsedminUsed},
      		"lua": ${averageUsed},
      		"lumax": ${maxUsed},
      		"lbmin": ${minBorrowed},
      		"lbmax": ${maxBorrowed},
      		"ldtc": ${denials},
      		"hu": ${hoursUsed},
      		"ft": ${total}
    	},
		{
      		"fid": ${featureId_2},
      		"lud": ${date},
      		"luminfns": ${minUsedfeatureName},
      			"luaftype": ${averageUsedfeatureType},
			"fv": ${featureVersion},
      		"lumaxlud": ${maxUseddate},
      		"lbminlumin": ${minBorrowedminUsed},
      		"lbmaxlua": ${maxBorrowedaverageUsed},
      		"ldtclumax": ${denialsmaxUsed},
      		"hulbmin": ${hoursUsedminBorrowed},
      		"ftlbmax": ${totalmaxBorrowed},
    	}
  	],
  	"codeldtc": ${codedenials},
      		"totalCounthu": ${counthoursUsed}
}

...

,
      		"ft": ${total}
    	}
  	],
  	"code": ${code},
  	"totalCount": ${count}
}

 

where the response fields can be explained as follows.

Anchor
fields def
fields def

 

FieldTypeDescription
successbooleanIndicates whether your API request was successfully processed.
msgstringError message returned on failure.
fidinteger

Feature ID.

fnsstringFeature name.
ftypestringFeature type.
fvstringFeature version.
ludstring

Indicates period of time for which usage information is generated, i.e. date and time for hourly usage and dates for the remaining granularity options.

luminintegerMinimal licenses used count for a given date.
luafloatAverage licenses used count for a given date.
lumaxintegerMaximum licenses used count for a given date.
lbminintegerMinimal licenses borrowed count for a given date.
lbmaxintegerMaximum licenses borrowed count for given date.

ldtc

integerDenials count.
hufloatHours used.
ftintegerFeature total.
codeinteger

Error code if success equals false, null otherwise.

totalCountintegerTotal number of rows returned.


Obtaining information about usage history for a license server
Anchor
lsApi
lsApi

...

Code Block
languagejs
linenumberstrue
{
	"success": ${success},
	"msg": ${message},
  	"data": [
    	{
      		"fid": ${featureId_1},
            "fns": ${featureName},
			"ftype": ${
      featureType},
			"fidfv": ${featureId_1featureVersion},
      		"lud": ${date},
      		"lumin": ${minUsed},
      		"lua": ${averageUsed},
      		"lumax": ${maxUsed},
      		"lbmin": ${minBorrowed},
      		"lbmax": ${maxBorrowed},
      		"ldtc": ${denials},
      		"hu": ${hoursUsed},
      		"ft": ${total}
    	},
		{
      		"fnsfid": ${featureNamefeatureId_1},
			"ftype            "fns": ${featureTypefeatureName},
			"fv": ${featureVersion}
    	ftype": ${featureType},
		{
      		"fidfv": ${featureId_1featureVersion},
      		"lud": ${date},
      		"lumin": ${minUsed},
      		"lua": ${averageUsed},
      		"lumax": ${maxUsed},
      		"lbmin": ${minBorrowed},
      		"lbmax": ${maxBorrowed},
      		"ldtc": ${denials},
      		"hu": ${hoursUsed},
      		"ft": ${total},
			"fns": ${featureName},
			"ftype   		"hu": ${featureTypehoursUsed},
	      		"fvft": ${featureVersiontotal}
    	}
  	],
  	"code": ${code},
  	"totalCount": ${count}
}

...

FieldTypeDescription
successbooleanIndicates whether your API request was successfully processed.
msgstringError message returned on failure.
fidinteger

Feature ID.

fnsstringFeature name.
ftypestringFeature type.
fvstringFeature version.
ludstringIndicates period of time for which usage information is generated, i.e. date and time for hourly usage and dates for the remaining granularity options.
luminintegerMinimal licenses used count for given date.
luafloatAverage licenses used count for given date.
lumaxintegerMaximum licenses used count for given date.
lbminintegerMinimal licenses borrowed count for given date.
lbmaxintegerMaximum licenses borrowed count for given date.

ldtc

integerDenials count.
hufloatHours used.
ftintegerFeature total.
codeintegerError code if success equals false, null otherwise.
totalCountintegerfvstringTotal number of rows returned.
fnsstringFeature name.
ftypestringFeature type.
Feature version.

If any of the requests has invalid or missing parameters, HTTP 400 BAD REQUEST is returned.

...