Endpoints configuration provides you with option, to create your own endpoint, that can read, write, update, or delete your data. It does not have to work only with you DataSets, it can work with users, or media as well.
Users with the domain administrator role can create new custom endpoints since version 2.9.23.1.
There are 3 types of Authorization
- Public endpoint
- OAuth endpoint
- Belladati endpoint - this can be called from within belladati without need of authorization.
Depending on authorization type, URL is generated. For Public, prefix "/pub/ext/" is used. For OAuth, prefix "/api/ext/" is used.
For example if URL is set to "update" and Autorization is set to "public" generated adress will be "/pub/ext/update"
Set Endpoint
To set the new endpoint, you should go to the "Endpoints configuration" in the Administration
top menu
By clicking on the template name, an editor will be open.
Here is an example of endpoint, that will return last value from attribute L_VERSION from dataset 1118.
def rows = readDataset(1118 , 1, null, com.belladati.common.sort.Sort.descending('row_uid')) Response.ok(rows[0].getValues()['L_VERSION'],"text/plain").build()