GetMaintenanceWindows

This method retrieves all of the one-time and recurring maintenance windows under an account. Filtering results on monitor IDs is supported as well as the maintenance window type.

Action

http://gpn.webservice.gomez.com/TestManagementWS_30/TestManagementService.asmx?op=GetMaintenanceWindows

Style

Document

Input (literal)

The input part of a GetMaintenanceWindows definition contains a GetMaintenanceWindowsRequest element. This element must contain the user's Credentials. The MaintenanceWindowFilter is optional.

Element Type Occurs Nillable? Description
SEQUENCE 1..1
Credentials anyType (restriction) 1..1 No A Credentials element contains the username and password of an account user. The element is required in all requests to the Test Management Web Service.
UserName [element Credentials] string 1..1 No The UserName of an employee for an account (and used for authentication).
Password [element Credentials] string 1..1 No A secret used as part of user credentials for authentication. Every request to the Test Management API web service must include a Credentials element. That element itself contains a UserName and a Password element.
MaintenanceWindowFilter anyType (restriction) 0..1 No A MaintenanceWindowFilter element is sent as part of a GetMaintenanceWindows operation invocation. The use of the filter limits the output of this query.

Output (literal)

The output part of a GetMaintenanceWindows method invocation contains a GetMaintenanceWindowsResponse element. This element will contain the response status of the request (SUCCESS or FAILURE), a message if the request failed, and the onetime maintenance window definitions and recurring maintenance window definitions if there are any. The maintenance window definitions will be grouped by monitor (represented as a MaintenanceWindowMonitor element).

Element Type Occurs Nillable? Description
SEQUENCE 1..1
ResponseStatus ResponseStatusType 1..1 No This element appears in most of the responses issued when the Test Management API operations are invoked.
ErrorMessage [type OperationResponseType] string 0..1 No The error message is provided if the ResponseStatus was FAILURE.
MaintenanceWindowMonitor anyType (restriction) 0..* No A maintenance window monitor appears in both the GetMaintenanceWindows output as well as in the AddOrUpdateMaintenanceWindows request. In the first context, it is a container of monitor-level maintenance window data for already configured maintenance windows. In the second context, it contains monitor-level maintenance window data for use in adding new or updating existing maintenance windows.

Example

Request

The following is a sample request for maintenance window definitions with no filter:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:GetMaintenanceWindowsRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
      </prov:GetMaintenanceWindowsRequest>
   </soapenv:Body>
</soapenv:Envelope>

Response

The following is a sample response to the request:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetMaintenanceWindowsResponse xmlns="http://www.gomeznetworks.com/schemas/provisioning">
         <ResponseStatus>SUCCESS</ResponseStatus>
         <MaintenanceWindowMonitor monitorId="309545"
          createDate="2012-09-20T20:26:01.157" modifyDate=
          "2012-09-20T20:26:01.18" monitorStatus="Active">
            <OneTimeMaintenanceWindows>
               <OneTimeMaintenanceWindow beginDate=
                "2012-11-15T15:03:42" endDate="2012-11-10T18:03:42"/>
               <OneTimeMaintenanceWindow beginDate=
                "2012-11-16T15:03:42" endDate="2012-11-16T18:03:42"/>
               <OneTimeMaintenanceWindow beginDate=
                "2012-11-17T15:03:42" endDate="2012-11-16T18:03:42"/>
            </OneTimeMaintenanceWindows>
         </MaintenanceWindowMonitor>
         <MaintenanceWindowMonitor monitorId="328430"
                createDate="2012-11-13T21:27:29.513"
                modifyDate="2012-11-21T18:57:53.393" monitorStatus="Active">
            <RecurringMaintenanceWindows>
               <RecurringMaintenanceWindow dayOfWeek="SAT"
                startTime="21:50:00.0000000-05:00" endTime=
                "22:50:00.0000000-05:00"/>
            </RecurringMaintenanceWindows>
         </MaintenanceWindowMonitor>
      </GetMaintenanceWindowsResponse>
   </soap:Body>
</soap:Envelope>

More Requests

The following request limits the response to a limited set of monitors and to a single type of maintenance window (RECURRING):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:GetMaintenanceWindowsRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <prov:MaintenanceWindowFilter>
    <prov:MaintenanceWindowType>RECURRING
      </prov:MaintenanceWindowType>
            <prov:MonitorIds>
            <prov:MonitorId>326334</prov:MonitorId>
            <prov:MonitorId>328141</prov:MonitorId>
            <prov:MonitorId>328196</prov:MonitorId>
            </prov:MonitorIds>
         </prov:MaintenanceWindowFilter>
      </prov:GetMaintenanceWindowsRequest>
   </soapenv:Body>
</soapenv:Envelope>

The following request limits the response to one-time maintenance window definitions only:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:GetMaintenanceWindowsRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <prov:MaintenanceWindowFilter>
            <prov:MaintenanceWindowType>ONE_TIME
             </prov:MaintenanceWindowType>
         </prov:MaintenanceWindowFilter>
      </prov:GetMaintenanceWindowsRequest>
   </soapenv:Body>
</soapenv:Envelope>