- Added the
callback
endpoint config setting, which enables JSONP output. (#96)
- The
defaults
setting can now be set to a callable. (#98) criteria
endpoint settings can now specify anoffset
. (#99)- Updated Fractal to 0.18. (#109)
- Deprecated
craft\elementapi\resources\EntryResource
. (#108)
- 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
generateTransformsBeforePageLoad
Craft 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
, andexcludes
endpoint config options in thedefaults
array. (#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.code
anderror.message
properties. - Renamed
craft\elementapi\ElementResourceAdapter
tocraft\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.php
when updating to Craft 3 Beta 20+ and Element API 2.4.1+.
- Craft 3 Beta 20 compatibility.
- Added the
include
andexclude
endpoint config settings. (#42)
- Added the
cache
endpoint config setting.
- Added a JSON Feed V1 serializer.
- Added the
meta
endpoint config setting. - Added the
serializer
endpoint config setting. - Added the
jsonOptions
endpoint config setting. - Added the
pretty
endpoint config setting.
- Updated Fractal to 0.16.
- Fixed a bug where pagination URLs contained an extra
pattern
query param.
- Added support for a
resourceKey
endpoint 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
first
endpoint config setting. Useone
instead.
- Added the
include
andexclude
endpoint config settings. (#41)
- Added the
cache
endpoint 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
meta
endpoint config setting. - Added the
serializer
endpoint config setting. - Added the
jsonOptions
endpoint config setting.
- Updated Fractal to 0.16.
- Added support for a
resourceKey
endpoint config setting (default is'data'
).
- Pagination URLs will now honor any existing query string parameters.
- Added the
elementApi.onBeforeSendData
event.
- Updated to take advantage of new Craft 2.5 plugin features.
Initial release.