View Widget


                https://api.ocamba.com/v2/adex/widgets/{id}
            

Retrieves the details of a Widget that has previously been created if a valid identifier was provided


Name
Description
idstringrequired
Unique identifier for the object defined as a path parameter.


Example: 12345

Name
Description
fieldsstring
The client can request more efficient filtered representation of the resource showing only specific field(s), using the “fields” query parameter. Note that the “fields” parameter has precedence over the “view” parameter.

Example GET /VERSION/adex/RESOURCE_NAME?fields=id,name

See "Tips" for the list of filterable parameters.


Example: fields=field1,field2,field3


200 - OK
Arrow
Name
Description
items[ widget ]
An array of all created items.
Widget
Name
Description
contentstring
The widget content. This is the place where you can put HTML content with replacable fragments(macros). Where HTML page is rendered, placeholders are replaced with real macro values.

create_timedateTime
Timezone: GMT.


Example: 2021-09-29 15:40:10

idstring
The ID of the widget, generated by the Ocamba API


Example: 1000

macros[ widget-macro ]
The array of macro objects.
Macro
Name
Description
namestring
The macro name.


Example: TITLE

requirednumber (int)
Acceptable values are - 0/1.


Example: 1

typestring
At this time only text macros are supported.


Example: text

namestring
The widget name.


Example: My first widget

totalinteger
A total number of items.


Example: 1
200 Arrow
{
  "total": 1,
  "items": [
      {
          "id": "206",
          "name": "Example Widget",
          "content": "<html>\n<head>\n<meta name=\"viewport\" content=\"width=device-width, minimum-scale=0.1\">\n<title>widget</title>\n<style>\n.widget{width:320px;}\n.widget > article{display:inline-block;position:relative;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;}\n.widget > article > span {position:absolute;top:1px;right:1px;z-index:2;display: flex;background-color:#fff}\n.widget > article > span > a > i{margin:0 0 0 1px;width:16px;height:16px;display:block;}\n.widget > article > a{z-index:1;text-decoration:none;color:unset;}\n.widget > article > a > img{display: block;max-width: 100%;height: auto;}\n.widget > article > a > section {padding:8px 0 0 0;display:block;}\n.widget > article > a > section > h1{padding:0;margin:0;font-size:20px;font-weight:600;color:#000;text-align:left;line-height:1;display:block;}\n.widget > article > a > section > h1:hover{text-decoration:underline;}\n.widget > article > a > section > h2{padding:8px 0 0 0;margin:0;font-size:12px;font-weight:600;color:#000;text-align:left;line-height:1;display:block;opacity:0.4;}\n.widget > article > a > section > h3{padding:8px 0 0 0;margin:0;font-size:12px;font-weight:400;color:#0a6735;text-align:left;line-height:1;display:block;}\n.ico-clsa {background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImJhc2ljIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZmlsbD0iIzQ4OEZDRCIgZD0iTTgsMTVjLTMuOSwwLTctMy4xLTctN3MzLjEtNyw3LTdzNywzLjEsNyw3UzExLjksMTUsOCwxNXogTTEzLjcsOGMwLTMuMi0yLjYtNS43LTUuNy01LjdTMi4zLDQuOSwyLjMsOHMyLjYsNS43LDUuNyw1LjdTMTMuNywxMS4yLDEzLjcsOHoiLz48cGF0aCBmaWxsPSIjNDg4RkNEIiBkPSJNMTEsNWMwLjIsMC4yLDAuMiwwLjYsMCwwLjhMOC44LDhsMi4xLDIuMWMwLjIsMC4yLDAuMiwwLjYsMCwwLjhjLTAuMiwwLjItMC42LDAuMi0wLjgsMEw4LDguOEw1LjksMTFjLTAuMiwwLjItMC42LDAuMi0wLjgsMHMtMC4yLTAuNiwwLTAuOEw3LjIsOEw1LDUuOUM0LjgsNS42LDQuOCw1LjMsNSw1czAuNi0wLjIsMC44LDBMOCw3LjJMMTAuMSw1QzEwLjQsNC44LDEwLjcsNC44LDExLDV6Ii8+PC9zdmc+);}\n</style>\n</head>\n<body>\n<div class=\"widget\">\n <article>\n  <span><a><i class=\"ico-clsa\"></i></a></span>\n  <a href=\"${LANDING_URL}\">\n   <img src=\"${IMAGE}\">\n   <section>\n    <h1>${TITLE}</h1>\n    <span>${SPONSORED}</span>\n    <h2>${DESCRIPTION}</h2>\n   </section>\n  </a>\n </article>\n</div>\n<img src=\"${IMPRESSION_URL}\" height=0 widgth=0>\n</body>\n</html>",
          "macro": [
              {
                  "name": "LANDING_URL",
                  "type": "text",
                  "required": "1"
              },
              {
                  "name": "IMAGE",
                  "type": "text",
                  "required": "1"
              },
              {
                  "name": "TITLE",
                  "type": "text",
                  "required": "1"
              },
              {
                  "name": "SPONSORED",
                  "type": "text",
                  "required": "0"
              },
              {
                  "name": "DESCRIPTION",
                  "type": "text",
                  "required": "0"
              },
              {
                  "name": "IMPRESSION_URL",
                  "type": "text",
                  "required": "0"
              }
          ],
          "create_time": "2020-11-19 10:26:02",
          "update_time": "2022-01-13 08:43:00"
      },
    ]
}
{
  "total": 1,
  "items": [
    {
      "id": "1000",
      "name": "My first widget",
      "macros": [
        {
          "name": "TITLE",
          "type": "text",
          "required": 1
        }
      ],
      "create_time": "2021-09-29 15:40:10"
    }
  ]
}