I’m trying to use the new Kobotools API to create a new form. I’ve tried 2 things, and both times my POST request has been redirected with a 301 response (and have turned into GET requests…). Here is what I tried:
https://kf.kobotoolbox.org/api/v2/assets/, using a payload matching the one described in the draft documentation.
Both times, my requests return the response I would expect from a GET request to those urls. I’m testing in both Postman and with Guzzle / Php. Below is the output from the “debug” mode of Guzzle, which suggests my requests are being 301 - redirected into GETs.
In option 1 (https://kf.kobotoolbox.org/imports), I had requests working fine a few months ago. These same requests today have given me this issue, so I assume something has changed on the API side…
Is this a bug in a recent build of the API? Am I doing something wrong? I know the Kobo API is still in development, but the old V1 API only works properly with the legacy interface, so I’m keen not to have to go backwards in order to get our form uploading to work…
Any insights are appreciated - also please let me know if this is just a temporary issue and I should just wait for a few days to carry on development!