List Experiments
List Experiments
GET
https://api.ocamba.com/v1/hood/experiments
Returns a list of Experiments
Tip
Sortable fields are: name, resource, status, status_code, num_variants, result, start_time, end_time, create_time and update_time.
Filterable fields are: id, name, resource, result, resource_id, type, status, status_code, num_variants, start_time, end_time, create_time, update_time.
Searchable fields are: name, result, resource and description.
Rate limits:
- Burst: 10/s
- Steady: 150/m
Query parameters
parametersResponse schemas
›
200
application/json
›
400
application/json
›
500
application/json
curl -X GET \
"https://api.ocamba.com/v1/hood/experiments" \
-H "Authorization: Bearer {TOKEN}"const url = 'https://api.ocamba.com/v1/hood/experiments';
const options = {
method: 'GET',
headers: {
Authorization: `Bearer {TOKEN}`
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/experiments");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
200 OK
{
"total": 5,
"items": [
{
"id": "1000",
"company_id": "1000001",
"name": "Homepage Modal A/B Test",
"resource": "campaign",
"resource_id": "12345",
"type": "email",
"distribution": 30,
"status": "scheduled",
"status_code": "start_time_in_future",
"result": "incomplete_setup",
"metadata": {
"key": "winning_metric",
"value": "true"
},
"messages": [
{
"id": "1024",
"company_id": "1000000",
"name": "My first Message",
"campaign_id": "1000222",
"channel": "email",
"integration_id": "0",
"template_id": "1024",
"primary_lang": "en",
"email": {
"sender_name": "John Doe",
"sender_email": "[email protected]",
"subject": "All products 20% off!",
"preheader": "Enjoy a 20% discount on all products from the assortment",
"reply_to": "[email protected]",
"html": {
"key": "en",
"value": "Title example"
}
},
"push": {
"title": {
"key": "en",
"value": "Title example"
},
"body": {
"key": "en",
"value": "Hello world"
},
"image": {
"key": "en",
"value": "https://www.exampleimage.com/"
},
"landing_url": "https://www.landingurl.com/",
"icon": "https://www.iconexample.com",
"tag": "tag",
"require_interaction": 1,
"renotify": 0,
"silent": 0,
"vibration": "100,100,200",
"badge": "https://www.badgeexample.com",
"actions": {
"title": {
"key": "en",
"value": "Click here"
},
"icon": "https://www.iconexample.com",
"url": "https://www.urlexample.com"
}
},
"sms": {
"content": {
"key": "en",
"value": "This is a custom SMS message, sent to you from Ocamba!"
}
},
"test_result": 33.33,
"winner": 1,
"create_time": "2021-10-29 12:47:00",
"update_time": "2021-10-30 14:27:26"
}
],
"description": "Testing different modals to improve profile engagement..",
"num_variants": 2,
"start_time": "2021-10-29 12:47:00",
"end_time": "2021-10-30 14:27:26",
"create_time": "2021-10-29 12:47:00",
"update_time": "2021-10-30 14:27:26"
}
]
}
400 Bad Request
{
"code": 400,
"title": "Bad request.",
"message": "The request is not valid.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
500 Internal Server Error
{
"code": 500,
"title": "Internal server error.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses