Ask the Community
Groups
How to use Traverse test/getStatuses Web Service endpoint - Connect IT Community | Kaseya
<main> <article class="userContent"> <p><strong>QUESTION:</strong></p> <p>How to use Traverse test/getStatuses Web Service endpoint?</p> <p> </p> <p><strong>RESOLUTION:</strong></p> <p>The Traverse test/getStatuses Web Service endpoint provides the status and other details for the tests specified. It may also be used to provide a list of tests that meet certain criteria.</p> <p>For example, to list all tests with no Action Profile simply search for tests with an action profile serial number of '-1' by submitting the following request to the Web Service endpoint;</p> <p><code class="code codeInline" spellcheck="false" tabindex="0">curl -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @c:\post.txt http://traverse_server/api/json/test/getStatuses </code></p> <p>where the content of 'c:\post.txt' contains the request:</p> <p><code class="code codeInline" spellcheck="false" tabindex="0"><br>{"username":"superuser","password":"secret",<br> "searchCriterias":[{"searchOption":"ACTION_PROFILE_SERIAL_NUMBER","searchTerms":"-1"}]<br>}<br><br></code></p> <p>The output should be similar to this:</p> <p><code class="code codeInline" spellcheck="false" tabindex="0"><br> {<br> "suspended": false,<br> "testScheduleName": "Default Schedule",<br> "testScheduleSerialNumber": 440102,<br> "testInterval": 180,<br> "testType": "ping",<br> "departmentSerialNumber": 440093,<br> "departmentName": "Kaseya LLC",<br> "deviceSerialNumber": 890009,<br> "deviceName": "windows client 2",<br> "testSerialNumber": 890014,<br> "testName": "Packet Loss",<br> "testStatus": 134217728,<br> "testResult": 100,<br> "testResultStr": "100 %",<br> "units": "%",<br> "timestamp": 1490378320027,<br> "timestampStr": "10:58 AM",<br> "isStale": false,<br> "isNew": false,<br> "testDetailUrl": "/html5/TestDetails/launch.jsp?deviceSerialNumber=890009&testSerialNumber=890014&departmentName=Kaseya LLC",<br> "testUpdateUrl": "/common/updateTest.jsp?testId=890014&deviceId=890009&accountId=440093&accountName_=Kaseya+LLC&noNav",<br> "category": "network",<br> "duration": 41118085590,<br> "durationStr": "475 days 21:41",<br> "warningThreshold": "60",<br> "criticalThreshold": "100",<br> "thresholdType": "SEVERITY_ASCENDS",<br> "deviceDetailUrl": "/html5/DeviceDetails/launch.jsp?deviceSerialNumber=890009&departmentName=Kaseya LLC",<br> "deviceUpdateUrl": "/common/updateTargetDevice.jsp?deviceId=890009",<br> "suppressed": false,<br> "monitorInstance": "ping"<br> },<br><br></code></p> <p>In Traverse 9.4 and later, you may also limit the fields included in the output. For example, the request;</p> <p><code class="code codeInline" spellcheck="false" tabindex="0"><br>{"username":"superuser","password":"secret",<br> "searchCriterias":[{"searchOption":"ACTION_PROFILE_SERIAL_NUMBER","searchTerms":"-1"}],<br> "fieldsRequested":["ACTION_PROFILE_NAME","DEPARTMENT_NAME","DEVICE_NAME"]<br>}</code><br><br>will show these fields for each test (note Test Name is also included);</p> <p><code class="code codeInline" spellcheck="false" tabindex="0"><br> {<br> "departmentName": "ACME Inc",<br> "deviceName": "Traverse Server",<br> "testSerialNumber": 970006,<br> "testName": "Work Units Processed (WmiMonitor)"<br> }<br><br></code></p> <p><code class="code codeInline" spellcheck="false" tabindex="0"></code></p> <p><strong>APPLIES TO:</strong></p> <p><code></code></p> <p>All versions of Traverse</p> <p><code class="code codeInline" spellcheck="false" tabindex="0"></code></p> <p><code></code></p> </article> </main>