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

Fields and field values

Read and parse the fields of Exponential content in an app - the field routes, the five keys of a field object, how the value is written for rich text, images, blacklisted datatypes and every other datatype, and how to…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/mobile-app-developers/rest-api/fields-and-field-values.md

On this page

Fields and field values

This page is for app developers who turn REST answers into the app's own data model. It explains the field routes, the shape of a field and, most important, how each value is written, so the app parses it correctly.

Contents

  1. The field routes
  2. The field object
  3. How values are written
  4. Mapping fields to your model
  5. When a field is not enough

The field routes

# every field of a node's object
curl -s -H "Authorization: Bearer $EXP_API_KEY" https://example.com/api/ezp/v2/content/node/<node id>/fields
# one field
curl -s -H "Authorization: Bearer $EXP_API_KEY" https://example.com/api/ezp/v2/content/object/<object id>/field/title

The same fields come with ?ResponseGroups=Fields on a node, object or list read (Response groups). The field routes default to the FieldValues group and add metadata only with ?ResponseGroups=Metadata.

The field object

Each field, under its identifier in the fields map, has five keys (ezpRestContentModel::attributeOutputData()):

KeyMeaning
typethe datatype string, for example ezstring, ezxmltext, ezimage
identifierthe field identifier of the class, for example title
valuethe value, see below
idthe numeric id of this field of this object
classattribute_idthe numeric id of the field definition in the class

How values are written

Datatypevalue
ezxmltext (rich text)the field's rendered HTML with every tag removed: plain text, with no paragraphs, links or embedded images
ezimagethe path of the original image file as stored by the image datatype (the part before | of its string form); the alternative text is cut off
any datatype in site.ini [ContentSettings] DatatypeBlackListForExternal[]null; the shipped list holds ezuser, so user accounts never leave through REST
every other datatypethe datatype's toString() representation

The toString() form is the datatype's own simple export format. It differs per datatype (numbers, dates, booleans, relation lists, selections), so test each datatype your classes use against a real answer before you write the parser, and treat every value as a string that you convert. Do not guess formats from the field name.

Two consequences for apps:

Mapping fields to your model

  • Key by identifier, check type. A class can change: an editor's administrator may add a field or change a datatype. Ignore unknown identifiers, and fail soft when type is not what the app expects.
  • Treat null and empty strings as "no value". Optional fields often come empty.
  • Keep classIdentifier with the item. It tells the app which screen or cell to use (Content classes for apps).
  • Do not depend on id. A field's id belongs to one object; it is not useful as a key across items. Use classattribute_id or identifier for the field definition.

When a field is not enough

NeedSource
A field in another language?Translation=<locale> (Multilingual content)
Attribute values as the remote services export themexpnode::dataMap::<node id> or expnode::attribute::<node id>::<identifier> (Calling expservices from an app)
A computed or combined valuea server function written for the app (ezjscore server functions for your app)

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