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:

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.

ClosedGet Usage Metrics

Get Usage Metrics GET Method

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 type query string parameter to clarify the type of usage metric to include in the response results. The following type parameters are supported:

  • internal
  • channel
  • api
  • interact
  • diskspace
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:

  • {type, timestamp, and company} can only be grouped together by $and

  • type supports the $in operator only

  • company can only be a single company name

  • timestamp supports $gt, $gte, $lt, and $lte to specify a date/time range

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:

  • internal
  • channel
  • api
  • interact
  • diskspace
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 -1.

To view the Partner Organization's Maximum Users setting, navigate to the Company Administration List page.

For disk space usage, the total field displays -1.

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:

  • The cumulative size of all the files attached through file attachment attributes.
  • The cumulative size of all the files uploaded through file manager.

ClosedURI Endpoint Samples

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


ClosedResponse Body Sample

Related Topics

Related Topics Link IconSee Also