Ask the Community
Groups
Traverse Web Service API for using Network Discovery - Connect IT Community | Kaseya
<main> <article class="userContent"> <p><strong>QUESTION:</strong></p> <p>Provided web services API examples of using Network Discovery</p> <p> </p> <p><strong>RESOLUTION:</strong></p> <p> </p> <p><strong>Create Discovery</strong></p> <pre class="code codeBlock" spellcheck="false" tabindex="0">curl -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{<br> "username":"superuser",<br> "password":"traverse",<br> "accountSerialNumber":795662,<br>"interval":"","intervalUnit":null,"name":"API-discovery",<br>"scope":"10.20.80.76/255.255.255.255",<br>"locationName":"Default Location",<br>"emailAddress":"",<br>"snmpSharedConfigs":[1486106],<br>"vmwareSharedConfigs":[],<br>"includeDeviceTypes":true,<br>"deviceTypes":[],<br>"discoverTopology":true,<br>"updateKnownDevicesTopologyOnly":false,<br>"useSeedRouter":false,"seedRouterIp":"","maxHops":0,<br>"runOnce":true,"autoProvision":false<br>}' <a href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Flocalhost%2Fapi%2Fjson%2Fdiscovery%2FscheduleDiscovery">http://localhost/api/json/discovery/scheduleDiscovery</a></pre> <p> </p> <p><strong>List Discovery</strong></p> <p> </p> <pre class="code codeBlock" spellcheck="false" tabindex="0">curl -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{<br> "username":"superuser",<br> "password":"traverse",<br> "searchCriterias":[],<br>"sorting":{"sortDirection":"ASC","sortField":"sessionName"},<br>"paging":{"page":0,"limit":50}}' <a href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Flocalhost%2Fapi%2Fjson%2Fdiscovery%2FgetSessions">http://localhost/api/json/discovery/getSessions</a></pre> <p> </p> <p> </p> <p><strong>Update Discovery</strong></p> <pre class="code codeBlock" spellcheck="false" tabindex="0">curl -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{<br> "username":"superuser",<br> "password":"traverse",<br> "serialNumber":1570258,"interval":"0","intervalUnit":null,"name":"RestAPI-discovery","scope":"10.20.80.74/255.255.255.255","locationName":"Default Location","emailAddress":null,"accountSerialNumber":795662,"includeDeviceTypes":false,"deviceTypes":[],"snmpSharedConfigs":[],"vmwareSharedConfigs":[],"discoverTopology":true,"updateKnownDevicesTopologyOnly":false,"useSeedRouter":false,"seedRouterIp":"","maxHops":1,"runOnce":true,"autoProvision":true<br>}' <a href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Flocalhost%2Fapi%2Fjson%2Fdiscovery%2FupdateDiscovery">http://localhost/api/json/discovery/updateDiscovery</a></pre> <p> </p> <p><strong>Note: </strong>To create/update Discovery with SNMP/VMware credential, the serial number is required.</p> <p><strong>To list Shared credential</strong></p> <pre class="code codeBlock" spellcheck="false" tabindex="0">curl -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{<br> "username":"superuser",<br> "password":"traverse",<br> "showPassword":"false"<br>}' <a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Flocalhost%2Fapi%2Fjson%2Fadmin%2FmonitorConfig%2Flist">https://localhost/api/json/admin/monitorConfig/list</a></pre> <p><br><br></p> <p> </p> <p><strong>APPLIES TO:</strong></p> <p>All versions of Traverse</p> </article> </main>