It was on a previous post, which I now cannot find as it appears to have been deleted:
https://communities.ca.com/web/ca-ehealth-and-ca-spectrum-global-user-community/message-board/-/message_boards/message/101864509%3bjsessionid=8EDFC1330665A0AAA3E7BDB7529C23A0?p_p_auth=iTsBY7lR&%20#p_19
The discovery portion was the second part of what we are doing: we insert the device and then do a discovery on the device in the container.
Here is the full set of what we are doing:
Get landscapes:
GET /restful/landscapes
Add model:
POST /restful/modelipaddress={ipAddress}
&landscapeid={landscapeHandle}
&commstring={communityString}
&parentmh={parentModelHandle}
&attr=0x12bfd&val={marketOwner}
&attr=0x12bff&val={officeNumber}
&attr=0x12bfb&val={environment}
&attr=0x12d7f&val={ipAddress}
&attr=0x12c03&val={applicationName}
&attr=0x12c02&val={assetContractEndDate}
&attr=0x12c01&val={assetContractStartDate}
Trigger discovery:
GET /restful/action/0x25e0022?mh={modelHandle}
So the url I mention alone won't do anything for discovery unless you have the model created first.
We also have automated deletes w/ web services:
Get model handle:
POST /restful/models
With XML content:
<?xml version="1.0" encoding="UTF-8"?>'
<rs:model-request throttlesize="50"
xmlns:rs="http://www.ca.com/spectrum/restful/schema/request"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../../xsd/Request.xsd ">
<rs:target-models>
<rs:models-search>
<rs:search-criteria
xmlns="http://www.ca.com/spectrum/restful/schema/filter">
<devices-only-search />
<filtered-models>
<equals>
<ip-address> {IP Address} </ip-address>
</equals>
</filtered-models>
</rs:search-criteria>
</rs:models-search>
</rs:target-models>
<rs:requested-attribute id="0x1006e" />
<rs:requested-attribute id="0x10000" />
<rs:requested-attribute id="0x1295d" />
</rs:model-request>
Delete model:
DELETE /restful/model/{handle}