Skip to main content
POST
/
aggregates
Create billable metric
curl --request POST \
  --url https://api.zenskar.com/aggregates \
  --header 'Content-Type: application/json' \
  --header 'organisation: <api-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "dataschema": "<string>",
  "aggregation_query": "<string>",
  "cust_agg_query": "<string>",
  "visual_query_builder": {},
  "datasource": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "dataschema": "<string>",
  "aggregation_query": "<string>",
  "cust_agg_query": "<string>",
  "visual_query_builder": {},
  "datasource": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "version": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs2.zenskar.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
default:<your-api-key>
required
organisation
string
header
default:<your-organisation-id>
required

Headers

apiversion
integer | null

Body

application/json

Create Aggregate Request Schema

name
string
required

name of the aggregate

dataschema
string
required

data schema of aggregate

aggregation_query
string
required

aggregate query

cust_agg_query
string
required

customer aggregate query

visual_query_builder
Visual Query Builder · object
required

visual query builder

datasource
string
required

data source uuid

Response

Successful Response

Aggregate Response Schema

id
string<uuid>
required

aggregate Id

name
string
required

name of the aggregate

dataschema
string
required

data schema of aggregate

aggregation_query
string
required

aggregate query

cust_agg_query
string
required

customer aggregate query

visual_query_builder
Visual Query Builder · object
required

visual query builder

datasource
string<uuid>
required

data source uuid

version
integer | null

version of aggregate