Skip to main content
POST
Get Togai Metrics

MetricQuery: Allowed field combinations


Storage

The *_FOR_CYCLE metrics in Togai are stored against the pricing cycle start date of accounts based on their pricing schedules.For instance, metrics of an account having a MONTHLY pricing cycle configued to invoice on 5th of every month, metrics are stored as follows.In case of changes to the plan, e.g, a different monthly plan which is configured to invoice on 1st of every month is associated to account from 2020-03-15, metrics are stored as follows.

Querying

Now, in order to query the *_FOR_CYCLE metrics for any pricing cycle, make sure that the PricingCycleStartDate lies within startTime (inclusive) and endTime (exclusive).Example, for metrics query with startTime as 2020-02-15T00:00:00Z and endTime as 2020-04-01T00:00:00Z results contain the data from below records.and not data from 2020-02-15T00:00:00Z or from 2020-04-01T00:00:00Z

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to get metrics from togai

startTime
string<date-time>
required

Start date time of the query (inclusive)

Example:

"2017-07-21T00:00:00Z"

endTime
string<date-time>
required

End date time of the query (exclusive)

Example:

"2017-07-21T00:00:00Z"

metricQueries
object[]
required

Response

Success response

Response to GetMetrics Request

results
object[]
required