![]() |
![]() |
Subject: | Not able to delete device using Curl/Json API |
Author: | [Not Specified] |
Posted: | 2015-03-27 07:01 |
I have installed Zenoss and when I am trying to delete device, I am getting below error.
Would appretiate if you guys can help me with that.
Adding device is working fine, but deleting device throwing errors.
curl -u "admin:xxxxxx" -X POST -H "Content-Type:application/json" -d "{\"action\":\"DeviceRouter\", \"method\":\"getDevices\", \"data\":[{\"uid\":\"/zport/dmd/Devices/Server/JBoss/devices/server.example.com\"}], \"type\":\"rpc\", \"tid\":1}" "zenoss.example.com:8080/zport/dmd/device_router"
and then use this within a subsequent removeDevices call
curl -u "admin:xxxxxx" -X POST -H "Content-Type:application/json" -d "{\"action\":\"DeviceRouter\", \"method\":\"removeDevices\", \"data\":[{\"uids\":\"/zport/dmd/Devices/Server/JBoss/devices/ server.example.com \", \"hashcheck\":\"1\", \"action\":\"remove\", \"deleteEvents\":\"true\", \"deletePerf\":\"true\"}], \"type\":\"rpc\", \"tid\":1}" " zenoss.example.com:8080/zport/dmd/device_router"
However, I get an AssertionError on the removeDevices call:
{"uuid": "dcbd97be-861b-4c3c-a9de-f8a6689b7596", "action": "DeviceRouter", "result": {"msg": "Failed to remove devices.: AssertionError: ", "type": "exception", "success": false}, "tid": 1, "type": "rpc", "method": "removeDevices"}
Subject: | RE: Not able to delete device using Curl/Json API |
Author: | Josh Zenker |
Posted: | 2019-06-17 15:06 |
curl -u "admin:xxxxxx" -X POST -H "Content-Type:application/json" -d "{\"action\":\"DeviceRouter\", \"method\":\"removeDevices\", \"data\":[{\"uids\":\"/zport/dmd/Devices/Server/JBoss/devices/ server.example.com \", \"hashcheck\":\"1\", \"action\":\"delete\", \"deleteEvents\":\"true\", \"deletePerf\":\"true\"}], \"type\":\"rpc\", \"tid\":1}" " zenoss.example.com:8080/zport/dmd/device_router"
< |
Previous Was unable to start service |
Next Zenoss 5 Core - can't install QUILT |
> |