Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
This is a new feature in Joget DX 8.
JSON API List Data Store allows one to populate a List using JSON calls.
Auto Handling Filters
for JSON API List Binder and perform filtering using CQ EngineDisable object keys as columns
to join object key as single column value and object value as another column value.
Figure 1 : Configure JSON API page for Joget DX version 8.1 onwards
Auto Handling Filters
in JSON API List Binderdata
in Base JSON Object Name for Multirow Data
field to create row{
data : [
{
key1 : "value1",
key2 : "value2"
}
]
}
{
"data": {
"key1": {
"attr1": "Value 1",
"attr2": "Value 2",
},
"key2": {
"attr1": "Value 1",
"attr2": "Value 2",
}
}
}
Let say, we want each key in data
object to create as rows, we can use data<>
in Base JSON Object Name for Multirow Data
in this new change. It will tell the plugin to loop all the keys of data
and create it as row.
{
"key1" {
"data": {
"ckey1": {
"attr1": "Value 1",
"attr2": "Value 2",
}
}
},
"key2" {
"data": {
"ckey2": {
"attr1": "Value 1",
"attr2": "Value 2",
}
}
}
}
We want to create row based on the data
object keys. In this case, using <>.data<>
in Base JSON Object Name for Multirow Data
. The first <>
is to tell it loop all the keys of root object, then .data<>
is to tell it to create row based on object keys of data
object.
Disable object keys as columns
in JSON API List Binder{
data : [
{
key1 : "value1",
key2 : "value2"
key3 : {
ckey1 : "child value1",
ckey2 : "child value2"
}
}
]
}
Will resulting columns key1
, key2
, key3.ckey1
, key3.ckey2
.
Disable object keys as columns
, for none Base JSON Object Name for Multirow Data
object, it will join the object keys as single column and the value as another column. For the same response above, it will resulting column as key1
, key2
, key3.KEY
, key3.VALUE
. The value of key3.KEY
will be ckey1;ckey2
and value of key3.VALUE
will be child value1;child value2
Figure 1: Configure JSON API
Name | Description | ||||||
---|---|---|---|---|---|---|---|
JSON URL | URL to be called. Mandatory Field. //You may also insert the following URL parameters to enable pagination "https://example.com/api/data?pageSize={size}&startOffset={start}"
| ||||||
Call Type |
| ||||||
Body Type (Only Applicable to Call type = POST or PUT) | Select the POST or PUT method:
| ||||||
Request Headers | Add name(s) and value(s) to the request header
| ||||||
Passover Current Request Cookies | When checked, Current Request Cookies will be passed to the server with the request. | ||||||
Base JSON Object Name for Multirow Data | Name of the base JSON object (e.g. data). | ||||||
Total Record Count JSON Object Name | Total number of records in the JSON object (e.g. data.total) | ||||||
Primary Key | Unique Identifier of the JSON object (e.g. data.id). Mandatory Field. | ||||||
Auto Handling Full Results Paging & Sorting | When checked, This option enables automatic sorting for the results returned through the JSON URL. Uncheck this, if you are performing pagination. | ||||||
Debug Mode | Show relevant debug entries in the server log for debugging purposes. | ||||||
Sample Response (for Retrieve Columns) | Enter a Sample Response of how the JSON object is formatted. Must insert a sample response into the field if you are performing pagination. e.g. |
Figure 2: Download the demo app below to view how JSON API is used to populate a list.