Get Usage Metrics

get

/rest/v16/companies/usage

This endpoint returns usage metrics for a site.

Request

Query Parameters
  • Criteria to filter the usage statistics. Filter criteria are type (single value or multiple values using $in), company (single value only), and timestamp (start date using $gt or $gte and end date using $lt or $lte). Multiple filter criteria may be defined using $and.
Back to Top

Response

Supported Media Types

Default Response

The JSON data for all usage metrics, or a subset of the usage metrics, depending on the input request.
Body ()
Root Schema : usage-collection
Type: object
Show Source
Nested Schema : List of usage statistics
Type: array
Title: List of usage statistics
List of usage statistics
Show Source
Nested Schema : Usage
Type: object
Title: Usage
Usage data for a specific type of license
Show Source
Nested Schema : List of Partner Organization usage statistics
Type: array
Title: List of Partner Organization usage statistics
List of channel usage statistics for all Partner Organizations
Show Source
Nested Schema : Partner Organization Detail
Type: object
Title: Partner Organization Detail
Usage data for individual Partner Organization
Show Source
Back to Top

Examples

The following examples show how to search parts by submitting a GET request to the REST resource using cURL. For more information about cURL, see Use cURL.

curl - X GET - i - H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQg" - H "Content-type: application/json"
https://sitename.oracle.com/rest/v16/companies/usage

Request Body Sample

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

Query Examples

  • Return all license type usage information.
    https://sitename.oracle.com/companies/usage?q={timestamp:{$gt:"2021-05-05",$lt:"2021-06-05"}}
  • Return license usage information for multiple license types.
    https://sitename.oracle.com/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/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/companies/usage?q={$and:[{type:"channel"},{company:"abcCompany"}]}
  • Return disk space usage information.
    https://sitename.oracle.com/companies/usage?q={"type:"diskspace"}
Back to Top