Skip to main content
PUT
/
v1
/
aggregators
/
{id}
Update aggregator
curl --request PUT \
  --url https://api.hyperline.co/v1/aggregators/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "entity": "api_calls",
  "type": "metered",
  "where": {
    "conditional": "and",
    "fields": [
      {
        "property": "<string>",
        "operator": "isNull"
      }
    ]
  },
  "name": "<string>",
  "description": "<string>",
  "allow_negative_values": false,
  "custom_event_name": "<string>",
  "exposed_event_keys": [
    "<string>"
  ],
  "operation": "count",
  "property": "<string>"
}
'
{
  "id": "<string>",
  "entity": "<string>",
  "operation": "count",
  "property": "<string>",
  "where": {
    "conditional": "and",
    "fields": [
      {
        "property": "<string>",
        "operator": "isNull"
      }
    ]
  },
  "type": "metered",
  "name": "<string>",
  "description": "<string>",
  "allow_negative_values": true,
  "custom_event_name": "<string>",
  "exposed_event_keys": [
    "<string>"
  ],
  "created_at": "2023-12-25",
  "updated_at": "2023-12-25"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Body

application/json
entity
string

The billable event entity to aggregate.

Example:

"api_calls"

type
enum<string>
default:metered

The type of aggregator.

Available options:
metered,
licensed
where
object

Filter conditions for the aggregation.

name
string

Name of the aggregator.

description
string

Description of the aggregator.

allow_negative_values
boolean
default:false

Whether the aggregator can produce negative values.

custom_event_name
string

Custom event name for the aggregator.

exposed_event_keys
string[]

Event keys exposed by the aggregator.

operation
enum<string>

The aggregation operation to perform.

Available options:
count,
sum
property
string

The property to sum. Required when operation is 'sum'.

Response

id
string
required
entity
string
required
operation
enum<string>
required
Available options:
count,
sum
property
string | null
required
where
object
required
type
enum<string>
required
Available options:
metered,
licensed
name
string | null
required
description
string | null
required
allow_negative_values
boolean
required
custom_event_name
string | null
required
exposed_event_keys
string[]
required
created_at
string<date>
required
updated_at
string<date>
required