RESTful POST /migration/generate catches http 405

Hi there, I wanted to generate a migration plan with the REST API. So I issued a POST request with these parameters:

{
  "sourceProcessDefinitionId": "Process_PreparePower:2:f335a82b-edd8-11ea-aad3-005056aa6a97",
  "targetProcessDefinitionId": "Process_PreparePower:4:e538f9e2-f19c-11ea-aa96-005056aa6a97",
  "updateEventTriggers": true
}

the URL was

http://path/to/application/on/server/rest/engine/default/migration/generate

I used basic authorization with a user id that belongs to the group camunda-admin. Though, I very quickly caught a http 405 Method not allowed. What did I miss?

Why are you using that end point?
if you have the rest api deployed you should be using
localhost:8080/engine/rest/migration/generate

Hi Niall, the process is running on a server, and I’m not allowed to install a thing like Postman on a server. That’s why I used the mentioned URL. And to obtain for example the number of incidents, the URL

http://path/to/application/on/server/rest/engine/default/incident/count

just works fine.

Is migration only part of EE edition? From the camunda docs, I had thought that it was their visualisation in the cockpit. But http 405 made me suspicious.

Have no fear - the API which lets you do migration is very much part of both editions.

The API you’re using is sending a GET put you need to use a POST call for the migration generate.

I had used POST: image

It looks like you’re using the internal rest api, used by the webapps so it has additional security.
Use the engine point i suggested above

../engine-rest/migration/generate

Hi Niall, sorry for that: when I append /engine-rest/migration/generate directly after the URLs context path, I get an http 404. I’m using the camunda app as a standalone spring boot behind an apache that maps the context paths.

No problem, just to make sure - have you added the rest API to the pom file?


    <dependency>
      <groupId>org.camunda.bpm.springboot</groupId>
      <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
      <version>7.13.0</version>
    </dependency>

If I hadn’t, the GET for the number of incidents wouldn’t have worked (see my 1st posting). But it did perfectly. Since the application is a little bit older, I’m still using 7.12 . But I hope that this is not the reason.

Nope that version has migration.
The incident count call would have worked against the internal rest api so i just wanted to check.