Get Usage Metrics
get
/rest/v19/companies/usage
This endpoint returns usage metrics for a site.
Request
Query Parameters
-
q(required): string
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.
Response
Supported Media Types
- application/json
Default Response
The JSON data for all usage metrics, or a subset of the usage metrics, depending on the input request.
Root Schema : usage-collection
Type:
Show Source
object-
items:
array List of usage statistics
Title:
List of usage statisticsList of usage statistics
Nested Schema : List of usage statistics
Type:
arrayTitle:
List of usage statisticsList of usage statistics
Show Source
-
Array of:
object Usage
Title:
UsageUsage data for a specific type of license
Nested Schema : Usage
Type:
objectTitle:
UsageUsage data for a specific type of license
Show Source
-
details:
array List of Partner Organization usage statistics
Title:
List of Partner Organization usage statisticsList of channel usage statistics for all Partner Organizations -
enabled:
integer
Title:
EnabledNumber of enabled Users -
exhausted:
integer
Title:
ExhaustedNumber of exhausted licenses -
retention_date:
string
Title:
Retention DateEarliest date in which Interact license usage is available -
total:
integer
Title:
TotalNumber of allocated licenses -
type:
string
Title:
TypeType of license -
usage:
number
Title:
UsageAmount of disk space used
Nested Schema : List of Partner Organization usage statistics
Type:
arrayTitle:
List of Partner Organization usage statisticsList of channel usage statistics for all Partner Organizations
Show Source
-
Array of:
object Partner Organization Detail
Title:
Partner Organization DetailUsage data for individual Partner Organization
Nested Schema : Partner Organization Detail
Type:
objectTitle:
Partner Organization DetailUsage data for individual Partner Organization
Show Source
-
company:
string
Title:
CompanyName of Partner Organization -
enabled:
integer
Title:
EnabledNumber of enabled Users -
total:
integer
Title:
TotalNumber of allocated licenses
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 -H "Authorization: Bearer <token>" - H "Content-type: application/json" https://sitename.oracle.com/rest/v19/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"}