by Ryan Irelan
The Element API is a first-party plugin by Pixel & Tonic that allows you to create an API for sharing your data from Craft CMS. The responses are formatted as JSON (what is JSON?).
Using the plugin you can create an API that exposes Craft Elements via a JSON-formatted responses. The API only is read-only. You cannot write to Craft using this API and there’s no authentication built in. Be careful what you share!
The Element API is made up of the following pieces:
elementapi.phpfile you have to create
To use the Element API plugin you need to meet these requirements:
Installing the Element API plugin is like installing any other Craft plugin: drag the plugin file to the
plugins directory and then install the plugin via the Craft Control Panel.