Skip to main content
POST
/
feature-flags
/
{experimentId}
/
results
/
share
Share feature flag results
curl --request POST \
  --url https://api.kameleoon.com/feature-flags/{experimentId}/results/share \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dateIntervals": [
    {
      "start": "2023-11-07T05:31:56Z",
      "end": "2023-11-07T05:31:56Z"
    }
  ],
  "allVariationsData": false,
  "bayesian": false,
  "breakdown": {},
  "callbackUrl": "<string>",
  "enabledMultipleTesting": false,
  "filters": [
    {
      "type": "<string>",
      "include": true
    }
  ],
  "goalIdsCuped": [
    123
  ],
  "goalsIds": [
    123
  ],
  "referenceVariationId": "<string>",
  "sequentialTesting": false,
  "visitorData": false
}
'
import requests

url = "https://api.kameleoon.com/feature-flags/{experimentId}/results/share"

payload = {
"dateIntervals": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
],
"allVariationsData": False,
"bayesian": False,
"breakdown": {},
"callbackUrl": "<string>",
"enabledMultipleTesting": False,
"filters": [
{
"type": "<string>",
"include": True
}
],
"goalIdsCuped": [123],
"goalsIds": [123],
"referenceVariationId": "<string>",
"sequentialTesting": False,
"visitorData": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dateIntervals: [{start: '2023-11-07T05:31:56Z', end: '2023-11-07T05:31:56Z'}],
allVariationsData: false,
bayesian: false,
breakdown: {},
callbackUrl: '<string>',
enabledMultipleTesting: false,
filters: [{type: '<string>', include: true}],
goalIdsCuped: [123],
goalsIds: [123],
referenceVariationId: '<string>',
sequentialTesting: false,
visitorData: false
})
};

fetch('https://api.kameleoon.com/feature-flags/{experimentId}/results/share', 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/{experimentId}/results/share",
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([
'dateIntervals' => [
[
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z'
]
],
'allVariationsData' => false,
'bayesian' => false,
'breakdown' => [

],
'callbackUrl' => '<string>',
'enabledMultipleTesting' => false,
'filters' => [
[
'type' => '<string>',
'include' => true
]
],
'goalIdsCuped' => [
123
],
'goalsIds' => [
123
],
'referenceVariationId' => '<string>',
'sequentialTesting' => false,
'visitorData' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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/{experimentId}/results/share"

payload := strings.NewReader("{\n \"dateIntervals\": [\n {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"allVariationsData\": false,\n \"bayesian\": false,\n \"breakdown\": {},\n \"callbackUrl\": \"<string>\",\n \"enabledMultipleTesting\": false,\n \"filters\": [\n {\n \"type\": \"<string>\",\n \"include\": true\n }\n ],\n \"goalIdsCuped\": [\n 123\n ],\n \"goalsIds\": [\n 123\n ],\n \"referenceVariationId\": \"<string>\",\n \"sequentialTesting\": false,\n \"visitorData\": false\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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/{experimentId}/results/share")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dateIntervals\": [\n {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"allVariationsData\": false,\n \"bayesian\": false,\n \"breakdown\": {},\n \"callbackUrl\": \"<string>\",\n \"enabledMultipleTesting\": false,\n \"filters\": [\n {\n \"type\": \"<string>\",\n \"include\": true\n }\n ],\n \"goalIdsCuped\": [\n 123\n ],\n \"goalsIds\": [\n 123\n ],\n \"referenceVariationId\": \"<string>\",\n \"sequentialTesting\": false,\n \"visitorData\": false\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.kameleoon.com/feature-flags/{experimentId}/results/share")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dateIntervals\": [\n {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"allVariationsData\": false,\n \"bayesian\": false,\n \"breakdown\": {},\n \"callbackUrl\": \"<string>\",\n \"enabledMultipleTesting\": false,\n \"filters\": [\n {\n \"type\": \"<string>\",\n \"include\": true\n }\n ],\n \"goalIdsCuped\": [\n 123\n ],\n \"goalsIds\": [\n 123\n ],\n \"referenceVariationId\": \"<string>\",\n \"sequentialTesting\": false,\n \"visitorData\": false\n}"

response = http.request(request)
puts response.read_body
{
  "headers": {},
  "path": "<string>",
  "payload": {
    "dateIntervals": [
      {
        "start": "2023-11-07T05:31:56Z",
        "end": "2023-11-07T05:31:56Z"
      }
    ],
    "allVariationsData": false,
    "bayesian": false,
    "breakdown": {},
    "callbackUrl": "<string>",
    "enabledMultipleTesting": false,
    "filters": [
      {
        "type": "<string>",
        "include": true
      }
    ],
    "goalIdsCuped": [
      123
    ],
    "goalsIds": [
      123
    ],
    "referenceVariationId": "<string>",
    "sequentialTesting": false,
    "visitorData": false
  },
  "url": "<string>"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

experimentId
integer<int64>
required

Body

application/json
dateIntervals
Date interval · object[]
required

Date boundaries to include only the results from the specified time period(s).

allVariationsData
boolean
default:false

Set to true to include data from all variations at once.

bayesian
boolean
default:false

Enables the current Bayesian result probability for the experiment in the report.

breakdown
Breakdown · object

Breakdown request argument for splitting data

callbackUrl
string

Callback URL that you want to send the data response to.

enabledMultipleTesting
boolean
default:false

Enables multiple testing correction for the experiment in the report.

filters
(Ad blocker filter · object | Browser filter · object | Browser language filter · object | Device type filter · object | New visitor filter · object | Operating system filter · object | Sdk filter · object | Contaminated visitor filter · object | Number pages filter · object | Number visits filter · object | Since last visit filter · object | Time spent filter · object | First referrer filter · object | Key page filter · object | Landing page url filter · object | Page title filter · object | Page url filter · object | Referrer url filter · object | Traffic filter · object | Conversion metadata filter · object | Conversions filter · object | Custom data filter · object | Experiment data filter · object | Personalization data filter · object | Targeting segment filter · object | Day filter · object | Time slot filter · object | Weekday filter · object | Temperature filter · object | Weather filter · object)[]

List of filters to apply to the data included in the report.

List of filters to apply to the data included in the report.

goalIdsCuped
integer<int64>[]

Specifies which CUPED goals to include in the report. Use an empty list [] to exclude all CUPED goals. Use null to include all CUPED goals. Use a list of CUPED goal IDs [123, 456] to include only those goals.

goalsIds
integer<int64>[]

Specifies which goals to include in the report. Use an empty list [] to exclude all goals. Use null to include all goals. Use a list of goal IDs [123, 456] to include only those goals.

interval
enum<string>
deprecated

Time interval for which data is segmented in the report. Deprecated. Use breakdown with IntervalBreakdown type instead.

Available options:
MINUTE,
HOUR,
DAY,
WEEK,
MONTH,
YEAR
referenceVariationId
string

Unique ID of the variation that you want to use as the reference variation.

sequentialTesting
boolean
default:false

Enables the sequential testing result for the experiment in the report.

visitorData
boolean
default:false

Set to true to only include data from unique visitors. By default, the report includes all visitor data.

Response

OK

headers
object
method
enum<string>
Available options:
GET,
HEAD,
POST,
PUT,
DELETE,
CONNECT,
TRACE,
OPTIONS,
PATCH
path
string
payload
Data request params · object
url
string