Camunda 8 Rest API Not found problem

Hi, I just installed camunda 8 using docker compose.

I set up the access token in keycloak and used postman to query http://localhost:8088/v2/topology and it worked. However, when I try any other endpoint I always get an error like this:

{
    "timestamp": "2024-10-21T11:24:24.693+00:00",
    "status": 404,
    "error": "Not Found",
    "path": "/v2/process-instances/search"
}

I made sure to include the proper headers for content type and to supply the proper body for the request but no matter what endpoint or what request I send it is always not found.

The token is being used as a Bearer Token and I’m sure of the expiry date of the token, the docker container is working and all the portals are accessible from the browser.

What could be the problem?

Hi @nabilalli
What if you try v1/process-instances/search? Basically, v1 instead of v2?

Regards,
Alex

Hi @Alex_Voloshyn
Thanks for your reply.

Same thing happens for both v1 and v2.

Hi @nabilalli
can you share the docker-compose file you used and the startup command?

Regards,
Alex

The same one here:

without any modifications.

I should say though, aside from the example endpoints in my question, this one seems to work as well:

http://localhost:8088/v2/process-instances

and it returns this response:

{
    "processDefinitionKey": 2251799813739785,
    "processDefinitionId": "Test_Process",
    "processDefinitionVersion": 3,
    "processInstanceKey": 2251799813747477,
    "tenantId": "<default>",
    "variables": {}
}

All the other endpoints whether they require input or not are returning 404.

Ok, so it sounds like at least two API calls work for you.
Could you give an example of some calls that do not work?

Well for instance querying this endpoint http://localhost:8088/v2/process-instances/search should work given that the first query to create the instance worked, I tried with and without filters in the body as per the docs here: Query process instances (alpha) | Camunda 8 Docs

But I’m still getting a 404… v2/user-tasks/search does the same thing.

Could you please share a screenshot of Postman with this failed call?

Yeah sure,

I think this is Postman misconfiguration, give it a try from the command line using curl. In my case, Operate port is 8081 and it works:

curl -L -X POST 'http://localhost:8081/v1/process-instances/search' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token value>' \
--data-raw '{
  "filter": {
    "state": "ACTIVE"
  }
}'

Exclude Postman as a tool from this issue.

Unfortunately, the problem remains the same even when using curl, I did change the port and add my token to your example, I tried v1 and v2 and I also changed the filter a few times to see if that would make any difference, I removed all pruned docker and started fresh without any luck… it always returns a 404.

You mentioned that you’re using docker-compose file without any modifications.
According to the docker-compose file, Operate port is 8081 and you’re trying to use Operate API, so why you’re using port 8088 configured for zeebe instead of 8081?

1 Like

Hi @nabilalli - this may be a configuration issue, because the default configuration has Identity disabled. I’m doing some testing with Docker Compose so I’ll test out your configuration and report back!

(@Alex_Voloshyn - 8088 should be the correct port, that is the new unified REST API that is exposed with 8.6!)

2 Likes

@nathan.loding Any luck figuring out what the issue is?

Hi

Not sure if this is your issue, but in the docs there is reference to the alpha query apis are not enabled by default

There is a config setting…

Camunda.rest.query.enabled needs to be set to true…

Regards

Rib

Thank you @Webcyberrob enabling the alpha queries, solved the not found problem for me.

1 Like

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