curl --request GET \
--url http://localhost:3000/projects/{projectId}/segments \
--header 'Authorization: Bearer <token>'{
"statusCode": 123,
"message": "OK",
"data": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rules": [
{
"type": "rule",
"attribute": "<string>",
"operator": "eq",
"value": "<string>"
}
],
"logical_op": "AND",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"force": false,
"key": "<string>"
}
],
"meta": {
"total": 123,
"page": 123,
"pageCount": 123
}
}
}Retrieves a paginated list of all audience segments defined within a project. Returns segment metadata including name, key, description, rule count, and creation/update timestamps. Supports pagination for efficient handling of large segment catalogs. Use this endpoint to browse available segments before creating targeting rules or to audit existing segment definitions across your feature flag system.
curl --request GET \
--url http://localhost:3000/projects/{projectId}/segments \
--header 'Authorization: Bearer <token>'{
"statusCode": 123,
"message": "OK",
"data": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rules": [
{
"type": "rule",
"attribute": "<string>",
"operator": "eq",
"value": "<string>"
}
],
"logical_op": "AND",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"force": false,
"key": "<string>"
}
],
"meta": {
"total": 123,
"page": 123,
"pageCount": 123
}
}
}