Versions Compared

Key

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

...

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

...

Applies filtering license usage data on all fields.

To filter by a 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 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, xlsx, or pdfStandard format option. See Making an API request for details.
sdNostringdateSpecifies the start 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 the date defaults to todaythe current date.
edNostringdateSpecifies the end 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 the date defaults to [today the current date + 12 months].rn
standard report optionsNostring

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

filterNojson/string
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

...

various

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.Yes
fnsFeature Namestring

Feature name.

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

vn

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

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

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}
}

...

Feature name.

...

vn

...

Error code if success equals false, null otherwise.

...

.

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
languagejs
firstline1
GET /api/v1/report/expiry/server/{licenseServerId}/count/grouped/json?sd=${startDateYYYY-MM-DD}&ed=${endDateYYYY-MM-DD}&granularity=${granularity}&filter=${filter}

where the possible parameters can be explained as follows:

ParameterRequiredTypeDescription
licenseServerIdYesinteger/string
ID
Internal License Statistics identification of
the
license server
or
for which you want to gather data about features nearing expiration. You can set this parameter to 'all'
string for
to gather data from all license servers.
sdNo
string
date
Specifies the start
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
the date defaults to
today
the current date.
edNo
string
date
Specifies the end
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
the date defaults to
[today
the current date + 12 months
]
.
granularityNo
string

Specifies granularity of the returned data, which can be one of the following:

  • QUARTER or 2
  • MONTH or 3
  • WEEK or 4
  • enumeration

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

    DAY or 5

    By default, this parameter is set to

    show monthly statistics.

    MONTH

    filterNo
    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}" 
    	}
    ]

    Response

    ...

    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
    fexpyYear
    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 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.
    granularitystring

    Specifies granularity of the returned data, which can be one of the following:

    • QUARTER or 2
    • MONTH or 3
    • WEEK or 4
    • DAY or 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.
    Granularityenumeration

    Granularity given in parameter. Defaults to MONTH if unspecified.

     

    Example 1

    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 license servers.

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

    ...

    The following example shows a command that obtains a count of features that will expire for every week in a specified period of time on a license server with an ID of "1."

    ...