Feature flag
Search feature flags
Search for a list of feature flag configurations. To use optionalFields check out this guide.
POST
/
feature-flags
/
search
Search feature flags
curl --request POST \
--url https://api.kameleoon.com/feature-flags/search \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"expressions": [
{
"field": "<string>",
"parameters": [
{}
]
}
]
},
"page": 1,
"perPage": 20,
"sort": [
{
"field": "<string>"
}
]
}
'import requests
url = "https://api.kameleoon.com/feature-flags/search"
payload = {
"filter": { "expressions": [
{
"field": "<string>",
"parameters": [{}]
}
] },
"page": 1,
"perPage": 20,
"sort": [{ "field": "<string>" }]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
filter: {expressions: [{field: '<string>', parameters: [{}]}]},
page: 1,
perPage: 20,
sort: [{field: '<string>'}]
})
};
fetch('https://api.kameleoon.com/feature-flags/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kameleoon.com/feature-flags/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filter' => [
'expressions' => [
[
'field' => '<string>',
'parameters' => [
[
]
]
]
]
],
'page' => 1,
'perPage' => 20,
'sort' => [
[
'field' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kameleoon.com/feature-flags/search"
payload := strings.NewReader("{\n \"filter\": {\n \"expressions\": [\n {\n \"field\": \"<string>\",\n \"parameters\": [\n {}\n ]\n }\n ]\n },\n \"page\": 1,\n \"perPage\": 20,\n \"sort\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kameleoon.com/feature-flags/search")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"expressions\": [\n {\n \"field\": \"<string>\",\n \"parameters\": [\n {}\n ]\n }\n ]\n },\n \"page\": 1,\n \"perPage\": 20,\n \"sort\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kameleoon.com/feature-flags/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"expressions\": [\n {\n \"field\": \"<string>\",\n \"parameters\": [\n {}\n ]\n }\n ]\n },\n \"page\": 1,\n \"perPage\": 20,\n \"sort\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"featureKey": "<string>",
"id": 123,
"name": "<string>",
"siteCode": "<string>",
"archived": true,
"attributionWindow": 123,
"bucketingKey": {
"bucketingKeyType": "VISITOR_CODE",
"customDataId": 123
},
"createdById": 123,
"dateContentModified": "2023-11-07T05:31:56Z",
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"description": "<string>",
"environmentConfigurations": [
{
"dateModified": "2023-11-07T05:31:56Z",
"defaultVariationKey": "<string>",
"environmentKey": "<string>",
"featureEnabled": true,
"integrations": {
"deliveryRules": "<array>",
"experimentRules": "<array>"
},
"rolloutRules": [
{
"type": "TARGETED_DELIVERY",
"experimentId": 123,
"id": 123,
"name": "<string>",
"release": {
"releaseFrom": "2023-11-07T05:31:56Z",
"releaseTo": "2023-11-07T05:31:56Z",
"timeZone": "Europe/Paris"
},
"rollbackConditions": [
{
"comparisonOperator": "GREATER_THAN",
"criteria": "CONVERSION_RATE",
"goalId": 123,
"id": 123,
"matchValue": 50,
"recipients": [
"<string>"
],
"target": "RULE",
"visitors": 1000
}
],
"segmentId": 123,
"status": "ACTIVE",
"trafficAllocations": [
{
"exposition": 123,
"variationId": 123,
"variationKey": "<string>"
}
],
"controlVariationKey": "<string>",
"exposition": 50,
"multiArmedBandit": true,
"trafficAllocationMethod": "CONTEXTUAL_BANDIT"
}
]
}
],
"health": "HEALTHY",
"primaryGoalId": 123,
"secondaryGoalIds": [
123
],
"tags": [
"<string>"
],
"teamId": 123,
"variables": [
{
"key": "<string>",
"type": "BOOLEAN",
"value": "<string>",
"allowedValues": [
"<string>"
]
}
],
"variations": [
{
"key": "<string>",
"name": "<string>",
"variables": [
{
"key": "<string>",
"type": "BOOLEAN",
"value": "<string>"
}
]
}
]
}
]{
"message": "<string>",
"serviceName": "<string>",
"status": "<string>",
"time": 123
}{
"message": "<string>",
"serviceName": "<string>",
"status": "<string>",
"time": 123
}{
"errorCode": "<string>",
"errorMessage": "<string>",
"serviceName": "<string>",
"status": {
"error": true,
"is1xxInformational": true,
"is2xxSuccessful": true,
"is3xxRedirection": true,
"is4xxClientError": true,
"is5xxServerError": true
},
"timestamp": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"serviceName": "<string>",
"status": "<string>",
"time": 123
}{
"message": "<string>",
"serviceName": "<string>",
"status": "<string>",
"time": 123
}Body
application/json
Response
OK
Was this page helpful?
⌘I
Search feature flags
curl --request POST \
--url https://api.kameleoon.com/feature-flags/search \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"expressions": [
{
"field": "<string>",
"parameters": [
{}
]
}
]
},
"page": 1,
"perPage": 20,
"sort": [
{
"field": "<string>"
}
]
}
'import requests
url = "https://api.kameleoon.com/feature-flags/search"
payload = {
"filter": { "expressions": [
{
"field": "<string>",
"parameters": [{}]
}
] },
"page": 1,
"perPage": 20,
"sort": [{ "field": "<string>" }]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
filter: {expressions: [{field: '<string>', parameters: [{}]}]},
page: 1,
perPage: 20,
sort: [{field: '<string>'}]
})
};
fetch('https://api.kameleoon.com/feature-flags/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kameleoon.com/feature-flags/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filter' => [
'expressions' => [
[
'field' => '<string>',
'parameters' => [
[
]
]
]
]
],
'page' => 1,
'perPage' => 20,
'sort' => [
[
'field' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kameleoon.com/feature-flags/search"
payload := strings.NewReader("{\n \"filter\": {\n \"expressions\": [\n {\n \"field\": \"<string>\",\n \"parameters\": [\n {}\n ]\n }\n ]\n },\n \"page\": 1,\n \"perPage\": 20,\n \"sort\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kameleoon.com/feature-flags/search")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"expressions\": [\n {\n \"field\": \"<string>\",\n \"parameters\": [\n {}\n ]\n }\n ]\n },\n \"page\": 1,\n \"perPage\": 20,\n \"sort\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kameleoon.com/feature-flags/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"expressions\": [\n {\n \"field\": \"<string>\",\n \"parameters\": [\n {}\n ]\n }\n ]\n },\n \"page\": 1,\n \"perPage\": 20,\n \"sort\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"featureKey": "<string>",
"id": 123,
"name": "<string>",
"siteCode": "<string>",
"archived": true,
"attributionWindow": 123,
"bucketingKey": {
"bucketingKeyType": "VISITOR_CODE",
"customDataId": 123
},
"createdById": 123,
"dateContentModified": "2023-11-07T05:31:56Z",
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"description": "<string>",
"environmentConfigurations": [
{
"dateModified": "2023-11-07T05:31:56Z",
"defaultVariationKey": "<string>",
"environmentKey": "<string>",
"featureEnabled": true,
"integrations": {
"deliveryRules": "<array>",
"experimentRules": "<array>"
},
"rolloutRules": [
{
"type": "TARGETED_DELIVERY",
"experimentId": 123,
"id": 123,
"name": "<string>",
"release": {
"releaseFrom": "2023-11-07T05:31:56Z",
"releaseTo": "2023-11-07T05:31:56Z",
"timeZone": "Europe/Paris"
},
"rollbackConditions": [
{
"comparisonOperator": "GREATER_THAN",
"criteria": "CONVERSION_RATE",
"goalId": 123,
"id": 123,
"matchValue": 50,
"recipients": [
"<string>"
],
"target": "RULE",
"visitors": 1000
}
],
"segmentId": 123,
"status": "ACTIVE",
"trafficAllocations": [
{
"exposition": 123,
"variationId": 123,
"variationKey": "<string>"
}
],
"controlVariationKey": "<string>",
"exposition": 50,
"multiArmedBandit": true,
"trafficAllocationMethod": "CONTEXTUAL_BANDIT"
}
]
}
],
"health": "HEALTHY",
"primaryGoalId": 123,
"secondaryGoalIds": [
123
],
"tags": [
"<string>"
],
"teamId": 123,
"variables": [
{
"key": "<string>",
"type": "BOOLEAN",
"value": "<string>",
"allowedValues": [
"<string>"
]
}
],
"variations": [
{
"key": "<string>",
"name": "<string>",
"variables": [
{
"key": "<string>",
"type": "BOOLEAN",
"value": "<string>"
}
]
}
]
}
]{
"message": "<string>",
"serviceName": "<string>",
"status": "<string>",
"time": 123
}{
"message": "<string>",
"serviceName": "<string>",
"status": "<string>",
"time": 123
}{
"errorCode": "<string>",
"errorMessage": "<string>",
"serviceName": "<string>",
"status": {
"error": true,
"is1xxInformational": true,
"is2xxSuccessful": true,
"is3xxRedirection": true,
"is4xxClientError": true,
"is5xxServerError": true
},
"timestamp": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"serviceName": "<string>",
"status": "<string>",
"time": 123
}{
"message": "<string>",
"serviceName": "<string>",
"status": "<string>",
"time": 123
}