Time to upgrade! You only have until October 31, 2019 to move to Dynatrace, our all-in-one software intelligence platform. For details, see the Synthetic Upgrade Center and Dynatrace Synthetic documentation.

Get a complete definition of a test by monitor ID (GetTests)

For this use case, you may have just created a new test or be preparing to update a particular test and wants to see a complete snapshot of that test within the provisioning system. The GetTests() method can be used to return only that single test. To do this, supply a MonitorFilter as a parameter to the GetTests() method. That MonitorFilter will, in this case, include only the test's monitorId. If such a MonitorFilter is supplied, the GetTests() returns only the Monitor element for that test or no results, if there is no matching monitorId within the system. The following GetTests query returns only a test matching the given monitorId if such a test exists:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:GetTestsRequest>
         <prov:Credentials>
            <prov:UserName>MyUser</prov:UserName>
            <prov:Password>MyPassword</prov:Password>
         </prov:Credentials>
	<prov:MonitorFilter>
		<prov:MonitorId>263756</prov:MonitorId>
	</prov:MonitorFilter>
      </prov:GetTestsRequest>
   </soapenv:Body>
</soapenv:Envelope>

If no test exists matching that MonitorId in the account, the query returns an empty result set.

You can only supply a single MonitorId in a MonitorFilter. The test management API does not support the passing of a list of MonitorIds.