Using Matrix as a REST API endpoint

(Mitch Kerry) #1


Is it possible to use Matrix as an API end point to allow users to send a GET request with headers and retrieve a JSON response?


(Tbaatar) #2

You can create API endpoint in Matrix to create JSON data. We currently do this for creating dynamic emaills to pull content from the website.

You can also use external API (e.g weather) with REST asset and mutate this data with your own Squiz asset data to create your own API endpoint.

(Bart Banda) #3

Easiest thing would be to create an asset listing or PL that returns data of an asset as JSON and use a JSON design area, or even easier, use the new Content API

(Asharpe) #4

Here’s an example of using Matrix to present JSON (or JSONP) - How do I remove the last trailing comma?

(Mitch Kerry) #5

Thanks guys
I am doing the JSON return other places on the site to expose data.
I’ll see if this will work in this instance…but it looks like the Content API would be useful.
We’re upgrading soon so will put this on the wish list.