Retrieval of PVU and RVU license usage reports
You use the GET operation on the reports/metrics element
to request information about the current PVU and RVU license usage
reports.
You must have the View License Metrics permission to perform this
task.
| Operation details | Description |
|---|---|
| Operation | GET/reports/metrics |
| Purpose | Returns usage information about all licenses. |
| HTTP method | GET |
| Resource URI | https://server_host_name:port_number/api/sam/reports/metrics |
| URL link relation | n/a |
| URL query parameters | For a list of applicable query parameters, see: Query parameters. |
| Request headers |
Used to negotiate the language of the response. If this header is not specified, the content is returned in the server language. |
| Request payload | n/a |
Request Content-Type |
|
| Response headers |
Specifies the content type of the response. |
Specifies the language of the response content. If this header is not specified, the content is returned in the server language. |
|
| Response payload | reports element |
Response Content-Type |
|
| Normal HTTP response codes |
|
| Error HTTP response codes |
Message body includes an error message with details. |
Query parameters
You
can use query parameters to narrow down the results of your search.
The following table presents query parameters that you can use for
the reports/metrics element.
| Parameter | Description | Required | Value |
|---|---|---|---|
| criteria | Filtering criteria, expressed in the following
format: For
example: For the list of input parameters, see: Filtering parameters. |
No | |
| enddate | The query end date. | Yes | Date in the YYYY-MM-DD format |
| format | Returns data in JSON format. | Yes | json |
| limit | The number of rows to be returned. | No | Numeric Default: 50 |
| offset | The number of the first row of data to be returned. | No | NumericDefault: 0 |
| order[] | The parameter can be used to sort the results.
The format is:where:
Restriction: You can specify only one sort parameter. |
No | |
| reportgroupid | Identifier of the report group to which the computer that has the software installed belongs. | No | Numeric Default: 1 |
| startdate | The query start date. | Yes | Date in the YYYY-MM-DD format |
| token | A unique user authentication identifier. | Yes | Alphanumeric |
Filtering parameters
The following table describes extra filtering input parameters. The response output uses the same information items as the input parameters.
| Filtering parameter | Description | Value |
|---|---|---|
| metrictype | The type of the metric. The possible values
are:
|
Numeric |
| product | The name of the product. | String |
| productid | The identifier of the product. | Numeric |
| quantity | The quantity of used licenses. This is the license peak value, the maximum value utilized by the product over the specified time period. | Numeric |
Example command
http://localhost:9988/api/sam/reports/metrics
?token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623&format=json&startdate=2013-01-15
&enddate=2013-04-26Example HTTP conversation
- Request
GET /api/sam/reports/metrics ?token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623&format=json &startdate=2013-01-15&enddate=2013-04-26 HTTP/1.1 Host: localhost:9080 Accept: application/json Accept-Language: en-US- Response header
HTTP/1.1 200 OK Content-Type: application/json Content-Language: en-US- Response body (JSON)
[ { "product":"IBM WebSphere MQ Advanced", "productid":190, "isreaggregationneeded":false, "rollup_history":[{"time":"2013-11-11T00:00:00Z","hwm":"270"}, {"time": "2013-11-11T00:00:00Z","hwm":"270"}], "metrictype":3, "quantity":270} ]