REST API and DeviceType PB
Hi,
I'm actually working with the REST API of OPmanager. My goal is to add new device(s) monitoring in my probes each time a new server is deployed. This task need to be done without any human interaction. So i've done some curl command to HTTP POST the data to the server. I need to add devices and to affect them a template, i think this is via the devicetype input. But for now there is two things that disturb me:
First: The input field "deviceType" in the POST don't seem to be apply correctly, the device was added but in the "unknown" category. For example, i set the "deviceType" input to "Windows 2008 R2" but without any results.
Second: my curl command was ok with probe in version 9450 but the same command return me the error 5127 with the version 9400 (each probe have the same settings, just software version change)
Is the REST API have some weakness or some limitation ?
This my curl command:
curl -d "deviceName=x.x.x.x&netmask=x.x.x.x&credentialName=xxx&deviceType=xxx&displayName=xxx" http://localhost:8060/api/xml/discovery/addDevice?apiKey=myAPIkey
Thank you for your help.
New to ADSelfService Plus?