Segment Analytics Endpoint

get

/segments/data_series

This endpoint allows you to retrieve a daily series of the size of a segment over time for a segment.

Request Parameters

Parameter Required Data Type Description
segment_id Required String See Segment API identifier.

The segment_id for a given segment can be found in your Developer Console within your Braze account or you can use the Segment List Endpoint.
length Required Integer Max number of days before ending_at to include in the returned series. Must be between 1 and 100 (inclusive).
ending_at Optional Datetime
(ISO-8601 string)
Date on which the data series should end. Defaults to time of the request.

Example Request

1
2
curl --location -g --request GET 'https://rest.iad-01.braze.com/segments/data_series?segment_id={{segment_identifier}}&length=14&ending_at=2018-06-27T23:59:59-5:00' \
--header 'Authorization: Bearer YOUR-REST-API-KEY'

Response

1
2
3
4
5
6
7
8
9
10
11
12
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
    "message": (required, string) the status of the export, returns 'success' when completed without errors,
    "data" : [
        {
            "time" : (string) date as ISO 8601 date,
            "size" : (int) size of the segment on that date
        },
        ...
    ]
}
WAS THIS PAGE HELPFUL?
New Stuff!