400 Bad request on api call
Hi,
we have encountered a strange issue on api calls. The same configuration works on one and on another we get Bad request 400 error.
Api calls are:
curl -X POST -H "Content-Type: application/json" -H "X-API-Key:
curl -X POST -H "Content-Type: application/json" -H "X-API-Key:
On the one that is not working i have tried many different key's and i get always the same 400.
I put the /api/app/run_job/v1 in the browser of the one that its not working and i get correct response: {"code":1,"description":"Unsupported API: app/api_run_job"}
Any suggestions are much appreciated.
Is your host "ip2" a primary or backup server? You can start jobs only on the primary system.
Both are in same configuration. The api call is from worker that sends the request to the master (primary) server.
Check the Cronicle logs, especially the WebServer.log. It should have more information on why it is sending back a HTTP 400.
This is log output:
1681889738.394][2023-04-19 02:35:38][
is this an issue with the id?
run config: cat run.json { "id": "elgnfacue07" }
and the same id is in the cronicle portal.
I don't know what to tell you, @streightedge. It works fine for me:
jhuckaby@joework temp $ cat run.json
{
"id": "eilhcggvv01"
}
jhuckaby@joework temp $
jhuckaby@joework temp $ curl -X POST -H "Content-Type: application/json" -H "X-API-Key: b5df700456c0cb60c9ef07f867d35624"
-d @run.json http://cronicle.dev.myserver.com:3012/api/app/run_event/v1
{"code":0,"ids":["jlgqresw105"]}
jhuckaby@joework temp $
That successfully launched my job.
