{"repo":"craftcms/element-api","free":true,"listed":false,"github":"https://github.com/craftcms/element-api","clone":"git clone https://github.com/craftcms/element-api.git","description":"Create a JSON API/Feed for your elements in Craft.","language":"PHP","stars":503,"topics":["craftcms","craft-plugin","api","fractal","json-api","json","json-serialization","craft2","craft3","json-feed"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Element API for Craft CMS This plugin makes it easy to create a JSON API for your entries (and other element types) in Craft CMS. It’s powered by Phil Sturgeon’s excellent Fractal package. Requirements This plugin requires Craft CMS 4.3.0+ or 5.0.0+. Installation You can install this plugin from the Plugin Store or with Composer. From the Plugin Store Go to the Plugin Store in your project’s Control Panel and search for “Element API”. Then click on the “Install” button in its modal window. With Composer Open your terminal and run the following commands: Setup To define your API endpoints, create a new element-api.php file within your config/ folder. This file should return an array with an endpoints key, which defines your site’s API endpoints. Within the endpoints array, keys are URL patterns, and values are functions that define the endpoint configurations. Endpoint Configuration Settings Endpoint configuration arrays can contain the following settings: class The class name of the Fractal resource that should be used to serve the request. If this isn’t set, it will default to craft\\elementapi\\resources\\ElementResource . (All of the following configuration settings are specific to that default class.) elementType (Required) The class name of the element type that the API should be associated with. Craft’s built-in element type classes are: - craft\\elements\\Asset - craft\\elements\\Category - craft\\elements\\Entry - craft\\elements\\GlobalSet - craft\\elements\\MatrixBlock - craft\\e","default_branch":null,"files":null,"tree":[],"storefront":"/r/craftcms","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/craftcms/element-api/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}