Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Drafts, preview and publishing

How drafts and versions of Exponential content relate to an app - REST reads only published content, reading drafts and versions through the expversion services with versionread rights, building an editor preview for…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/mobile-app-developers/publishing-workflow/drafts-preview-and-publishing.md

On this page

Drafts, preview and publishing

This page is for app developers who are asked "can editors see how this looks in the app before it goes live?" and for the editors who ask. It explains what the APIs offer for unpublished content and how to build a preview.

Contents

  1. What the REST API reads
  2. Versions and drafts through the remote services
  3. Building an app preview
  4. Publishing from an app
  5. What editors should know

What the REST API reads

Node and object reads build the answer from the content as published; the REST routes have no version or draft parameter (Routes reference). An editor's draft is invisible to the app until it is published.

Versions and drafts through the remote services

The expversion domain (declared in extension/expservices/classes/content/expversionservices.php) reads versions:

ServiceArgumentsAccess
expversion::listobject id, limit, offsetcontent/versionread
expversion::draftsobject idcontent/versionread
expversion::myDraftslimit, offsetcontent/edit
expversion::dataMapobject id, version, languagecontent/versionread
expversion::viewUrlobject id, version, languagecontent/versionread; the relative URL that previews a version on the site
expversion::publish (write)object id, versioncontent/publish

content/versionread is an editor's right. A public app's user must not have it.

Building an app preview

The pattern recommended for headless front ends is "read the draft version through an authenticated, editor-level call and render it in a protected preview route" (Headless Exponential). For an app:

  1. A preview build of the app (or a preview mode behind an editor sign-in) that signs in as the editor.
  2. The editor opens an item; the app lists its drafts with expversion::drafts and reads one with expversion::dataMap::<object id>::<version>::<language>.
  3. The app renders the draft with the same screens as published content, marked clearly as a preview.

expversion::dataMap answers in the expservices attribute format, not the REST field format, so the preview needs a small mapping layer; test it with every class the app shows.

Publishing from an app

An editor app can publish a draft with expversion::publish (POST, content/publish), or create and publish in one step with REST create or expnode::create. The publish workflow of the site runs as for the administration, so approval steps still apply.

What editors should know

  • Publishing makes the item visible to the app, possibly after the server's answer cache expires (ten minutes by default) and the app's next refresh.
  • Fields the app shows (teaser, main image) need content even when the website template does not show them.
  • Removing or moving an item out of a folder the app shows makes it disappear from the app at its next sync.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x