Customizable JSON Endpoints for Content

Zesty.io custom API JSON endpoints will save your app developers a lot of time, and make requesting dynamic data on your frontend website fun and exciting! Read about how our approach differs from previous approaches. Learn about the Zesty.io headless CMS offering here.

Pregame

Install the JSON viewer extension for chrome, it makes viewing and debugging json a charm.

Step 1

Open the editor tab, and click the plus button in the editor tab.

editor interface click plug button under parsley heading

Step 2

Name your file. The file name will be used to reference the customer end point. For example if I named my file test-data, I would access the endpoint at https://www.yourdomain.com/-/custom/test-data.json?limit=5

Step 3

Copy this code example below, and paste it into your new file

Step 4

Replace content references in the copied code above with actual content reference in your Zesty.io instance. You have full access to parsley code in this view.

Step 5

You are forming proper JSON for this to work, that is why we provide .escapeForJS() for WYSIWYG editor data and leverage calls like {{if {tag._length} != {tab._num} }},{{end-if}} to have proper commas for JSON.

Step 6

Setup optional get parameters like start and limit to make custom pagination calls https://www.yourdomain.com/-/custom/test-data.json?start=0&limit=5