I’m exactly in the same scenario, any help will be greatly appreciated, stuck on this for almost two days
I have constructed a custom nested json {{query_usersignals}} which I send as input data for my POST api call. Format was suggested by @George in @nevil’s thread here - Send nested JSON with server-side API. This whole json is constructed at server side only (not fetched through client POST) and my elastic search api needs needs this nested json (query DSL).
This is my nested json object {{query_usersignals}}. The below whole structure is further enclosed within {{ }} as suggested by George in the other thread.
{
"bool": {
"must": [
{
"match": {
"userID": "qatest"
}
}
]
}
}
I’m so glad to get this work. I can see the api query returning data for this userID “qatest” (hard-coded) in my browser. I expanded the results and verified that the above input data filter did work, so pretty good outcome so far.
Now, where I’m unable to progress anymore is when I wanted to pass the userID variable {{username}} in the above nested json. I did open the server action in the editor and tried replacing the hard-coded value (\“qatest\”) with the {{username}} variable. Tried various variants, removing quotes, etc, but always hitting a format error and I end up breaking this server action.
Too sleep deprived, would be great if the community can help. @Teodor @patrick @mebeingken