Hi,
I was trying out vShield REST API. Does it support JSON content-type? All examples I see is using xml. I am able to get contents in JSON. But when I try to create/update it gives me error.
This gives me the response in JSON format:
curl -k -u <user>:<pass> -H "Accept:application/json" https://<ip>/api/2.0/services/ipset/ipset-150
But if I try:
curl -k -u <user>:<pass> -X POST -H "Accept:application/json" -H "Content-Type:application/json" -d "{'description':'test ipset', 'name':'ipset-test-1', 'value':'22.22.22.1', 'revision':0}" https://<ip>/api/2.0/services/ipset/dvportgroup-1265
I get the following error:
HTTP Status 400 - The request sent by the client was syntactically incorrect ().
Please help me with this.
Regards,
Litty