When trying to add a device via the api I get the following:
lum@centos-dev ~]# curl -X POST -d '{"hostname":"10.x.x.x",“version”:“v3”,“authlevel”:“authPriv",“authname”:“monitoring",“authpass”:“xxxxxxxx","authalgo":"AES","cryptopass":"xxxxxxxx","crypto
algo":"SHA"}' -H 'X-Auth-Token: e7b6f9c7e19cdfb06495e387xxxxxxx' 'https://nms.mydomain.com/api/v0/devices'
{
"status": "error",
"message": "No information has been provided to add this new device"
}
Did you copy/paste from something that auto formats? Some of your double quote marks look like pretty quotes (see around version, v3, etc.).
# curl -X POST -d '{"hostname":"10.0.0.1",“version”:“v3”,“authlevel”:“authPriv",“authname”:“monitoring",“authpass”:“xxxxxxxx","authalgo":"AES","cryptopass":"xxxxxxxx","cryptoalgo":"SHA"}' -H 'X-Auth-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' http://nacho/api/v0/devices
{
"status": "error",
"message": "No information has been provided to add this new device"
}
# curl -X POST -d '{"hostname":"10.0.0.1","version":"v3","authlevel":"authPriv","authname":"monitoring","authpass":"xxxxxxxx","authalgo":"AES","cryptopass":"xxxxxxxx","cryptoalgo":"SHA"}' -H 'X-Auth-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' http://nacho/api/v0/devices
{
"status": "error",
"message": "Could not ping 10.0.0.1"
}