Empty Operate REST answer

I run Camunda 8.7.3 self-hosted using docker compose_core-file. I have deployed a process and started it with no problem.

My problem occur when I try to get a proper answer from the /process-definitions endpoint. I run the command curl -X GET "http://localhost:8081/v1/process-definitions" but only get the response {"message":""}. No process definition or no error. What am I missing here? I have tried to spar with ChatGPT in order to solve this, but with no luck.

Hi @Bjorn_S - are you trying to search for definitions or fetch and individual definition? For the former, you need to use the /v1/process-definitions/search endpoint with a body; for the latter, you need to provide the process definition key as the final parameter in the URL: /v1/process-definitions/:key, example: /v1/process-definitions/12837462719.

Hi!

I have tried that with same result.

curl -X POST "http://localhost:8081/v1/process-definitions/search" `
     -H "Content-Type: application/json" `
     -d '{
           "filter": {},
           "size": 100,
           "from": 0
         }'

Same with specific instance:

PS J:\My Documents\Docker\Camunda8> curl -X GET "http://localhost:8081/v1/process-definitions/2251799813691816"
{"message":""}

Hi @Bjorn_S, please add -v to your curl runs to get the verbose log output. I suppose you get in both cases the HTTP/1.1 401 code as logged here:

If so you have to authenticate as described here for the case without token (with cookie): Authentication | Camunda 8 Docs

$ curl -vX POST 'http://localhost:8080/api/login?username=demo&password=demo' --cookie-jar cookie.txt

and

$ curl -v 'http://localhost:8080/v1/process-definitions/search' --cookie cookie.txt --header 'Content-Type: application/json' -d '{ "size": 100 }'

2 Likes

Thanks, that did it!

I read about cookie somwhere, but didn’t find how to create it until now.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.