It would be nice to have JSON API support clients that want to operate on entities in specific workspaces (using
Workspace module →
which is planned for core).
JSON API is planned for 8.3, potentially 8.4.
The same for Workspace module, planned for 8.3, potentially 8.4.
If JSON API makes it into core before Workspace, it would be nice not needing to break APIs once workspaces get into core.
Simply, we should coordinate a little bit :)
Aspect A: URL structure
Alternative 1
Consistently embedding workspace ID in the paths, e.g. /api/<workspace ID>/node/1
If JSON API gets into core before Workspace module, we can simple hard-code live
as the only workspace ID. That way, when Workspace module gets into core it will continue working.
Alternative 2
/api/node/1
falls back at the "live" workspace, if Workspaces are used.
/api/<workspace ID>/node/1
targets the entity in a specific workspace ID.
The problem here might be path matching, and potential conflicts between workspace ID and entity type ID.
Aspect B: revision support
See #14 + #15.