Usage

Usage

Type Definitions

Usage

Source:
Properties:
Name Type Attributes Description
sys.id string Usage id in form of usage-{metric}-{entity}-key-{key}-{startAt}-{endAt}
sys.type "OrganizationPeriodicUsage" | "SpacePeriodicUsage" Usage internal type
sys.organization Meta.Link <optional>
Organization link when sys.type is OrganizationPeriodicUsage
sys.space Meta.Link <optional>
Space link when sys.code is SpacePeriodicUsage
unitOfMeasure "apiRequestsCount" Unit of measurement
metric Usage.UsageMetricEnum Type of the requested metric
dateRange.startAt string Start of the requested usage period in yyyy-mm-dd format
dateRange.endAt string End of the requested usage period in yyyy-mm-dd format
usage number Usage total for the requested metric and usage period
usagePerDay Object Usage per day for the requested metric and usage period, { "yyyy-dd-mm": number, ... }

UsageCollection

Source:
Properties:
Name Type Description
total number
limit number
skip number
order string
sys Object.<{type: "Array"}>
items Array.<Usage.Usage>
toPlainObject() function Returns the collection as a plain JS object

UsageMetricEnum

Source:
Type:
  • "cma" | "cda" | "cpa" | "gql"

UsageQuery

Source:
Properties:
Name Type Attributes Default Description
metric[in] string <optional>
One or more comma separated usage metrics. By default no filtering is applied.
dateRange.startAt string <optional>
Start of a usage period in yyyy-mm-dd format
dateRange.endAt string <optional>
End of a usage period in yyyy-mm-dd format
skip number <optional>
0
limit number <optional>
25
order string <optional>
"-usage"
The dateRange parameter is optional. When some or all of dateRange properties are missing the usage period is derived from today and the maximum reported data points which are currently set to 45 days. The calculated usage period is part of the response object see Usage.Usage