Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Statistics Counter Module statistics_counter crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

JSON:API Node Preview

538 sites Security covered
View on drupal.org

This module adds a `/preview` endpoint to the JSON:API for nodes. This allows you to get a preview of a node's content in JSON:API format by appending `/preview` to the node's JSON:API path. This preview endpoint is not cached and is only accessible to the authenticated user who created the preview.

A module to get node previews in JSON:API.

It adds a new endpoint for all JSON:API resources of type node, adding a
/preview string to the end of the original JSON:API path.

For example:

  • Node / Article : /jsonapi/node/article/{UUID}/preview
  • Node / Page : /jsonapi/node/page/{UUID}/preview
  • etc

That endpoint is compatible with any other JSON:API parameters available
(fields, include, etc).

The expected workflow to make this module work is as following:

  • Edit any node and click on "Preview" button
  • A new window opens, with a URL like this: http://example.com/node/preview/1f8b435a-0026-4628-93f3-38ae7353ffbb/full
  • Grab the UUID (the "8-4-4-4-12" chars, "1f8b435a-0026-4628-93f3-38ae7353ffbb" in this example)
  • Execute a request to /jsonapi/node/article/1f8b435a-0026-4628-93f3-38ae7353ffbb/preview

Being a preview operation, this endpoint:

  • is not cached.
  • is authenticated, so it is only available to the same authenticated user that created the node preview (please do not open an issue about how to get anonymous access to node previews, since that is a security breach).

You can use any UUID to request the preview endpoint. If that UUID has not been
previewed, or the user making the request has not enough permissions, JSON:API
responds with a 404 error.

REQUIREMENTS

  • Node module
  • JSON:API module

INSTALLATION

Run composer require drupal/jsonapi_node_preview.

CONFIGURATION

Install it and it works. There's no configuration, no UI.

SIMILAR MODULES

Visit https://www.drupal.org/project/graphql_node_preview for a version of this module for GraphQL.

Activity

Tracked releases
1
Tracked since
Aug 2026
Latest release
2 days ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0-beta5 Pre-release Aug 21, 2026