Skip to main content
GET
/
v1
/
meters
/
{id}
Python (SDK)
from polar_sdk import Polar


with Polar(
    access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

    res = polar.meters.get(id="<value>")

    # Handle response
    print(res)
{
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "name": "<string>",
  "filter": {
    "conjunction": "and",
    "clauses": [
      {
        "property": "<string>",
        "operator": "eq",
        "value": "<string>"
      }
    ]
  },
  "aggregation": {
    "func": "count"
  },
  "organization_id": "<string>",
  "archived_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

You can generate an Organization Access Token from your organization's settings.

Path Parameters

id
string<uuid4>
required

The meter ID.

Response

Successful Response

metadata
object
required
created_at
string<date-time>
required

Creation timestamp of the object.

modified_at
string<date-time> | null
required

Last modification timestamp of the object.

id
string<uuid4>
required

The ID of the object.

name
string
required

The name of the meter. Will be shown on customer's invoices and usage.

filter
Filter · object
required

The filter to apply on events that'll be used to calculate the meter.

aggregation
CountAggregation · object
required

The aggregation to apply on the filtered events to calculate the meter.

organization_id
string<uuid4>
required

The ID of the organization owning the meter.

archived_at
string<date-time> | null

Whether the meter is archived and the time it was archived.