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

Which API for your app

Decide between the REST content API, the expservices remote services and a custom ezjscore server function for each screen of an app - by task, by credential, by answer shape and by what the server team has to do.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/mobile-app-developers/which-api-for-your-app.md

On this page

Which API for your app

This page is for app developers and technical leads who have to decide, screen by screen, which of the three HTTP interfaces of Exponential to call. It compares them on the things that matter for an app: what each one can do, how it authenticates, how its answers look and what the server team must set up.

Contents

  1. The short answer
  2. By task
  3. By property
  4. Mixing interfaces
  5. When nothing fits

The short answer

Read content with the REST API (/api/ezp/v1 or /api/ezp/v2). Use the remote services (expservices) for what REST does not offer: search, image alias URLs, URL aliases, languages, updating content. Ask a PHP developer for an ezjscore server function only when neither has what a screen needs.

By task

TaskREST APIexpservicesRead
Read one item with its fieldsGET /content/node/<id>?ResponseGroups=Fieldsexpnode::get, expnode::dataMapReading a node
List a folder, pagedGET /content/node/<id>/list/offset/<n>/limit/<n>expnode::childrenListing children and pagination
Count childrenGET /content/node/<id>/childrenCountexpnode::childrenCountsame
Searchnoneexpsearch::searchSearching content
Image in a screen sizenone (original path only)expimage::url, expimage::urlsImage aliases for screen sizes
Item by URL path (deep link)noneexpnode::getByPathNode ids, remote ids and deep links
Create and publishPOST /api/ezp/v2/content/node/createexpnode::createCreating and removing content
Updateanswers 501 after the permission checkexpnode::updateWriting through expservices
RemoveDELETE /api/ezp/v2/content/node/delete/<id>expnode::removeCreating and removing content
Languages of the sitenoneexplanguage::prioritized, explanguage::languagesMultilingual content

The expservices names come from the service declarations in extension/expservices/classes/; the full catalog is in the expservices reference.

By property

REST APIexpservicesOwn ezjscore function
Ships withezprestapi (required by the 6.0.15 root composer.json)expservices, part of the default distributionyour extension
URL/api/ezp/<version>/.../ezjscore/call/exp<domain>::<method>[::arg...]/ezjscore/call/<name>::<function>[::arg...]
CredentialOAuth2 token or personal API keyexpservices token, or a session cookiewhatever the function checks, usually the session
Anonymous callsrefused by default (RequireAuthentication=enabled)allowed for services marked publicup to the function
Answer shapeplain JSON objects; errors with HTTP status{"error_text":"","content":{"ok":...}}, errors inside with HTTP 200{"error_text":"","content":<value>}
Pagingoffset, limit in the path; childrenCount in metadatalast two URL arguments; meta.total, meta.has_moreyour own
Versionedyes, v1 and v2no version in the URLno

The difference in error handling matters for your HTTP layer: REST says what went wrong with the status code, while an expservices call that reaches the service answers HTTP 200 and puts the error in content.ok and content.error.code (The expservices envelope).

Mixing interfaces

Mixing is normal and safe: both run as a user and both check the same roles and policies. Keep two things apart in the app's code:

  • Two credentials. A REST OAuth token or expk_ key is not an expservices token, and an expt_ token is not accepted by REST. Store and refresh them separately (Choosing a credential).
  • Two error models. Wrap each interface in its own client class that turns its answers into one error type of your app.

When nothing fits

A screen that needs data no route or service gives (a combined dashboard, a custom calculation) gets its own server endpoint, written in PHP in an extension: an ezjscore server function or a REST provider of your own. That is application creator work: JSON endpoints with ezjscore, REST API for applications. Brief them with the screen, the fields you need and the user the call runs as.

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