Create a case instance via REST API

I’m trying to create a new case instance through this endpoint: POST /cmmn-runtime/case-instances

This is my request body:

{
  "caseDefinitionKey": "oneTaskCase",
  "startFormVariables": [
    {
      "name": "myVariable",
      "value": "test",
    }
  ]
}

Flowable doesn’t create a new case instance but just lists all the existing case instances.
Is this endpoint really the right one to create new case instances?

Hey @eztam,
can you please verify that you are actually sending the POST request? From you description, it seems you are executing the GET request.

I’m sending a POST request!

Hey @eztam,
can you please check the url you are using?
From what you describe, using a POST request, but getting all case instances as a response, it indicates you are calling the case instance query endpoint.

Can you please check that you are using the proper endpoint?

Greetings

Christopher

1 Like

Thanks Christopher, you are genius, that was indeed the issue :grinning: