28 Mar
2023
28 Mar
'23
6:21 p.m.
On Mar 29, 2023, at 2:41 AM, g4-lisz@tonarchiv.ch wrote:
I'm trying to accomplish the following (pseudo code):
In rlm_rest module config:
authenticate { body = "json" data = '{ "token" : "xxxxxxx", "states": [ "x", "y" ], "resourceIds: PSEUDO_CODE>> IF(%{control:Cust-Resource-Uuid}, [ "%{control:Cust-Resource-Uuid}" ], null) <<PSEUDO_CODE , }' }
I.e. when the custom attribute is set, the JSON's "resourcesIds" property should be an array containing the attribute's string content, otherwise "null".
Just do the "if" before running the REST module. Put the results into an attribute, and then use that attribute in the rest module configuration. Alan DeKok.