List Segments
List Segments
GET
https://api.ocamba.com/v1/hood/segments
Returns a list of Segments
Tip
Searchable field is name.
Sortable fields are: name, status and create_time
Filterable fields are: id, name, status, create_time and update_time.
Rate limits:
- Burst: 10/s
- Steady: 150/m
Query parameters
parametersResponse schemas
›
200
applcation/json
›
400
application/json
›
500
application/json
curl -X GET \
"https://api.ocamba.com/v1/hood/segments" \
-H "Authorization: Bearer {TOKEN}"const url = 'https://api.ocamba.com/v1/hood/segments';
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/segments");
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": "61",
"items": [
{
"id": "1949",
"name": "segment_name_example",
"status": "inactive",
"create_time": "2022-01-19 12:53:26",
"targeting": {
"countries": {
"op": "neq",
"items": [
"DZ",
"AS",
"AD",
"AO",
"AI",
"AG",
"AW",
"AU",
"AZ"
]
},
"languages": {
"op": "eq",
"items": [
"nl"
]
},
"os": {
"op": "eq",
"items": [
"17"
]
},
"browsers": {
"op": "eq",
"items": [
"10"
]
},
"apps": {
"op": "eq",
"items": [
"811353353"
]
},
"users": {
"op": "eq",
"items": [
"67890"
]
},
"groups": {
"op": "eq",
"items": [
"1233"
]
},
"regions": {
"op": "eq",
"items": [
"2661876"
]
},
"subscribed_age": {
"from": 1,
"to": 100
},
"user_data": {
"carrier": {
"op": "eq",
"items": [
"gcfhvjk"
]
},
"configvariant": {
"op": "eq",
"items": [
"ftyugi"
]
},
"device_brand": {
"op": "eq",
"items": [
"56789"
]
}
},
"remote_users": {
"op": "eq",
"items": [
"795269c1-3d0d-49bf-b421-1ac0d8a7899d"
]
}
}
}
]
}
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