List Containers

List Containers

GET https://api.ocamba.com/v1/hood/containers

Returns a list of Containers

Rate limits:

Burst: 10/s
Steady: 150/m

Query parameters

parameters

Response schemas

GET https://api.ocamba.com/v1/hood/containers HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
curl -X GET "https://api.ocamba.com/v1/hood/containers" \
  -H "Authorization: Bearer $TOKEN"
fetch("https://api.ocamba.com/v1/hood/containers", {
  method: "GET",
  headers: { Authorization: `Bearer ${TOKEN}` }
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/v1/hood/containers");
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": 15,
  "items": [
    {
      "id": "1000",
      "company_id": "1000001",
      "partner_id": "1000001",
      "partner": {
        "id": "1000001",
        "name": "some-site.com",
        "status": "active"
      },
      "account_id": "1000001",
      "account": {
        "id": "1000001",
        "name": "some-site.com",
        "status": "active"
      },
      "creator_id": "1000111",
      "enable_tags": true,
      "tags": [
        {
          "id": "1000001",
          "company_id": "8101252",
          "container_id": "42027",
          "status": "active",
          "type": "custom-code",
          "name": "My first tag",
          "triggers": {
            "element_visibility": {
              "selector": ".class",
              "when_to_fire": "once-per-page",
              "min_on_screen_time": 200,
              "observe_dom_changes": true
            },
            "scroll_depth": {
              "horizontal": {
                "percentage": 75,
                "pixels": 1223
              },
              "vertical": {
                "percentage": 75,
                "pixels": 1223
              }
            },
            "click_element": {
              "enabled": true,
              "element": "header"
            },
            "timer": 200,
            "custom_event": {
              "event": "my_event"
            },
            "require_all_triggers": true
          },
          "filters": [
            {
              "variable": "1000231",
              "value": "Some-value",
              "filters": [
                {
                  "variable": "1000231",
                  "value": "Some-value"
                }
              ]
            }
          ],
          "group": "Group A",
          "target": {
            "element": "head",
            "action": "append"
          },
          "position": 3,
          "create_time": "2021-10-29 12:47:00",
          "update_time": "2021-10-30 14:27:26"
        }
      ],
      "enable_modals": true,
      "modals": [
        {
          "id": "1000001",
          "company_id": "8101252",
          "container_id": "42027",
          "status": "active",
          "type": "push",
          "name": "My first modal",
          "triggers": {
            "element_visibility": {
              "selector": ".class",
              "when_to_fire": "once-per-page",
              "min_on_screen_time": 200,
              "observe_dom_changes": true
            },
            "scroll_depth": {
              "horizontal": {
                "percentage": 75,
                "pixels": 1223
              },
              "vertical": {
                "percentage": 75,
                "pixels": 1223
              }
            },
            "click_element": {
              "enabled": true,
              "element": "header"
            },
            "timer": 200,
            "custom_event": {
              "event": "my_event"
            },
            "require_all_triggers": true
          },
          "filters": [
            {
              "variable": "1000231",
              "value": "Some-value",
              "filters": [
                {
                  "variable": "1000231",
                  "value": "Some-value"
                }
              ]
            }
          ],
          "group": "Group A",
          "settings": {
            "position": "top-left",
            "background_color": "green",
            "height": 500,
            "width": 700,
            "close_cta": true,
            "close_esc": true,
            "close_click": true,
            "close_auto": 3000,
            "delay": 2000
          },
          "ab_test_config": {
            "num_of_appears": 1200,
            "evaluation_window": 72,
            "winning_metric": "click_rate",
            "name": "My first ab test",
            "winner_delivery_mode": "automatic"
          },
          "messages": [
            {
              "id": "1000001",
              "company_id": "8101252",
              "container_id": "42027",
              "resource": "modal",
              "resource_id": "1001241",
              "experiment_id": "4245",
              "template_id": "2141",
              "name": "Big summer sale message",
              "settings": {
                "position": "top-left",
                "background_color": "green",
                "height": 500,
                "width": 700,
                "close_cta": true,
                "close_esc": true,
                "close_click": true,
                "close_auto": 3000,
                "delay": 2000
              },
              "variant": "B",
              "winner": 1,
              "create_time": "2021-10-29 12:47:00",
              "update_time": "2021-10-30 14:27:26"
            }
          ],
          "position": 3,
          "create_time": "2021-10-29 12:47:00",
          "update_time": "2021-10-30 14:27:26"
        }
      ],
      "prompts": [
        {
          "id": "1000001",
          "uuid": "c3e25631-4030-409d-a021-5fb091b9d0b1",
          "company_id": "8101252",
          "container_id": "42027",
          "status": "active",
          "type": "html",
          "name": "My first prompt",
          "triggers": {
            "element_visibility": {
              "selector": ".class",
              "when_to_fire": "once-per-page",
              "min_on_screen_time": 200,
              "observe_dom_changes": true
            },
            "scroll_depth": {
              "horizontal": {
                "percentage": 75,
                "pixels": 1223
              },
              "vertical": {
                "percentage": 75,
                "pixels": 1223
              }
            },
            "click_element": {
              "enabled": true,
              "element": "header"
            },
            "timer": 200,
            "custom_event": {
              "event": "my_event"
            },
            "require_all_triggers": true
          },
          "filters": [
            {
              "variable": "1000231",
              "value": "Some-value",
              "filters": [
                {
                  "variable": "1000231",
                  "value": "Some-value"
                }
              ]
            }
          ],
          "settings": {
            "position": "top-left",
            "background_color": "green",
            "height": 500,
            "width": 700,
            "close_cta": true,
            "close_esc": true,
            "close_click": true,
            "close_auto": 3000,
            "delay": 2000
          },
          "ab_test_config": {
            "num_of_appears": 1200,
            "evaluation_window": 72,
            "winning_metric": "click_rate",
            "name": "My first ab test",
            "winner_delivery_mode": "automatic"
          },
          "messages": [
            {
              "id": "1000001",
              "company_id": "8101252",
              "container_id": "42027",
              "resource": "modal",
              "resource_id": "1001241",
              "experiment_id": "4245",
              "template_id": "2141",
              "name": "Big summer sale message",
              "settings": {
                "position": "top-left",
                "background_color": "green",
                "height": 500,
                "width": 700,
                "close_cta": true,
                "close_esc": true,
                "close_click": true,
                "close_auto": 3000,
                "delay": 2000
              },
              "variant": "B",
              "winner": 1,
              "create_time": "2021-10-29 12:47:00",
              "update_time": "2021-10-30 14:27:26"
            }
          ],
          "position": 3,
          "create_time": "2021-10-29 12:47:00",
          "update_time": "2021-10-30 14:27:26"
        }
      ],
      "type": "web",
      "name": "Container Example",
      "description": "This is an example of description.",
      "status": "active",
      "applications": {
        "app": "example-app.com",
        "include_subdomains": true,
        "create_time": "2021-10-30 14:27:26"
      },
      "icon": "https://dev-storage.ocamba.com/6197120/hood/containerss/1099/icons/favicon.ico",
      "utm_ht": "NjY4bL60N1eBPTQ2PC4xNDY4MjE0Njlh",
      "push": {
        "override": true,
        "domain": "t.ocmhood.com",
        "apns_env": "production",
        "vapid_public_key": "BCNgZE2uKpC0T9rx65suEzjsXlNz3kXxcVHcFjQ6tDLQpF8lsFd1XBuwdZ2JHPzvU1A8X6QZFtN1w63imLqKNbs",
        "service_worker": {
          "path": "/sw.js",
          "scope": "example-scope"
        },
        "auto_resubscribe": true,
        "suppress_prompts_on_subdomains": true
      },
      "analytics": {
        "enabled": true,
        "override": true,
        "domain": "t.ocmthood.com"
      },
      "crashlytics": {
        "enabled": true,
        "override": true,
        "domain": "t.ocmthood.com"
      },
      "consent": {
        "enabled": true,
        "override": true
      },
      "code": "<script>!function(h,oo,d,y,t,a,g){h[y]=t[y]||function(){(h[y].q=h[y].q||[]).push(arguments)},h[y].l=1*new Date,a=oo.createElement(d),g=oo.getElementsByTagName(d)[0],a.async=1,a.crossOrigin='anonymous',a.src=t,g.parentNode.insertBefore(a,g)}(window,document,'script','Hood','https://dev-sdk.ocmhood.com/sdk/ht.js?tag=NjY4bL60Nma9sTQ2AuAxNDY4MjE0NvHt');</script>",
      "code_snippet": "<script src=\"https://sdk.ocmcore.com/sdk/ht-latest.js\" data-tag=\"NjY4bL60N1eBPTQ2PC4xNDY4MjE0Njlh\"></script>",
      "stats": {
        "pageviews": 10,
        "sessions": 6,
        "users": 4,
        "push_subscriptions": 2,
        "push_unsubscriptions": 1
      },
      "autoconf_status": "active",
      "create_time": "2021-10-29 12:47:00",
      "update_time": "2021-10-30 14:27:26"
    }
  ]
}
Responses

Tip
1
Sortable fields are: id, partner_id, account_id, name, status, create_time, update_time.
Warning
1
In order to read partner, account or stat fields you can use predefined response (view=full). At the moment it is not possible to read those fields using fields parameter (fields=partner,account,stats) and this kind of request will result with an error.