Versions Compared

Key

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

...

Obtaining information about checkout denials

You can easily list the username and hostname for each denial denials for given feature that took place by sending the following HTTP request.

Code Block
languagejs
firstline1
GET /api/v1/report/feature/${featureId}/denials/${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
${featureId}Yesinteger

Specifies ID Internal License Statistics identification of the feature for which you want to view denied requests.

${returnType}YesstringSpecifies the format in which the data should be returned. The format can be one of the following: json, csv, xlsx, or pdfStandard format option. See Making an API request for details.
sdYesstringdateSpecifies the starting Start date from for which you want to generate the report. The date is in YYYY-MM-DD format; for example, 2017-05-20.
ed

Yes

stringdateSpecifies the end End date from for which you want to generate the report. The date is in YYYY-MM-DD format; for example, 2017-05-20. The date is inclusive, meaning that all data from a particular day will be included in the report.
fieldsVisibilitystandard report options Nojson/string

Specifies field visibility settings, for example:

Code Block
languagejs
firstline1
linenumberstrue
{"un": "1", "hn": "1", "ldt": "1", "ldtc":"1"}

where number "1" indicates that a specific field is visible.
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.

rnNostringSpecifies the name of the report that will be displayed once the report has been exported to PDF or XLSX. 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 XLSX types. If provided, it cannot be left empty.
filterNojson/string
Code Block
languagejs
firstline1
linenumberstrue
[
	{ 
		"type": "string",
		"field": "${un | hn | ldt}",
		"value": "${value}"
	}
]
To filter by a numeric column, use the following format. 
Code Block
languagejs
firstline1
[
	{ 
		"type": "numeric", 
		"comparison": "${gt | lt | eq}", 
		"field": "ldtc",
		"value": "${value}" 
	}
]
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:

un, hn, ldt, ldt

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

orderDirectionNostringDetermines whether the sorting results will be displayed in an ascending (ASC) or a 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: [{
        "un": ${userName},
        "hn": ${hostName},
        "ldt": ${licenseDenialTime},
        "ldtc": ${licenseDenialTotalCount}
      }],
	  "code": ${errorCode},
	  "totalCount": ${totalCount}
  }

...

un

...

string

...

Username.

...

hn

...

string

...

Hostname.

...

ldt

...

string

...

 Date on which the denial took place in YYYY-MM-DD format.

...

ldtc

...

string

...

Total number of denied license checkout requests.

...

msg

...

string

...

Error message returned on failure.

...

success

...

boolean

...

Indicates whether your API request was successfully processed. 

...

Error code for unsuccessful request.

...

various

See Making an API request for details.

Response

On successreport will contain one row for each denial, from the given date range. Each row consists of the following columns.

Column
Full nameTypeDescriptionVisible by default in export

ldt

Date

date and time

Time when the denial took place.

Yes

ldtc

Denials

integer

Number of denied licenses.

Yes

un

Username

string

Name of the denied user.

Yes

hn

Hostname

string

Host from which the denied user tried to check out the license.

Yes

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

...

.

Example 1

The following example shows a command that lets you obtain information about denials for feature "3" over a given specified time period.

Code Block
languagejs
firstline1
linenumberstrue
curl --data "sd=2015-01-01" --data "ed=2015-01-02" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/feature/3/denials/json"

...

The following example shows a command that lets you obtain information about all denials for feature "3" over a specific specified time period, with data ordered by username.

...

The following example shows a command that lets you view the first 100 denials for feature "3" over a given specified time period.

Code Block
languagejs
firstline1
linenumberstrue
curl --data "limit=100" --data "offset=0" --data "sd=2015-01-01" --data "ed=2015-01-02" -H "X-Auth-token: token" "http://yourdomain/api/v1/report/feature/3/denials/json"

You can also put parameters directly into the URL; for . For the above example, the command would be similar to the following.

...

Obtaining information about grouped checkout denials

You can easily list the cumulative number of denials for username and hostname a given feature per fixed time period by sending the following HTTP request.

...

stringSpecifies end . The date is in YYYY-MM-DD format; for example, 2017-05-20

Applies filtering license usage data on all fields.

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

ParameterRequiredTypeDescription
${featureId}Yesinteger

Specifies ID Internal License Statistics identification of the feature for which you want to view grouped checkout denials.

${returnType}YesstringSpecifies format in which the data should be returned. The format can be one of the following: json, csv, xlsx, or pdfStandard format option. See Making an API request for details.
sdYesstringdateSpecifies starting Start date from which you want to generate the report. The date is in YYYY-MM-DD format; for example, 2017-05-20.
ed

Yes

dateEnd date from which you want to generate the report. The date is inclusive, meaning that all data from a particular day will be included in the report.
gratYesstring

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
  • HOUR or 6
fieldsVisibility Nojson/string

Specifies field visibility settings, for example:

Code Block
languagejs
firstline1
linenumberstrue
{"ldt": "1", "ldtc":"1"}

where number "1" indicates that a specific field is visible.
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.

rnNostringSpecifies the name of the report that will be displayed once the report has been exported to PDF or XLSX. 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 XLSX types. If provided, it cannot be left empty.
filterNojson/string
Code Block
languagejs
firstline1
linenumberstrue
[
	{ 
		"type": "string",
		"field": "ldt",
		"value": "${value}"
	}
]
To filter by a numeric column, use the following format: 
Code Block
languagejs
firstline1
[
	{ 
		"type": "numeric", 
		"comparison": "${gt | lt | eq}", 
		"field": "ldtc",
		"value": "${value}" 
	}
]
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:

un, hn, ldt, ldt

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

orderDirectionNostringDetermines whether the sorting results will be displayed in 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: [{
        "ldt": ${licenseDenialTime},
        "ldtc": ${licenseDenialTotalCount}
      }]
  }

where the response fields can be explained as follows:

...

ldt

...

string

...

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.

...

ldtc

...

string

...

Total number of denied license checkout requests.

...

msg

...

string

...

Error message returned on failure.

...

success

...

boolean

...

Indicates if the API request was successfully processed.

...

msg

...

string

...

Error message returned on failure.

...

Error code for unsuccessful request.

enumeration

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

standard report options Novarious

See Making an API request for details.

Response

On success, this report will contain one row for each period (e.g., each day or week) from the specified date range. Each row consists of the following columns.

ColumnFull nameTypeDescriptionVisible by default in export

ldt

Date

various

The time period. Format depends on granularity.

Yes

ldtc

Denials

string

Cumulative number of denials licenses in the time period for the feature.

Yes

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

...

.

Example 1

The following example shows a command that obtains information about denials for feature "3" grouped by month.

...

You can also put parameters directly into the URL; for . For the above example, the command would look like the following:

...