Hi, I am trying to create an IP address via a payload to whitelist it, as I am developing an API. I have a C# app that I created, and I’m receiving the same message as the one below when I use cURL. I was using this as a test to see if I can create the IP address. I’m wondering if anyone is doing something similar, as I don’t want to keep logging in to Atlas to create the IP address each time. Does anyone know why I am getting the error below?
curl --user “user:password” --digest --include
–header “Accept: application/json”
–header “Content-Type: application/json”
–request POST
–data ‘{
“ipAddress”: “192.168.0.22”,
“comment”: “test by terry”
}’
https://cloud.mongodb.com/api/atlas/v1.0/groups/groupid/accessList
I get this error any ideas
{“detail”:“Received JSON does not match expected format.”,“error”:400,“errorCode”:“INVALID_JSON”,“parameters”:,“rason”:“Bad Request”}