As promised 3 months ago, Gabe, Mateu and I together with twelve other contributors shipped support for revisions and file uploads today!
What happened since last month? In a nutshell:
- Security release 1 fixing an access bypass: 1.24 + 2.0-RC4
- 2.0 + 2.1 released :)
- Usage of 2.x continues to rise: ~400 → ~1700 sites, 50% of those on 2.0 2
- The 2.0 release happened thanks to 63 contributors!
- Gabe proposed JSON:API profiles for versioning/revisions and multiple-arity relationships, to take advantage of the upcoming 1.1 version of the spec
- New core patch to bring JSON:API to Drupal core: #2843147-101
- Several refactors of internals 3 that pave the path for new features like hypermedia links and partial caching
- JSON:API Extras is kept in sync — about 300 of you use that with JSON:API 2.x.
JSON:API 2.1
JSON:API 2.1 follows two weeks after 2.0.
Work-arounds for two very common use cases are no longer necessary: decoupled UIs that are capable of previews and image uploads4.
- File uploads work similarly to Drupal core’s file uploads in the REST module, with the exception that a simpler developer experience is available when uploading files to an entity that already exists.
- Revision support is for now limited to retrieving the working copy of an entity using
?resourceVersion=rel:working-copy
. This enables the use case we hear about the most: previewing draftNode
s. 5 Browsing all revisions is not yet possible due to missing infrastructure in Drupal core. With this, JSON:API leaps ahead of core’s REST API.
Please share your experience with using the JSON:API module!
This was in the making for most of 2018, see the SA for details. ↩
Note that usage statistics on drupal.org are an underestimation! Any site can opt out from reporting back, and composer-based installs don’t report back by default. ↩
Which we can do thanks to the tightly managed API surface of the JSON:API module. ↩
These were in fact the two feature requests with the highest number of followers. ↩
Unfortunately only
Node
andMedia
entities are supported, since other entity types don’t have standardized revision access control. ↩
First of all, I’d like to
First of all, I’d like to emphasize that two lines summary doesn’t justify the work and effort went into revision support and file upload.
It is a big step forward and was a massive undertaking. All the JSON:API maintainers worked really really hard to get those ready for stable release so big thanks and lot of respect for Wim, Gabe, and Mateu.
I think we also had a security release within last month. ;-)
And I’m really excited about upcoming changes after 2.1. :D
You’re right, I forgot about
You’re right, I forgot about that because that happened in decembed, not January. I’ll update the blog post! Good catch :)
Done: blog post updated! Now
Done: blog post updated! Now it mentions the security release, and it mentions how many people contributed to the 2.0 & 2.1 releases :)
Wim,
Wim,
This is awesome news, one step closer to having it in Core. Thanks all for all the hard work.