When I use Python to try and post a schedule to FME Server using the v3 api, it always creates a Unhandled Exception on the server-side. I can view the exception in the Catalina log. I'm unsure why, but it thinks the payload isn't JSON even though it is. Has anyone been able to successfully post a schedule to the schedule endpoint using Python or other language and can post an example? I must be doing something wrong, but cannot tell.
The JSON is:
params = {"begin":"2022-08-08T01:00:00", "name":"test", "description":"test", "skipUntilJobComplete":True, "enabled": True, "interval":2, "recurrence":"interval", "repository":"TEST", "workspace":"test.fmw", "unit":"MINUTE", "category":"Utilities"}
which is posted like this in Python:
serviceresponse = requests.post(jobSubmitUrl,json=params,headers=jobHeader)
The error is: b'{"message":"An unhandled exception has occurred due to some unexpectedly omitted information, consult the web service logs for further details"}' In the Catalina log, I find it says that it can't parse the JSON.
The header works fine and is used elsewhere with no issue, so I'm certain that isn't the problem.
Any ideas would be appreciated.