Get segment details by ID
Learn more about the Segmentation Api.
Use the Segments to retrieve the details of a segment by segment ID.
HTTP method and endpoint
Use the following HTTP method and endpoint path to retrieve segment details.
GET {platformUrl}/{tenantId}/segments/{id}
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. |
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 segment details. Replace the sample values with values from your environment.
GET {platformUrl}/ce5627DYnQ6abcD/segments/S1
Response body
The following table describes the fields returned in the response body.
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier of the segment. |
status | String | The evaluation state of the segment. live: evaluation is complete and the profile set is final. submitted and in_progress: evaluation is currently running. disabled: the segment is not being evaluated. |
label | String | Display name of the segment. |
lastEvaluationDate | String | Timestamp, in ISO 8601 format, of the segment's last evaluation. |
segmentSize | Integer | Number of profiles in the segment as of the last evaluation. |
owner | String | Identifier of the segment's owner. |
sharing | String | Sharing setting for the segment. |
rule | String | The segmentation rule that defines the criteria for including a profile in the segment, expressed in Reltio QL syntax. |
type | String | The evaluation type for the segment. |
schedule | Object | The evaluation schedule for the segment, containing startTime and repeat fields. |
description | String | User-provided description of the segment. |
Example response
The following example shows a response with the details of a segment.
{
"id": "S1",
"status": "live",
"label": "Platinum Members",
"lastEvaluationDate": "2000-10-31T01:30:00.000-05:00",
"segmentSize": 123000,
"owner": "noname@mail.com",
"sharing": "private",
"rule": "gte(count(gt(interaction.attributes.itemPrice, 100) and gt(interaction.attributes.PurchaseDate, {lastMonth}) and equals(interaction.type, 'Order')), 10) and equals(entity.type, 'customer')",
"type": "realtime",
"schedule": {
"startTime": "2000-10-31T01:30:00.000-05:00",
"repeat": "RRULE:FREQ=HOURLY;INTERVAL=12"
},
"description": "<description given by the user>"
}