Zephr User Guide

JSON Content

3 views 0

To use JSON feature rules in Zephr, you must configure your site with a JSON origin. Typically, this origin is an API that returns JSON content that lists the features available for transformation.

For further information on configuring your site, see the Sites topic.

Each request to the Zephr decision engine transforms the JSON by replacing the objects with a featureId key. The result of a rule is configured to match that featureId value.

Example Content

The example JSON below defines four features, each with a target for decision transformation defined in the zephrOutput property, in a single request:

{
    "popup1": {
       "label": ​"Popup 1"​, 
       "zephrOutput": {
          "featureId": ​"popup1" 
       }
    },
      "ctaBottom1": {
       "label": ​"Rectangular CTA"​, 
       "zephrOutput": {
          "featureId": ​"ctaBottom1" 
       }
    },
    "ctaBottom2": {
       "label": ​"Square CTA"​, 
       "zephrOutput": {
          "featureId": ​"ctaBottom2" 
       }
    },
    "footer": {
       "label": ​"Footer 1"​, 
       "zephrOutput": {
          "featureId": ​"footer1" 
       }
    } 
}

Example Request

If this source JSON is hosted at http://<your-origin>/articleFeatures.json, and a GET request is made to https://<your-site>.cdn.blaize.io/articleFeatures.json, Zephr proxies the JSON and transforms it according to your configured rules.