JSON API: forward compatibility with Workspace module

Created on 1 December 2016, over 7 years ago
Updated 22 April 2024, 2 months ago

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.

🌱 Plan
Status

Active

Version

11.0 πŸ”₯

Component
WorkspacesΒ  β†’

Last updated 17 days ago

No maintainer
Created by

πŸ‡«πŸ‡·France dixon_ France

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡΅πŸ‡±Poland touma-b Warsaw

    Can we use JSON:API to retrieve a node from the 'stage' workspace instead of the usual 'live' one? If so, how would we go about doing that? Thanks a bunch!

  • πŸ‡·πŸ‡΄Romania amateescu

    @capita that's not possible currently because there's no integration between JSON:API and Workspaces. That's what we're trying to figure out in this issue :)

Production build 0.69.0 2024