List Variables
List Variables
GET
https://api.ocamba.com/v1/hood/variables
Returns a list of Variables
Rate limits:
Burst: 10/s
Steady: 150/m
Query parameters
parametersResponse schemas
›
200
application/json
GET https://api.ocamba.com/v1/hood/variables HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
curl -X GET "https://api.ocamba.com/v1/hood/variables" \
-H "Authorization: Bearer $TOKEN"
fetch("https://api.ocamba.com/v1/hood/variables", {
method: "GET",
headers: { Authorization: `Bearer ${TOKEN}` }
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/v1/hood/variables");
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": 27,
"items": [
{
"id": "1000",
"company_id": "1000001",
"name": "Variable Example",
"group_type": "navigation",
"type": "referrer",
"settings": {
"component_type": "full-url",
"strip": true,
"default_pages": "/home",
"query_key": "key-example",
"selection_method": "css_selector",
"element_id": "id-example",
"attribute_name": "href",
"output_type": "true/false",
"percent": 50,
"cookie_name": "example-name",
"uri_decode": true,
"variable_name": "name-example",
"default_value": "default-value",
"custom_js": null
},
"formatting": {
"change_case": "lowercase",
"convert_null_to": "some-value",
"convert_undefined_to": "some-value",
"convert_true_to": "some-value",
"convert_false_to": "some-value"
},
"description": "This is an example of description.",
"system": 1,
"is_visible": true,
"create_time": "2021-10-29 12:47:00",
"update_time": "2021-10-30 14:27:26"
}
]
}
Responses
Tip
1
Sortable fields are: name, system, is_visible, create_time and update_time.
2
Searchable field is: name.
3
Filterable fields are: id, name, group_type, type, system, is_visible, create_time and update_time.