I'm working with vShield 5.1 and in the P187 of <<vShield API Programming Guide>>,"Change SpoofGuard IP Settings",It says that "If the action is publish then no message body is required".So I use the URL"POST https://<vsm-ip>/api/2.0/services/spoofguard/<contextID>?action = publish" ,and the post data is null. But i got a HTTP 500 error,and the error detail is "input contained no data". How to figure out this problem?
You also need to update the <contextID> in the POST e.g: datacenter-id or portgroup-id
ContextId are the mo-refIds of objects i.e. datacenter, portgroup or virtualwire.
You can use vCenter Manager Object Browser ( MOB ) to get mo-refIds for datacenter and portgroups
An XML representation of VnicIdList is expected in the message body for delete and approve actions.
If the action is publish then no message body is required. If the action is saveApproved then an XML representation of VnicInfo is expected
For us, we want to approve the IP change via API. We found the datacenter ID via MOB, and could got the list of the IP changes by GET https://vsmURL/api/2.0/services/spoofguard/datacenter-21?list=PUBLISHED, however, we got error when we tried to approve the IP change by POST https://vsmURL/api/2.0/services/spoofguard/datacenter-21?action=approve, we are not sure what's the header for this action, and also the "messaged body" that mentioned in the Page 185 ( "An XML representation of VnicIdList is expected in the message body for delete and approve actions.") . could someone give us a example?