List segments

Retrieve information about all segments belonging to a specific publication

Path parameters

publicationIdstringRequiredformat: "^(pub_[0-9a-fA-F\-]+)$"
The prefixed ID of the publication object

Headers

AuthorizationstringRequired

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

Query parameters

typeenumOptionalDefaults to all
Optionally filter the results by the segment's type.
Allowed values:
statusenumOptionalDefaults to all
Optionally filter the results by the segment's status.
Allowed values:
limitintegerOptional
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is 10.
pageintegerOptional

Pagination returns the results in pages. Each page contains the number of results specified by the limit (default: 10).
If not specified, results 1-10 from page 1 will be returned.

order_byenumOptionalDefaults to created

The field that the results are sorted by. Defaults to created
created - The time in which the segment was first created.
last_calculated - The time that the segment last completed calculation. Measured in seconds since the Unix epoch.

Allowed values:
directionenumOptionalDefaults to asc

The direction that the results are sorted in. Defaults to asc
asc - Ascending, sorts from smallest to largest.
desc - Descending, sorts from largest to smallest.

Allowed values:
expand[]list of enumsOptional

Optionally expand the response to include additional data.
stats - Requests the most recently calculated statistics for a segment.
Segment stats are recalculated once daily around 7 a.m. UTC for dynamic segments, but can be manually recalculated at any time in the dashboard. Manual and static segments only calculate once upon upload or creation.

Allowed values:

Response

OK
datalist of objects
An array of all segments.
limitinteger
The limit placed on the results. If no limit was specified in the request,this defaults to 10.
pageinteger>=0
The page number the results are from. If no page was specified in the request, this defaults to page 1.
total_resultsinteger
The total number of results from all pages.
total_pagesinteger
The total number of pages.

Errors