Problem

Versa Director Rest API throws the No JSON object could not be decoded error


Solution: 

You get this error because the curl script has not instructed to accept JSON data. 


To resolve this, add another header -H "Accept: application/json" to your GET query.

Without this Accept header, the resultant output will be in XML format.