v4
latestOpenAPI 3.0.02026-08-04109113304.5 KBList Experiments
Get a list of all the Experiments by Project or Campaign. Either the <code>project_id</code> or <code>campaign_id</code> query parameter is required.
Query parameters
Optional pagination argument that specifies the maximum number of objects to return per request
Optional pagination argument that specifies the page to return. If you have 140 objects and you choose to return 100 objects per page you will be able to access the last 40 objects on page 2. The default value is 1.
The Project ID of the Project you would like to list all Experiments for. You have to either use this argument or the campaign_id argument
The Campaign ID of the Campaign you would like to list all Experiments for. You have to either use this argument or the project_id argument
Response
Return all Experiments
Example response
[
{
"audience_conditions": "[\"and\", {\"audience_id\": 7000}, {\"audience_id\":7001}]",
"campaign_id": 2000,
"changes": [
{
"dependencies": [
"993fd09c-b64a-4c13-95a9-13b3ed2c454e",
"95cf0144-fb63-431d-829b-193fe55ada18"
],
"name": "Setting button text",
"selector": "head",
"value": "window.someGlobalFunction();"
}
],
"feature_id": 1000,
"feature_name": "This is the user search feature",
"holdback": 5000,
"id": 3000,
"key": "home_page_experiment",
"name": "Blue Button Experiment",
"project_id": 1000,
"schedule": {
"start_time": "2019-02-20T15:00",
"stop_time": "2019-02-20T18:00",
"time_zone": "America/New_York"
},
"traffic_allocation": 5000,
"url_targeting": {
"activation_code": "function callbackFn(activate, options) { activate(); }",
"activation_type": "callback",
"conditions": "[\"and\", {\"type\": \"url\", \"match_type\": \"substring\", \"value\": \"optimize\"}]",
"edit_url": "https://www.optimizely.com",
"key": "home_page",
"page_id": 6700
},
"variations": [
{
"actions": [
{
"changes": [
{
"attributes": {
"class": "intro",
"href": "example.com",
"html": "New Title",
"src": "song.mp3",
"style": "background-color:blue;",
"text": "Some nice message"
},
"dependencies": [
"ad1f6acb-78f2-4653-b955-913abd777e16",
"ad20a6dd-2083-4964-8ed2-f0dc7baef687"
],
"destination": "https://app.optimizely.com/",
"destination_function": "https://app.optimizely.com/",
"name": "Setting button text",
"operator": "after",
"selector": "a[href*=\"optimizely\"]",
"value": "window.someGlobalFunction();"
}
]
}
],
"key": "blue_button_variation",
"name": "Blue Button"
}
],
"whitelist": [
{
"user_id": "user_1",
"variation_id": 12345
}
]
}
]