curl --request POST \
--url https://api.kameleoon.com/segments/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"field": "<string>",
"operator": "EQUAL",
"parameters": [
{}
]
},
"page": 123,
"perPage": 123,
"sort": [
{
"direction": "ASC",
"field": "<string>"
}
]
}
'[
{
"conditionsData": {
"firstLevel": [
{
"conditions": [
{
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND",
"htmlDescription": "<string>",
"id": 123
}
],
"orOperators": [
true
]
}
],
"firstLevelOrOperators": [
true
]
},
"name": "My segment",
"segmentType": "STANDARD",
"siteId": 8372,
"audienceTracking": true,
"audienceTrackingEditable": true,
"conditionDataList": [
{
"id": 123,
"isConditionBlock": true,
"logicalOperator": "AND",
"parentId": 123,
"targetingCondition": {
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND",
"htmlDescription": "<string>",
"id": 123
}
}
],
"conditionDataTree": {
"targetingType": "<string>",
"conditionData": [
"<unknown>"
],
"isConditionBlock": true,
"logicalOperator": "AND"
},
"createdBy": 123,
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"description": "The segment is for new ab tests",
"experimentAmount": 123,
"experiments": [
123
],
"featureFlagAmount": 123,
"hasSegmentCondition": true,
"id": 123,
"isFavorite": true,
"personalizationAmount": 123,
"personalizations": [
123
],
"tags": [
"<string>"
],
"usedBySegmentCondition": true,
"userVisible": true
}
]Search segments with given parameters. To use optionalFields check out this guide.
curl --request POST \
--url https://api.kameleoon.com/segments/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"field": "<string>",
"operator": "EQUAL",
"parameters": [
{}
]
},
"page": 123,
"perPage": 123,
"sort": [
{
"direction": "ASC",
"field": "<string>"
}
]
}
'[
{
"conditionsData": {
"firstLevel": [
{
"conditions": [
{
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND",
"htmlDescription": "<string>",
"id": 123
}
],
"orOperators": [
true
]
}
],
"firstLevelOrOperators": [
true
]
},
"name": "My segment",
"segmentType": "STANDARD",
"siteId": 8372,
"audienceTracking": true,
"audienceTrackingEditable": true,
"conditionDataList": [
{
"id": 123,
"isConditionBlock": true,
"logicalOperator": "AND",
"parentId": 123,
"targetingCondition": {
"targetingType": "PAGE_URL",
"weight": 1,
"count": 123,
"include": true,
"matchType": "EQUAL",
"unitOfTime": "SECOND",
"htmlDescription": "<string>",
"id": 123
}
}
],
"conditionDataTree": {
"targetingType": "<string>",
"conditionData": [
"<unknown>"
],
"isConditionBlock": true,
"logicalOperator": "AND"
},
"createdBy": 123,
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"description": "The segment is for new ab tests",
"experimentAmount": 123,
"experiments": [
123
],
"featureFlagAmount": 123,
"hasSegmentCondition": true,
"id": 123,
"isFavorite": true,
"personalizationAmount": 123,
"personalizations": [
123
],
"tags": [
"<string>"
],
"usedBySegmentCondition": true,
"userVisible": true
}
]Documentation Index
Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
OK
Conditions according to which visitors will be segmented
Show child attributes
Name of the segment
"My segment"
Segment type refers to the classification of segments based on their usage.
STANDARD, KEY_MOMENT, FEATURE_FLAG, ALL Site Id of the project where the segment is created
8372
Indicates if segment is tracking audeince
This flag shows if audienceTracking can be enabled/disabled. In some cases, audienceTracking cannot be disabled. E.g. a segment has predictive conditions, such segments are tracked by default.
Conditions by which visitors will be segmented in list form
Show child attributes
Conditions by which visitors will be segmented in tree form
Show child attributes
Account Id of the creator of the segment
Date when the segment was created
Date when the segment was modified
Description of the segment
"The segment is for new ab tests"
Number of experiments using this segment. This is an optional field that is included in the request body
List of experiment ids using this segment. This is an optional field that is included in the request body
List of experiment ids using this segment. This is an optional field that is included in the request body
Number of feature flags being used in this goal. This is an optional field that must be specified in request params.
Indicates if the segment has conditions
Unique Id of the segment
Indicates whether the segment has been marked as a favorite.
Number of personalizations using this segment. This is an optional field that is included in the request body
List of personalization ids using this segment. This is an optional field that is included in the request body
List of personalization ids using this segment. This is an optional field that is included in the request body
Indicates whether the segment has been marked as hidden from the user
Was this page helpful?