Get a list of tests by date range (GetTests)

For this use case, you only want to see tests created within a certain date range, modified within a certain date range, or due to expire within a certain date range. GetTests() enables you to restrict it output based on such a date range using a MonitorFilter. You can filter by create date, modify date, or expiration date.

The following query contains a MonitorFilter restricting GetTests() output by a range of create dates:

<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:QueryByCreateDate dateQueryType="GreaterThan"
                                    queryDate="2012-08-05T10:17:12"/>
            <prov:QueryByCreateDate dateQueryType="LessThanOrEqualTo"
                                    queryDate="2012-08-10T10:17:12"/>
         </prov:MonitorFilter>
      </prov:GetTestsRequest>
   </soapenv:Body>
</soapenv:Envelope>

The following MonitorFilter element could be used to restrict GetTests() output by a range of modified dates:

<prov:MonitorFilter>
   <prov:QueryByModifyDate dateQueryType="GreaterThan"
                           queryDate="2012-08-05T10:17:12"/>
   <prov:QueryByModifyDate dateQueryType="LessThanOrEqualTo"
                           queryDate="2012-08-10T10:17:12"/>
</prov:MonitorFilter>

The following MonitorFilter could be used to restrict GetTests() output by test expiration date:

<prov:MonitorFilter>
   <prov:QueryByExpirationDate dateQueryType="GreaterThan"
                               queryDate="2012-08-05T10:17:12"/>
   <prov:QueryByExpirationDate dateQueryType="LessThanOrEqualTo"
                               queryDate="2012-08-10T10:17:12"/>
</prov:MonitorFilter>

The API provides a collection of operators that enable you to specify how the date criterion or criteria is or are applied. These operators include LessThan, LessThanOrEqualTo, EqualTo, GreaterThan, and GreaterOrEqualTo. You can also combine date filter criteria with other criteria, such as Group, Status, or AgentType.