- Fixed a bug where field types that return objects were getting converted to arrays by the default element transformer. Now their serialized value is used instead. (#75)
- The
generateTransformsBeforePageLoadCraft config setting is now automatically enabled for all Element API endpoints. (#81)
- Fixed a bug where it wasn’t possible to set
cache,serializer,jsonOptions,pretty,includes, andexcludesendpoint config options in thedefaultsarray. (#69)
- The cache key now takes into account the current site id. (#76)
- Loosened the Craft CMS version requirement to allow any 3.x version.
- PHP 7.2 compatibility.
- Added support for fetching entry drafts & versions.
- Added
craft\elementapi\resources\EntryResource.
- Exceptions are now represented as JSON responses, with
error.codeanderror.messageproperties. - Renamed
craft\elementapi\ElementResourceAdaptertocraft\elementapi\resources\ElementResource. craft\elementapi\resources\ElementResource::getElementQuery()andgetTransformer()are now protected methods.
- Fixed a deprecation error that occurred on Craft 3 Beta 25 and later. (craftcms/cms#1983)
- Craft 3 Beta 24 compatibility.
{note} You will need to rename your Element API config file to
element-api.phpwhen updating to Craft 3 Beta 20+ and Element API 2.4.1+.
- Craft 3 Beta 20 compatibility.
- Added the
includeandexcludeendpoint config settings. (#42)
- Added the
cacheendpoint config setting.
- Added a JSON Feed V1 serializer.
- Added the
metaendpoint config setting. - Added the
serializerendpoint config setting. - Added the
jsonOptionsendpoint config setting. - Added the
prettyendpoint config setting.
- Updated Fractal to 0.16.
- Fixed a bug where pagination URLs contained an extra
patternquery param.
- Added support for a
resourceKeyendpoint config setting (default is'data').
- Fixed the changelog and download URLs.
- Fixed a PHP error that occurred when paginating results. (#36)
- Craft 3 Beta 8 compatibility.
- Craft 3 compatibility.
- It’s now possible to provide custom resource adapter classes, which could be associated with other things besides elements.
- Added
craft\elementapi\ResourceAdapterInterface. - Added
craft\elementapi\ElementResourceAdapter.
- Deprecated the
firstendpoint config setting. Useoneinstead.
- Added the
includeandexcludeendpoint config settings. (#41)
- Added the
cacheendpoint config setting.
- Fixed a bug where endpoint were sending JSON headers even if an exception occurred and the HTML error view was returned. (#39)
- Added a JSON Feed V1 serializer.
- Added the
metaendpoint config setting. - Added the
serializerendpoint config setting. - Added the
jsonOptionsendpoint config setting.
- Updated Fractal to 0.16.
- Added support for a
resourceKeyendpoint config setting (default is'data').
- Pagination URLs will now honor any existing query string parameters.
- Added the
elementApi.onBeforeSendDataevent.
- Updated to take advantage of new Craft 2.5 plugin features.
Initial release.