Skip to main content
GET
/
segmentation
/
average
Numerically Average
curl --request GET \
  --url https://{regionAndDomain}.com/api/query/segmentation/average \
  --header 'Authorization: Basic <encoded-value>'
{
  "results": {
    "2011-08-06": 8.64705882352939,
    "2011-08-07": 4.640625,
    "2011-08-08": 3.6230899830221,
    "2011-08-09": 7.3353658536585
  },
  "status": "ok"
}

Authorizations

Authorization
string
header
required

Service Account

Query Parameters

project_id
integer
required

Required if using service account to authenticate request.

workspace_id
integer

The id of the workspace if applicable.

event
string
required

The event that you wish to get data for. Note: this is a single event name, not an array.

from_date
string
required

The date in yyyy-mm-dd format to begin querying from. This date is inclusive.

to_date
string
required

The date in yyyy-mm-dd format to query to. This date is inclusive.

on
string
required

The expression to sum per unit time. The result of the expression should be a numeric value. If the expression is not numeric, a value of 0.0 is assumed. See the expressions section below.

unit
enum<string>

This can be "hour" or "day". This determines the buckets into which the property values that you segment on are placed. The default value is "day".

Available options:
hour,
day
where
string

An expression to filter events by. See the expression to segment below.

Response

200 - application/json

Success

results
object
status
string