AddOrUpdateMaintenanceWindows

This web method is used for creating new maintenance windows. For each maintenance window type, the pre-existing window definitions under the monitor governed by the maintenance are removed before creating new ones. The safe way to use this method is to retrieve the pre-existing window definitions and add the new maintenance window definitions to the collections before doing the add. This ensures that pre-existing window definitions will be preserved when you add new ones. To remove a window definition, retrieve the pre-existing window definitions and send an add request with the definition to be removed omitted from the collection.

Action

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

Style

Document

Input (literal)

The input part of an AddOrUpdateMaintenanceWindows method invocation contains an AddOrUpdateMaintenanceWindowsRequest element. This element must contain a Credentials element and a collection of MaintenanceWindowMonitors. Each MaintenanceWindowMonitor may contain either a collection of OneTimeMaintenanceWindows or a collection of RecurringMaintenanceWindows or both types of collection.

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.
MaintenanceWindowMonitor anyType (restriction) 1..* 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.

Output (literal)

The output part of an of an AddOrUpdateMaintenanceWindows request contains an AddOrUpdateMaintenanceWindowsResponse element. This element contains the response status of the request (SUCCESS or FAILURE) and a message if the request failed. All of the updates in the request must be successful in order for any of the updates to be persisted.

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.

Example

Requests

The following message creates two one-time maintenance window definitions for a specific monitor:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:AddOrUpdateMaintenanceWindowsRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <!--1 or more repetitions:-->
         <prov:MaintenanceWindowMonitor monitorId="263717">
            <prov:OneTimeMaintenanceWindows>
               <!--Zero or more repetitions:-->
               <prov:OneTimeMaintenanceWindow beginDate="2012-11-09T15:03:42"
                         endDate="2012-11-10T18:03:42"/>
               <prov:OneTimeMaintenanceWindow beginDate="2012-11-15T15:03:42"
                         endDate="2012-11-16T18:03:42"/>
            </prov:OneTimeMaintenanceWindows>
         </prov:MaintenanceWindowMonitor>
      </prov:AddOrUpdateMaintenanceWindowsRequest>
   </soapenv:Body>
</soapenv:Envelope>

The following message creates two recurring maintenance window definitions under a single monitor:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:AddOrUpdateMaintenanceWindowsRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <!--1 or more repetitions:-->
         <MaintenanceWindowMonitor monitorId="326334"
          xmlns="http://www.gomeznetworks.com/schemas/provisioning">
            <RecurringMaintenanceWindows>
               <RecurringMaintenanceWindow dayOfWeek="SAT"
                     startTime="01:00:00.0000000-04:00" endTime="02:20:00.0000000-04:00"/>
               <RecurringMaintenanceWindow dayOfWeek="SUN"
                     startTime="21:50:00.0000000-05:00" endTime="22:50:00.0000000-05:00"/>
            </RecurringMaintenanceWindows>
         </MaintenanceWindowMonitor>
      </prov:AddOrUpdateMaintenanceWindowsRequest>
   </soapenv:Body>
</soapenv:Envelope>

The following message deletes all the one-time maintenance windows that exist for a given monitor:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:AddOrUpdateMaintenanceWindowsRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <!--1 or more repetitions:-->
         <prov:MaintenanceWindowMonitor monitorId="263717">
            <prov:OneTimeMaintenanceWindows/>
         </prov:MaintenanceWindowMonitor>
      </prov:AddOrUpdateMaintenanceWindowsRequest>
   </soapenv:Body>
</soapenv:Envelope>

The following message deletes all the recurring maintenance window definitions for a given monitor:

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

Response

The following is a sample successful response to any one of the previous requests:

<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>
      <AddOrUpdateMaintenanceWindowsResponse
        xmlns="http://www.gomeznetworks.com/schemas/provisioning">
         <ResponseStatus>SUCCESS</ResponseStatus>
      </AddOrUpdateMaintenanceWindowsResponse>
   </soap:Body>
</soap:Envelope>