I saw recently that the API for “Create Sync” was recently added. I’ve been waiting for this functionality as we rapidly create and delete environments weekly and being able to automate turning on the sync would eliminate the last manual step we have in the process. However, when I try use the documentation page to test out this feature with valid data, I get a return object like below. I’ve also tried in Postman with no luck. Any help is appreciated!
"Data must be an object"
"message": "Data must be an object"
Welcome to the Doppler Community!
Would you mind sharing the actual request you’re sending (feel free to redact any actual IDs or sensitive information)? Without that it’ll be hard to help diagnose what’s going wrong here for you!
Sure! Here’s a screencap of the fields I inputted as well as what the example is showing for a request
curl --request POST \
--url 'https://api.doppler.com/v3/configs/config/syncs?project=sm-portal&config=local' \
--header 'accept: application/json' \
--header 'authorization: Bearer [REDACTED]' \
--header 'content-type: application/json' \
Hey @watsonian! Any ideas on the above? Thanks!
Sorry, I totally missed your earlier reply. I think I see what the issue is. You’re not including the required
data entry in the payload. Your payload is:
when it should be:
Could you give that a shot and let me know how it goes?
Sure! I’ll try that through Postman! Just a heads up that the docs on the website don’t allow you to edit the data block at all or include that those pieces are needed.