I’m looking to test the “Create Process Instance” REST endpoint on our SaaS 8.6 cluster.
We can successfully get our token and seem to be sending the appropriate details to the endpoint but are getting back a path not found
response.
Here’s our test curl:
#connect to auth server and get token into a variable
TOKEN=$(curl --request POST ${ZEEBE_AUTHORIZATION_SERVER_URL} \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode "audience=${ZEEBE_TOKEN_AUDIENCE}" \
--data-urlencode "client_id=${ZEEBE_CLIENT_ID}" \
--data-urlencode "client_secret=${ZEEBE_CLIENT_SECRET}" \
| python3 -c "import sys, json; print(json.load(sys.stdin)['access_token'])")
START_PROCESS_INSTANCE_URL="${ZEEBE_REST_ADDRESS}/v2/process-instances"
#connect to zeebe_rest_address
curl -L ${START_PROCESS_INSTANCE_URL} \
-H "Authorization: Bearer ${TOKEN}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-vvv \
--data-raw '{
"processDefinitionKey": 0,
"bpmnProcessId": "XXX",
"version": -1,
"variables": {
{"X":"X"}
},
"tenantId": null,
"operationReference": 0,
"startInstructions": [],
"awaitCompletion": true,
"requestTimeout": 0
}'
Response from server:
{"timestamp":"2024-09-27T15:56:57.874+00:00","status":404,"error":"Not Found","path":"/$ourclusterid/v2/process-instances"}
If I try just hitting the raw ZEEBE_REST_ADDRESS, the error is similar:
{"timestamp":"2024-09-27T15:37:19.692+00:00","status":404,"error":"Not Found","path":"/$ourclusterid/"}
Is this API active and functioning as documented? Create process instance | Camunda 8 Docs