Posting Json object over REST API

Hi!

  1. I’m posting over REST API json data into Camunda from my external app.
    Data is:
    {“variables”:{“myForm”:{“value”:"{“myDecision”:“filevalidated”}",“type”:“Json”}}

  2. Next Camunda executes ConditionExpression which works fine

  3. Next i’m checking variable value in Camunda Cockpit, data is correct and visible

  4. Now i’m trying to retrieve variable data from external app. But the content doesn’t include expected data:
    “myForm”: {
    “type”: “Json”,
    “value”: {
    “nodeType”: “OBJECT”,
    “value”: false,
    “number”: false,
    “dataFormatName”: “application/json”,
    “object”: true,
    “boolean”: false,
    “string”: false,
    “array”: false,
    “null”: false
    },
    “valueInfo”: {}
    }

How i could get the variable data what was posted?
Thanks!

Hi @Erki_Kriks,

What do you get as a response?

Just a shot in the dark: When you try to retrieve data from an external app, you probably need to authenticate yourself (if authentication is not disabled). Maybe that’s the problem.

Best,
Johannes

If i change the variable type from “Json” to “String” - i can retrieve data successfully but string is not understandable for condition in BPMN. Authentication is not the problem.

You can get the values by deserialization.See Following is example.for camunda 7.2
http://localhost:{portnumber}/engine-rest/task/{taskId}/form-variables?deserializeValues=false

Thank you! This works!
I can get the json content.