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. |
The Expiring Features endpoint delivers license usage metrics specific to the Expiring Features report for features that are nearing expiration.
...
Code Block | ||||
---|---|---|---|---|
| ||||
GET /api/v1/report/expiry/server/${licenseServerId}/json${returnType}?sd=${startDateYYYY-MM-DD}&ed=${endDateYYYY-MM-DD}$(additional parameters, as needed) |
...
Parameter | Required | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
${licenseServerId} | Yes | integer/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} | Yes | string | Specifies 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. | |||||||||||||||||||||
sd | No | stringdate | 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 todaythe current date. | |||||||||||||||||||||
ed | No | stringdate | Specifies 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 options | No | string | 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. | filter | No | json/string |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[
{
"type": "string",
"field": "${fns | ftype | fexp | lsn | vn | fv}",
"value": "${value}"
}
] |
To filter by a numeric column, use the following format:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[
{
"type": "numeric",
"comparison": "${gt | lt | eq}",
"field": "${fid | lsid}",
"value": "${value}"
}
] |
Specifies field visibility settings, like this:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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.
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.)
Response
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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}
} |
...
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 name | Type | Description | Visible by default in export |
---|---|---|---|---|
fid | Feature ID | integer | Internal License Statistics identification of the feature. | Yes |
fns | Feature Name | string | Feature name. | Yes |
fv | Feature Version | enumeration | Feature version. | Yes |
ftype | Feature Type | string | See feature type descriptions for details. | Yes |
vn | Vendor | string | Name of license server vendor hosting the feature. | Yes |
lsid | License Server ID | integer | Internal License Statistics identification of license server hosting the feature. | Yes |
lsn | License Server | string | Name of license server hosting the feature. | Yes |
fexp | Feature Expires | date | Day when the feature expires. | Yes |
Note that the order in the table is the default order of the columns in the exported file
...
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 | ||||
---|---|---|---|---|
| ||||
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:
Parameter | Required | Type | Description |
---|---|---|---|
licenseServerId | Yes | integer/string |
Internal 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. | |
sd | No |
date |
Start date for which the report will be generated |
.If neither this field |
nor "ed" is provided, |
the date defaults to |
the current date. | |
ed | No |
date |
End date for which the report will be generated. |
If neither this field |
nor "sd" is provided, |
the date defaults to |
the current date + 12 months |
. | |
granularity | No |
- 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 | |
filter | No |
Applies filtering license usage data on all fields.
To filter by a string column, use the following format:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[
{
"type": "string",
"field": "${fns | ftype | fexp | lsn | vn | fv}",
"value": "${value}"
}
] |
To filter by a numeric column, use the following format:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[
{
"type": "numeric",
"comparison": "${gt | lt | eq}",
"field": "${fid | lsid}",
"value": "${value}"
}
] |
Response
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"success": ${success},
"msg": ${message},
"data": [
{
"fexpy": ${featureId},
"fexpm": ${featureName},
"fexpc": ${featureVersion},
"granularity": ${granularity}
}
],
"code": ${code},
"totalCount": ${count}
} |
...
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 name | Type | Description |
---|---|---|---|
fexpy | Year | integer | Year for which the time |
...
Field | Type | Description | |
---|---|---|---|
success | boolean | Indicates that your API request was successfully processed. | |
msg | string | Error message returned on failure. | |
fexpy | integer | Year for which the period number has been specified. | |
fexpm | Period Number | integer | Number of time period such as day, week, month, etc. |
fexpc | Count | integer | Count of features expiring in the given period of time. |
granularity | integer | Specifies granularity of the returned data, and can be one of the following:
| |
code | integer | Error code if success equals false, null otherwise. | |
totalCount | integer | Total number of rows returned. | |
Granularity | enumeration | 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 | ||
---|---|---|
| ||
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."
...