Get Monthly Usage

Description

Retrieve how much relay traffic was used by a domain for a particular month. Monthly usage is indexed from 1 meaning 2017 is represented as 2017 and january is represented as 1.

Request

GET /v1/domains/:domain/usage/:year/:month

Response

Successful response contains the following JSON formated body:

{
  year: number,
  month: number,
  relayBytes: number
}

Response Status codes:

  • 200 on success

Request headers

This request must have the following headers:

  • Authorization: bearer <ApiKey>
  • X-Nabto-Organization: <organizationId>

Example

Request

curl "https://api.cloud.nabto.com/v1/domains/:domain/usage/:year/:month" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "X-Nabto-Organization: <OrganizationId>"

Response

{
   year: 42,
  month: 42,
  relayBytes: 42
}