I’m trying to add a datadefinition as a returnvalue but i’m don’t know how to add filtering.
Since M8465 r204, it is possible to add your configured data definition as an additional return parameter for a REST Process.
By default, REST Processes return the return values from the Architect Process.
Additionally, you can add two types of manual return parameters.
- Single expressions / values (e.g. string, int)
- A (filtered) data definition, like with GET Rest Data Definition End points
Adding single values to return values
Go to REST Process return values. Here, you can add a parameter to give a result:
This adds, next to the already-available return parameters, my custom value:
{
"success": true,
"error": null,
"response": {
"user": 9,
"given_username": "my_username@novulo.com"
},
"httpcode": 200
}
Adding Data definitions to REST Processes
To add data definitions, go to more > POST process return values. (They also work with PUT, PATCH, DELETE).
This gives you these two additional grids:
Here, for the Data defintion return values, you can add a Data definition. In this example, the data definition represents the just-added CMS user:
With the result being the part in dd_user
.
{
"success": true,
"error": null,
"response": {
"user": 11,
"dd_user": [
{
"id": 11,
"username": "my_username3@novulo.com"
}
],
"given_username": "my_username3@novulo.com"
},
"httpcode": 200
}