Get count of profiles in segment
Learn more about the Segmentation Api to find out the total number of profiles in a segment.
Use the Segments to return the total number of profiles in a segment.
HTTP method and endpoint
Use the following HTTP method and endpoint path to retrieve the count of profiles in a segment.
GET {platformUrl}/api/{tenantId}/segments/{id}/entities/total
Replace {platformUrl} with your Reltio platform base URL and {tenantId} with your tenant ID.
The following table describes the endpoint path parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
tenantId | String | Yes | Unique identifier of the tenant. |
id | String | Yes | Unique identifier of the segment. |
Query parameters
The following table describes the query parameters and their values.
| Parameter | Type | Required | Description | Accepted values / Default |
|---|---|---|---|---|
returnPartialResults | Boolean | No | When set to true and the segment's status is submitted or in_progress, the response returns the count that currently exists instead of returning the SEGMENT_NOT_EVALUATED error. When set to false or omitted, the response returns profiles only after the segment has finished evaluating. | true, false; Default: false |
Request headers
The following request headers must be included.
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <access_token> | Yes |
Content-Type | application/json | Yes |
Request body
This operation does not require a request body.
Example request
Use the following example to retrieve the count of profiles in a segment. Replace the sample values with values from your environment.
GET {platformUrl}/api/ce5627DYnQ6abcD/segments/3prE0YZ/entities/total
Response body
The following table describes the field returned in the response body.
| Field | Type | Description |
|---|---|---|
total | Integer | Total number of profiles in the segment. |
Example response
The following example shows a response with the total number of profiles in the segment.
{
"total": 12345
}
Error codes and recommended actions
The following table lists the possible error responses returned by this API.
| HTTP status | Error code | Description | Recommended action |
|---|---|---|---|
400 Bad Request | 32006 | The segment has not finished evaluating and returnPartialResults was not set to true. | Retry the request after the segment finishes evaluating, or resend the request with returnPartialResults set to true to receive the count that currently exists. |