Segments (Data Cloud Connect API)

GET Retrieve a list of segments in your org.

GET /services/data/{apiVersion}/ssot/segments

Operation ID: getSegments.

Parameters

  • Authorization (header, string, required) A unique, time-limited token that you can use to issue requests to Connect API. Replace YOUR_ACCESS_TOKEN with your authentication token.

    Example

    Bearer YOUR_ACCESS_TOKEN
  • batchSize (query, number (integer)) The number of items to return. The minimum value is 1 and the maximum is 200. The default value is 20.
  • dataspace (query, string) The name of the dataspace to perform the action in. You must have permission to access this dataspace. The default value is equal to the default dataspace.
  • offset (query, number (integer)) The number of rows to skip in the result set. For example, to skip the first 20 values, specify an offset of 20.
  • orderBy (query, string) The order to sort the result set in, such as Name ASC or MarketSegmentType DESC. The default value is id ASC.

Responses

  • 200 This response indicates that the API accepted your request to retrieve a list of segments.

    Media type: application/json. Schema: segmentsGetResponseBody.

    Example

    {
      "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"
        }
      ]
    }
  • 401 This response indicates that the API wasn’t able to authorize your request. When you receive a 401 response, verify that your authorization token is still valid.

    Media type: application/json. Schema: httpErrorResponseBody.

    Example

    [
      {
        "message": "Session expired or invalid",
        "errorCode": "INVALID_SESSION_ID"
      }
    ]