GET /api/v1/segments
List all segments with their base schema names. Supports cursor-based pagination.Query Parameters
Response
POST /api/v1/segments
Create a segment with optional join and filter definitions. A backing PostgreSQL view is automatically created and the initial row count is computed.Request Body
Example
201 Created
PUT /api/v1/segments
Update a segment. Whenjoins or filters change, the backing view is rebuilt and the customer count is recomputed.
Request Body
Response:
200 OK
DELETE /api/v1/segments
Delete a segment and drop its backing view.
Response:
204 No Content
A path variant DELETE /api/v1/segments/{id} is also available.
GET /api/v1/segments/
Get full segment details including base schema name. Response:200 OK with the segment object.
POST /api/v1/segments/?action=refresh
Recount the rows in the segment’s backing view and updatecustomerCount and lastRefreshedAt.
Response: 200 OK with the updated segment.
POST /api/v1/segments/?action=preview
Return a preview of the first 20 rows from the segment view.Response
Roles
See also: Data Platform