Hi guys, is there a more complete example for using API to create an experiment? It only returns 400 giving me a list of required arguments (all of which I’ve included in payload) with no logs in growthbook side. Maybe I can enable some verbose logging to know what’s missing/wrong?
clever-application-21193
07/08/2024, 7:24 AM
In case others meet same issue. The APIs requires content-type header to be set to application/json even though the curl request samples in API docs do not have it specified think panic
r
rhythmic-agent-34208
07/09/2024, 6:44 PM
Hi Jesper, thanks for letting us know about this. I'll make sure we update the documentation accordingly. Sorry for the trouble!
🙏 1
c
clever-application-21193
07/10/2024, 12:38 PM
It would be nice if the endpoints could return a message regarding wrong/missing content type instead of payload validation error. My guess is that since content type was wrong it instead silently treated it as an empty payload
r
rhythmic-agent-34208
07/10/2024, 4:17 PM
I'm always in favor of better warnings / errors. Thank you for drawing this to our attention!