Problem updating variables through the REST API

Hello

I am testing the REST API, as described in the tutorial “How to Use Camunda’s Rest API (Video 4)”
I am using Camunda RUN 7.15
I have the following problems:

  1. I cannot upload a process diagram through REST API
    No matter what keys are specified, I always get this error
    (I do not specify Content-Type header)

so at the end I had to upload the diagram through the Modeler

  1. I was able to start the process using the REST API.
    However, when I try to complete the task while setting the variables I get this error:


    It seems that it tries to complete the task ignoring the variable, which I am sending

  2. as step 2 did not work, I also tried to set the variable teamName using processInstance API:

No error in the response, however the variable is set as Null:

if I set the variable teamName through the Cockpit, I can complete the task using the REST API (without sending variable value in the body)

Any idea what am I doing wrong?

Thanks in advance

Hi @jaxx,

Nothing in the screenshots you provided is jumping out as “wrong”. I was able to loosely follow these steps with my own example and didn’t run into any issues. It may help if you include the following:

  • Provide the log output from Camunda Run (this should indicate where the NullPointerException is coming from on your failed deploy)
  • Attach your BPMN file to this thread
  • Use the “code” button in Postman to generate a few cURL snippets of the requests you’re making. Might help us spot an issue in the requests themselves.

Hello
It seems that I have turned off the Postman auto-generated header “Content-Length” and this was causing the problem.
When I turned it back on, the problems resolved.

Thank you for your support

1 Like