Share experiment results
Create shared request for viewing experiment results without authorization. Learn how to share your results in this tutorial.
curl --request POST \
--url https://api.kameleoon.com/experiments/{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/experiments/{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/experiments/{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/experiments/{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/experiments/{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/experiments/{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/experiments/{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": {},
"method": "GET",
"path": "<string>",
"payload": {
"dateIntervals": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
],
"allVariationsData": false,
"bayesian": false,
"breakdown": {
"type": "BROWSER"
},
"callbackUrl": "<string>",
"enabledMultipleTesting": false,
"filters": [
{
"type": "<string>",
"include": true
}
],
"goalIdsCuped": [
123
],
"goalsIds": [
123
],
"interval": "MINUTE",
"referenceVariationId": "<string>",
"sequentialTesting": false,
"visitorData": false
},
"url": "<string>"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Date boundaries to include only the results from the specified time period(s).
Show child attributes
Show child attributes
Set to true to include data from all variations at once.
Enables the current Bayesian result probability for the experiment in the report.
Breakdown request argument for splitting data. A request accepts only one breakdown object.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
Callback URL that you want to send the data response to.
Enables multiple testing correction for the experiment in the report.
List of filters to apply to the data included in the report.
List of filters to apply to the data included in the report.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
Show child attributes
Show child attributes
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.
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.
Time interval by which the report segments data. Deprecated. Use breakdown with IntervalBreakdown type instead.
MINUTE, HOUR, DAY, WEEK, MONTH, YEAR Unique ID of the variation that you want to use as the reference variation.
Enables the sequential testing result for the experiment in the report.
Set to true to only include data from unique visitors. By default, the report includes all visitor data.
Was this page helpful?
curl --request POST \
--url https://api.kameleoon.com/experiments/{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/experiments/{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/experiments/{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/experiments/{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/experiments/{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/experiments/{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/experiments/{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": {},
"method": "GET",
"path": "<string>",
"payload": {
"dateIntervals": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
],
"allVariationsData": false,
"bayesian": false,
"breakdown": {
"type": "BROWSER"
},
"callbackUrl": "<string>",
"enabledMultipleTesting": false,
"filters": [
{
"type": "<string>",
"include": true
}
],
"goalIdsCuped": [
123
],
"goalsIds": [
123
],
"interval": "MINUTE",
"referenceVariationId": "<string>",
"sequentialTesting": false,
"visitorData": false
},
"url": "<string>"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}