Get Experiment results time series
1 min
GET
https://api.optimizely.com/v2/experiments/{experiment_id}/timeseries
Path Parameters
- experiment_idinteger<int64>requiredDescriptionFormatint64
Query Parameters
- baseline_variation_idstring<int64>DescriptionFormatint64
- start_timestring<date-time>DescriptionFormatdate-time
- end_timestring<date-time>DescriptionFormatdate-time
- browserstringDescriptionAllowedfirefoxchromeinternet_exploreroperasafari
- devicestringDescriptionAlloweddesktopipadiphonemobiletablet
- sourcestringDescriptionAllowedcampaigndirectreferralsearch
- attribute_idinteger<int64>DescriptionFormatint64
- attribute_valuestringDescription
- segment_conditionsstringDescription
Responses
200
- ExperimentTimeseries
- confidence_thresholdnumber<double>ExampleDescriptionFormatdouble
- end_timestring<date-time>DescriptionFormatdate-time
- experiment_idinteger<int64>ExampleDescriptionFormatint64
- is_stalebooleanDescription
- metricsExperimentMetricTimeseries[]Description
- aggregatorstring<unique | count | sum | bounce | exit | ratio>DescriptionAlloweduniquecountsumbounceexitratio
- event_idinteger<int64>DescriptionFormatint64
- event_propertiesMetricEventPropertiesDescription
- filterMetricFilterDescription
- combine_operatorstring<and | or>DescriptionAllowedandor
- conditionsMetricFilterCondition[]Description
- namestringDescription
- operatorstring<equal_to | not_equal_to | greater_than | greater_than_or_equal_to | less_than | less_than_or_equal_to | contains | does_not_contain>DescriptionAllowedequal_tonot_equal_togreater_thangreater_than_or_equal_toless_thanless_than_or_equal_tocontainsdoes_not_contain
- typestring<boolean | number | string>DescriptionAllowedbooleannumberstring
- valuestringDescription
- fieldstring<revenue | value>DescriptionAllowedrevenuevalue
- metricsCompoundSubMetric[]Description
- aggregatorstring<unique | count | sum>DescriptionDefaultuniqueAlloweduniquecountsum
- event_idinteger<int64>DescriptionFormatint64
- event_typestring<custom | click | pageview>DescriptionAllowedcustomclickpageview
- fieldstring<revenue | value>DescriptionAllowedrevenuevalue
- scopestring<session | visitor | event>DescriptionDefaultvisitorAllowedsessionvisitorevent
- namestringDescription
- resultsmap<string, VariantTimeseries>Description
- scopestring<session | visitor | event>DescriptionAllowedsessionvisitorevent
- time_windowstringDescription
- winning_directionstring<increasing | decreasing>DescriptionAllowedincreasingdecreasing
- start_timestring<date-time>DescriptionFormatdate-time
- stats_configStatsConfigDescription
- confidence_levelnumber
- difference_typestring<absolute | relative>DescriptionAllowedabsoluterelative
- epoch_enabledbooleanDescription
202
204
default
- Error
- codestring
- messagestring
- messagesobject
- uuidstring<uuid>Formatuuid
curl
curl --request GET \
--url https://api.optimizely.com/v2/experiments/{experiment_id}/timeseries \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.optimizely.com/v2/experiments/{experiment_id}/timeseries", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.optimizely.com/v2/experiments/{experiment_id}/timeseries")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.optimizely.com/v2/experiments/{experiment_id}/timeseries"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Return Experiment results time series
{
"confidence_threshold": 0.9,
"end_time": "",
"experiment_id": 3000,
"is_stale": false,
"metrics": [
{
"aggregator": "",
"event_id": "",
"event_properties": {
"filter": {
"combine_operator": "",
"conditions": [
{
"name": "",
"operator": "",
"type": "",
"value": ""
}
]
}
},
"field": "",
"metrics": [
{
"aggregator": "",
"event_id": "",
"event_type": "",
"field": "",
"scope": ""
}
],
"name": "",
"results": "",
"scope": "",
"time_window": "",
"winning_direction": ""
}
],
"start_time": "",
"stats_config": {
"confidence_level": 0,
"difference_type": "",
"epoch_enabled": false
}
}202
// The results request has been received but has not yet finished processing. Wait a bit and try again.
204
// There are no results data for this Experiment yet. Make sure the Experiment is started and try again later
default
// Unexpected error
{
"code": "",
"message": "",
"messages": {},
"uuid": ""
}