GET /segments/{segment-id}/profiles

Use the GET /segments/{segment-id}/profiles endpoint to return a paginated list of the profiles that are members of a real-time segment.

Note

This endpoint is part of the Real-time API, an unstable API that may change without advance notice of breaking changes.

Note

In the Amperity user interface a real-time segment is configured from a profile collection. The list of member profiles is shown as Customers.

Prerequisites

  1. Add an API key.

  2. Generate an access token.

  3. A profile collection and a real-time segment must be configured for your tenant. Before creating a profile collection or a real-time segment, you must contact your Amperity representative to enable real-time product features.

Note

The access token must be granted the real-time-segments:read and pii:read permissions.

Request URL

Direct all requests to the GET /segments/{segment-id}/profiles endpoint to the request URL. The request URL uses the base URL with the endpoint path appended.

Amazon AWS

https://app.amperity.com/prof/segments/{segment-id}/profiles

Microsoft Azure

https://{tenant-id}.amperity.com/prof/segments/{segment-id}/profiles

You can find the tenant ID from the Amperity user interface. From the Settings page and select the Security tab. Under API keys, in the row for an API key, open the menu and select Copy tenant ID.

Rate limit

A rate limit is the number of requests that may be made to the Amperity API in a given time period.

Requests

A request to the GET /segments/{segment-id}/profiles endpoint is similar to:

curl --request GET \
       'https://app.amperity.com/prof/segments/{segment-id}/profiles' \
     --header 'amperity-tenant: {tenant-id}' \
     --header 'Authorization: Bearer {token}'

This example is formatted for readability in a narrow page layout.

Request parameters

The following table describes the parameters that may be used with the GET /segments/{segment-id}/profiles endpoint.

Parameter

Description

segment-id

String. Required.

The ID of the real-time segment.

Note

This endpoint does not currently accept pagination request parameters. A single page of results is returned.

Responses

A response from the GET /segments/{segment-id}/profiles endpoint will match an HTTP status code. A 200 response returns a page of profiles that are members of the segment.

200 OK

The 200 response returns a page of profiles.

1{
2  "data": [
3    {
4      "profile_id": "{profile-id}"
5    }
6  ],
7  "next_token": "{next-token}",
8  "total": 0
9}

Response parameters

A 200 OK response contains the following parameters.

Parameter

Description

data

A JSON array of member profiles. Each item contains the profile_id of a profile that is a member of the segment.

next_token

A pagination cursor returned with the results. This endpoint does not currently accept a next_token request parameter.

total

The total number of profiles that are members of the segment.