View Experiment
View Experiment
GET
https://api.ocamba.com/v1/hood/experiments/{id}
Retrieve details of a single experiment by its unique identifier.
Rate limits:
Burst: 10/s
Steady: 150/m
Path parameters
parametersQuery parameters
parametersResponse schemas
›
200
application/json
›
400
application/json
›
500
application/json
GET https://api.ocamba.com/v1/hood/experiments/{id} HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
curl -X GET "https://api.ocamba.com/v1/hood/experiments/{id}" \
-H "Authorization: Bearer $TOKEN"
fetch("https://api.ocamba.com/v1/hood/experiments/{id}", {
method: "GET",
headers: { Authorization: `Bearer ${TOKEN}` }
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/v1/hood/experiments/{id}");
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
HTTP/1.1 200 OK
Content-Type: application/json
{
"total": 1,
"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": "{\n \"en\": \"en_title\"\n \"de\": \"de_title\"\n}",
"icon": "https://www.iconexample.com",
"url": "https://www.urlexample.com"
}
},
"sms": {
"content": {
"key": "en",
"value": "Content example"
},
"shorten_links": [
{
"placeholder": "URL_1",
"url": "https://ocamba.com",
"expires_in": 4
}
]
},
"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
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"code": 400,
"title": "Bad request.",
"message": "The request body is not valid.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
500 Internal Server Error
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
{
"code": 500,
"title": "Internal server error.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses
Tip
1
If you don’t know the id, list Experiments to find it.