Usage Metrics REST API
Overview
Oracle CPQ expands Web Service support to provide administrators with easier access to licensing and disk space information as follows:
- Total number of API licenses available and the number of API licenses consumed within a specified date/time range.
-
Total number of eCommerce interactions available and the number of eCommerce interactions consumed within a specified date/time range.
-
Total number of internal licenses purchased and the number of enabled internal licenses.
-
Total number of channel licenses purchased and the number of enabled channel licenses for Partner Organizations.
- Total amount of disk space consumed in Gigabytes (GB).
Administration
Administrators can retrieve usage metrics for all or specific license types and for disk space consumption via the Usage Metrics REST API. This provides accurate and real-time license and disk space information to help administrators in decision making, usage tracking, and troubleshooting.
Description |
This endpoint returns usage metrics for a site. |
|
---|---|---|
URI Endpoint |
/rest/v17/companies/usage |
|
Endpoint Query Parameters |
This endpoint supports the following query specifications. For more information, see Manage Collections. |
|
type
|
This endpoint supports the optional
|
|
timestamp
|
This endpoint supports the optional timestamp query string parameter to clarify a start and end time for the usage metrics to include in the response results.
The timestamp query parameters are required when the query includes api or interact license results. The timestamp is ignored if the type is internal or channel. |
|
company
|
This endpoint supports the optional company query string parameter to clarify the Partner Organization for channel usage metric to include in the response results.
If the company is not specified, all channel license information for all Partner Organizations are returned. The company query string parameter is ignored if the type is internal, api, or interact.
|
|
This endpoint supports the query parameter with the following restrictions:
|
||
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
The JSON data for all usage metrics, or a subset of the usage metrics, depending on the input request. |
|
type
|
This type of usage metric or license. The following parameters are supported:
|
|
total
|
The usage data for the channel and Partner Organization.
If requested, the Partner Organization details specifies the total count of interact licenses based on the Maximum Users set for the Partner Organization. If the number of Maximum Users is not set, the details field displays To view the Partner Organization's Maximum Users setting, navigate to the Company Administration List page. For disk space usage, the |
|
enabled
|
The total number of users enabled for the channel or Partner Organization. | |
exhausted
|
The number of licenses consumed. | |
retention_date
|
The latest date that interact license usage information is available. | |
usage
|
The calculated disk space value in Gigabytes (GB). The disk space consumption is calculated as the sum of the following:
|
https:///rest/v17sitename.oracle.com/rest/v17/companies/usage
Query Examples:
-
Return all license type usage information
https://sitename.oracle.com/rest/v17/companies/usage?q={timestamp:{$gt:"2021-05-05",$lt:"2021-06-05"}}
-
Return license usage information for multiple license types.
https://sitename.oracle.com/rest/v17/companies/usage?q={$and:[{type:{$in:["api","interact"]}},{timestamp:{$gt:"2021-01-05",$lt:"2021-02-05"}}]}
-
Return a license usage information for a single license type.
https://sitename.oracle.com/rest/v17/companies/usage?q={$and:[{type:"api"},{timestamp:{$gt:"2021-05-05",$lt:"2021-06-05"}}]}
-
Return channel license usage information for a Partner Organization.
https://sitename.oracle.com/rest/v17/companies/usage?q={$and:[{type:"channel"},{company:"abcCompany"}]}
-
Return disk space usage information.
https://sitename.oracle.com/rest/v17/companies/usage?q={"type:"diskspace"}
"items": [{ "type": "internal", "total": 1000, "enabled": 540 }, { "type": "channel", "total": 1000, "enabled": 394 "details": [{ "company": "abcCompany", "total": 500, "enabled": 200 }, { "company": "defCompany", "total": 500, "enabled": 194 }, { "company": "ghiCompany", "total": -1 "enabled": 2 } }, { "type": "api", "total": 10000, "exhausted": 44938 }, { "type": "interact", "total": 1000, "exhausted": 345, "retention_date": "2021-05-17" }, { "type": "diskspace", "total": -1, "usage": 0.628 } ] }