Every browser test, be it a single step monitor or a multistep monitor, may be assigned a folder. Populate the folder field with a folder name, and the test is provisioned under a group bearing the name you supplied in the folder field. If the group does not exist, it is created. If the group already exists, it is used for the provisioning request.
The following ProvisionTests request creates a test named
Test in Folder under a folder called
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning"> <soapenv:Header/> <soapenv:Body> <prov:ProvisionTestsRequest> <prov:Credentials> <prov:UserName>MyUser</prov:UserName> <prov:Password>MyPassword</prov:Password> </prov:Credentials> <prov:SingleStepMonitors> <prov:SingleStepMonitor name="Test in Folder" folder="Folder" agentType="IE" autoDelete="true" summaryFlag="Off" includeRenderTimeFlag="Off" frequencyInMins="60" expirationDate="2012-08-15T00:00:00" ipVersion="IPv4_only" monitorStatus="Active" folderStatus="Active"> <prov:MonitorSites> <prov:MonitorSite siteId="777"/> <prov:MonitorSite siteId="865" siteName="TPNPEKSA12 - Beijing China test" city="Beijing" state="" countryCode="CN" ipV6Enabled="false"/> </prov:MonitorSites> <prov:URL>http://www.dynatrace.com</prov:URL> </prov:SingleStepMonitor> </prov:SingleStepMonitors> </prov:ProvisionTestsRequest> </soapenv:Body> </soapenv:Envelope>
In this example, the first MonitorSite is defined by the siteId only. The second MonitorSite includes the entire site definition, even though only the siteId is required. If the entire MonitorSite is being collected from a request and programmatically being included in the ProvisionTests request, the web service ignores everything except the siteId.
Retrieve a list of all the tests created under a given group by supplying a MonitorFilter in your GetTests() request. In this case, the MonitorFilter will include a Group filter, so that the value of Group is the name of the folder containing the tests you are interested in. The GetTests() query returns only those tests that match the group filter.
The following is a GetTestsQuery() that returns all the tests within a folder named
<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> <!--Optional:--> <prov:MonitorFilter> <prov:Group>Backbone Tests</prov:Group> </prov:MonitorFilter> </prov:GetTestsRequest> </soapenv:Body> </soapenv:Envelope>
At the time of provisioning, if you supply a folder, also supply a folder status (generally active to begin with). If, on an UpdateTests() request, you set the folder status of a test to Inactive, you will deactivate all the tests in the folder. You can reactive the entire group by setting the folder status to Active.
Currently, the UpdateTests() method is the only means of performing status updates on an entire folder. There is not a more granular FolderStatusUpdate method available at this time.
Currently, there is no way to delete a folder except through the Synthetic Classic Portal.