Retrieve a list of segments using the Data 360 Segments endpoint in Connect API.
Prerequisite
Before you send a request to Connect API, obtain a bearer token. For more information, see Connect to REST-based APIs.
Send the Request
To retrieve a list of segments, send a GET request to the /services/data/{apiVersion}/ssot/segments endpoint. For additional information and code examples, see getSegments.
GET /services/data/{apiVersion}/ssot/segments HTTP/1.1
Host: YOUR_SUBDOMAIN.my.salesforce.com
Content-Type: application/json
Authorization: Bearer YOUR_BEARER_TOKEN
If the request is successful, the response body contains a list of segments in your org.
{
"batchSize": 20,
"offset": 0,
"orderByExpression": "[Name asc]",
"segments": [
{
"apiName": "Running_Shoe_Promo_Audience",
"displayName": "Running Shoe Promo Audience",
"marketSegmentDefinitionId": "3HX1Q000000HxyZWAS",
"marketSegmentId": "1sg1Q000000HxyZQAS",
"publishInterval": "NO_REFRESH",
"publishStatus": "SUCCESS",
"segmentMembershipTable": "Individual_Unified_SMH_1234567890123__dlm",
"segmentOnId": "0gj1Q000000PQ3xYZG",
"segmentStatus": "ACTIVE",
"segmentType": "UI"
},
...
]
}