Owostack
Api reference

Get customer usage history

Returns aggregated usage history for a customer, optionally filtered by feature and grouped for breakdown views.

GET
/v1/customers/{id}/usage/history

Authorization

bearerAuth

Path Parameters

id*string

Query Parameters

range?string
Default"30d"
Value in"7d" | "30d" | "90d" | "custom"
granularity?string
Default"day"
Value in"day" | "week" | "month"
feature?string
groupBy?string
Default"total"
Value in"total" | "feature"
timezone?string
Default"UTC"
from?string
Match^\d{4}-\d{2}-\d{2}$
to?string
Match^\d{4}-\d{2}-\d{2}$

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.owostack.com/v1/customers/string/usage/history"
{
  "customer": {
    "id": "string"
  },
  "query": {
    "range": {
      "from": "string",
      "to": "string"
    },
    "granularity": "day",
    "feature": "string",
    "groupBy": "total",
    "timezone": "string"
  },
  "totals": {
    "usage": 0,
    "records": 0
  },
  "series": [
    {
      "bucket": "string",
      "value": 0
    }
  ],
  "breakdown": [
    {
      "feature": {
        "id": "string",
        "slug": "string",
        "name": "string",
        "unit": "string"
      },
      "totals": {
        "usage": 0,
        "records": 0
      },
      "series": [
        {
          "bucket": "string",
          "value": 0
        }
      ]
    }
  ]
}
{
  "success": true,
  "error": "string",
  "code": "string",
  "message": "string",
  "property1": null,
  "property2": null
}
{
  "success": true,
  "error": "string",
  "code": "string",
  "message": "string",
  "property1": null,
  "property2": null
}
{
  "success": true,
  "error": "string",
  "code": "string",
  "message": "string",
  "property1": null,
  "property2": null
}
{
  "success": true,
  "error": "string",
  "code": "string",
  "message": "string",
  "property1": null,
  "property2": null
}

Ask about owostack

Ready

Start a new chat below.

Powered by Cull