Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 176483

does vShield REST API support JSON?

$
0
0

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


Viewing all articles
Browse latest Browse all 176483

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>