Retrieve the App Data Model
Last updated
Last updated
It is sometimes necessary to know the structure of the data that will be returned by the JourneyApps API. For example, knowing which fields to expect for certain objects.
This API function allows you to retrieve a structured representation of your app's , exactly as defined in schema.xml within OXIDE.
/api/v4/
backend-deployment-id
/datamodel.json
GET
This API function does not take any parameters (except for standard ETag functionality — please see below).
The response will contain a list of the object types in the particular app's Data Model, with a list of fields of each object type. Relationships of the object types are also included.
The HTTP headers for the response also include an which allows you to keep track of versions of the Data Model. Whenever changes are made to the app's Data Model, the hash in the ETag header will change. You can include this ETag hash value with the If-None-Match
header in subsequent calls to the datamodel
API function. If the Data Model for the app hasn't changed, a "304 Not Modified" response code will be returned.
The response also contains a field called datamodel_hash
, identifying the current version of the data model. This matches the value in the oplog.json
call.
Response: