Skip to main content
GET
/
segmentation
/
numeric
Numerically Bucket
curl --request GET \
  --url https://{regionAndDomain}.com/api/query/segmentation/numeric \
  --header 'Authorization: Basic <encoded-value>'
{
  "data": {
    "series": [
      "2011-08-08",
      "2011-08-09",
      "2011-08-06",
      "2011-08-07"
    ],
    "values": {
      "2,000 - 2,100": {
        "2011-08-06": 1,
        "2011-08-07": 5,
        "2011-08-08": 4,
        "2011-08-09": 15
      },
      "2,100 - 2,200": {
        "2011-08-07": 2,
        "2011-08-08": 7,
        "2011-08-09": 15
      },
      "2,200 - 2,300": {
        "2011-08-06": 1,
        "2011-08-08": 6,
        "2011-08-09": 5
      },
      "2,300 - 2,400": {
        "2011-08-06": 4,
        "2011-08-08": 1,
        "2011-08-09": 12
      },
      "2,400 - 2,500": {
        "2011-08-08": 2,
        "2011-08-09": 5
      }
    }
  },
  "legend_size": 5
}
❗️The Segmentation Query API is in maintenance mode. We recommend discontinuing new use of this endpoint. To break down and filter event data, build an Insights report in-app and query it programmatically with the Insights Query API. For raw event data, see export methods. If you need help choosing the best method, reach out to support.

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 property expression to segment the event on. This expression must be a numeric property. 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.

type
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:
general,
unique,
average

Response

200 - application/json

Success

data
object
legend_size
integer

List of all dates.