The JSON compact format purpose is to retrieve the master data using a lightweight structure. It follows the key-value design to display data in the simplest way and without any technical information. To activate the compact format, the compact
suffixed REST category, like data-compact
or form-data-compact
, must be used in URL.
The request body is represented by a JSON Object
whose content varies according to the operation and the category.
Dataset node
Specifies the target values of terminal nodes under the specified node. This request is used for the dataset node update operation.
{ "nodeName1": true, "nodeName2": 2, "nodeName3": "Hello" }
To ensure a JSON symmetric structure between the HTTP request and the HTTP response, enumeration node request format is like the following:
{ "enumerationNode": { "key": "a key value" } }
Record
Specifies the target record content by setting the value of each field. For missing fields, the behavior depends on the request parameter byDelta
. This structure is used for table record insert, record update or selector's select operation when local enumeration dependency field values are declared.
{ "gender": { "key": "M" }, "lastName": "Chopin", "lastName-en": "Chopin", "firstName": "Fryderyk", "firstName-en": "Frédéric", "birthDate": "1810-03-01", "deathDate": "1849-10-17", "jobs": [ { "key": "CM" }, { "key": "PI" } ], "infos": [ "https://en.wikipedia.org/wiki/Chopin" ] }
Record fields
Specifies the target values of fields under the record terminal node by setting the value of each field. For missing fields, the behavior depends on the request parameter byDelta
. This structure is only used for table record updates.
{ "jobs": [ { "key": "CM" }, { "key": "PI" } ] }
Record table
Defines the content of one or more records by indicating the value of each field. For missing fields, the behavior depends on the parameter of the request byDelta
. This structure is used upon insert or update records in the table.
[ { "gender": { "key": "M" }, "lastName": "Saint-Saëns", "firstName": "Camille", "birthDate": "1835-10-09", ... }, { "gender": { "key": "M" }, "lastName": "Debussy", "firstName": "Claude", "birthDate": "1862-10-22", ... } ]
Record table to delete
Defines one or more records. This structure is used upon deleting several records from the same table.
[ { "details": "http://.../root/table/1" }, { "details": "http://.../root/table/2" }, { "primaryKey": "./oid=3" }, { "foreignKey": "4" }, ... ]
Field
Specifies the target field content. This request is used upon field update.
The request has the same structure as defined in node value.
Open or close user interface
Specifies whether the user interface is open or close and the unavailability message.
{ "toolStatus": { "key": true, // or false "label": "Open" }, "toolStatusCloseMessage": "Access is temporarily forbidden for maintenance." }
Only writable fields can be mentioned in the request, this excludes the following cases:
Association node,
Selection node,
Value function,
JavaBean field that does not have a setter,
Unwritable permission on node for the authenticated user.
The response body is represented by a JSON Object
whose content depends on the operation and the category.
Dataset tree
Contains the hierarchy of table
and non-terminal group
nodes.
{ "hasChildren": false, "rootName": { "settings": { "weekTimeSheet": {}, "vacationRequest": {} }, "table1": {}, "table2": {} } }
Dataset node
Contains the list of terminal nodes under the specified node.
{ "nodeName1": true, "nodeName2": 2, "nodeName3": "Hello" }
Datasets list
JSON Object
containing the list of root or children datasets for the respectively specified dataspace or dataset.
Every dataset JSON Object
has the following properties:
JSON property | JSON format | Description | Required |
---|---|---|---|
|
| Specifies the dataset formatted key. Format: | Yes |
|
| Specifies whether the dataset can be selected, according to the user's permissions. | Yes |
|
| Specifies whether the dataset has children, according to the user's permissions. | Yes |
{ "rows": [ { "key": "mydataset", "isSelectAllowed": true, "hasChildren": true }, { // Another dataset } ], "pagination": { "firstPage": "http://.../data/v1/BReference?pageSize=4", "nextPage": "http://.../data/v1/BReference?pageSize=4&firstElementIndex=4", "previousPage": null, "lastPage": "http://.../data/v1/BReference?pageSize=4&firstElementIndex=8" } }
Dataset information
JSON Object
containing the following properties:
JSON property | JSON format | Description | Required |
---|---|---|---|
|
| Specifies the dataset formatted key value. Format: | Yes |
| JSON | Specifies the dataset schema location. Only packaged in module schemas and publications are supported. | Yes |
|
| Specifies the module name where the dataset schema is located. | No |
|
| Specifies the path in the module where the dataset schema is located. | No |
|
| Specifies the publication name of the dataset schema. | No |
|
| Specifies the data model name of the dataset schema publication. | No |
|
| Specifies the version name of the dataset schema publication. | No |
|
| Specifies the parent dataset formatted key value. If there is no parent, then it holds a | Yes |
|
| Specifies whether the dataset is activated. | Yes |
|
| Specifies the owner profile. | Yes |
|
| Specifies the creator profile. | Yes |
|
| Specifies the creation time. | Yes |
|
| Specifies the updater profile. | Yes |
|
| Specifies the update time. | Yes |
{ "key": "mydataset", "dataModel": { "module": "modulename", "pathInModule": "/WEB-INF/ebx/schemas/mydataset.xsd" }, "parent": null, "activated": true, "owner": "Beveryone", "creator": "Uadmin", "creation_time": "2023-10-10T15:49:03.023", "updater": "Uadmin", "update_time": "2023-10-10T15:49:03.005" }
Table
JSON Object
containing the following properties:
rows
corresponding to JSON Array
of selected records. Each record is represented by a JSON Object
. If no record is selected, then the JSON Array
is empty.
(Optional) pagination
containing pagination data.
{ "rows": [ { "id": 1, "firstName": "Claude", "lastName": "Levi-Strauss" }, { "id": 2, "firstName": "Sigmoud", "lastName": "Freud" }, { "id": 3, "firstName": "Alfred", "lastName": "Dreyfus" } ], "pagination": { "firstPage": null, "previousPage": null, "nextPage": "http://.../root/individu?pageRecordFilter=./id=9&pageSize=9&pageAction=next", "lastPage": "http://.../root/individu?pageSize=9&pageAction=last" } }
Record
JSON Object
containing the record content.
{ "pk": "pk1", "name": "Name1", "name-fr": "Name1", "parent": null }
Fields
The compact json format does not support the association and selection nodes.
For other kinds of nodes, they contain the current node value.
Retrieve the user interface state
Contains the user interface status and the unavailability message.
{ "toolStatus": { "key": true, // or false "label": "Open" }, "toolStatusCloseMessage": "Access is temporarily forbidden for maintenance." }
Nodes, records and fields property and value may be hidden depending on their resolved permissions (see permissions) .
This section is always included and contains master data without any additional fields.
The node value contains only the data or the label and the details link in case of enumeration. It is available for all nodes except association and selection.
Corresponds to a key-value JSON entry which describes the node content.
XML Schema | JSON format | Examples |
---|---|---|
Group
|
Contains a property per sub-node. | Example for a simple-occurrence group. { "road": "11 rue scribe", "zipcode": "75009", "country": "France" } |
List
|
Contains an array of all field occurrences represented by a JSON Each JSON | Example for a multi-occurrence field of [ 0, 1, 2, 3, 4 ] Example for a multi-occurrence group. [ { "road": "11 rue scribe", "zipcode": "75009", "country": "France" }, { "road": "711 Atlantic Ave", "zipcode": "MA 02111", "country": "United States" } ] |
Enumeration
|
Contains | Example for a foreign key. { "key":"1", "details":"http://.../Bdataspace/dataset/root/nationality/FRA", "label":"Française" } |