JSON API: forward compatibility with Workspace module

Created on 1 December 2016, almost 8 years ago
Updated 22 April 2024, 7 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 about 2 hours 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.71.5 2024