Skip to content

Retrieve list of segments

Request

Retrieve a list of segments.

Security
TdApikeyAuth
Path
audienceIdinteger, (int64)required

Master Segment id of the segment

curl -i -X GET \
  'https://api-cdp.treasuredata.com/audiences/{audienceId}/segments' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

successful operation

Bodyapplication/json
Array [
audienceIdstring, (integer)
idstring, (integer)
namestring
kindinteger

0: batch, 1: realtime, 2: funnel_stage

descriptionstring or null
segmentFolderIdstring, (integer)
populationinteger or null, (int64)
createdAtstring, (date-time)
updatedAtstring, (date-time)
createdByobject(User)
updatedByobject(User)
rule(SegmentRule (EmptyCondition (object) or AndCondition (object) or OrCondition (object) or CompositeCondition (object))) or (partial_v5_rule.yaml-v5IonRule (partial_v5_rule.yaml-v5IonRule-ionRule (object) or (object or null)))
Any of:
One of:
realtimebooleanDeprecated

Whether the segment is realtime segment or not

]
Response
[ { "audienceId": "string", "id": "string", "name": "string", "realtime": true, "kind": 0, "description": "string", "segmentFolderId": "string", "population": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "createdBy": {}, "updatedBy": {}, "rule": {} } ]