AddOrUpdateSubstitutionParameters

This method is used to add or update one or more monitors' substitution parameters. For global substitution parameters (those parameterized originally defined in the GSL script), the parameter value may be updated. New global substitution parameters can only be added to the GSL script. A site-level substitution parameter is essentially a copy of a global substitution parameter and bears the same name and id as its global counterpart, but its value will differ from the global value. The global value is the default value and will always be used in the script unless a site-level value has been defined. This method allows you to create and update site-level substitution parameters, provided those parameters each match a global substitution parameter with respect to id and name. For example, if username has been parameterized in a script at the global level, this method may be used to create a site-level username with a value different from what is set at the global level.

Action

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

Style

Document

Input (literal)

An AddOrUpdateSubstitutionParametersRequest contains, at a minimum, the Credentials needed for authentication and to resolve the account and at least one ParameterizedTest object. Each ParameterizedTest object in the message must match an existing browser test in the system.

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.
ParameterizedMonitor anyType (restriction) 1..* No A ParameterizedMonitor is a description of a browser test that contains substitution parameters. This element appears in a GetParameterizedTestsResponse and in an AddOrUpdateSubstitutionParametersRequest. In the first context, it describes a configuration of an existing browser test (one that has substitution parameter definitions). In the second context, it describes the manner in which existing global substitution parameters are to be updated and/or the manner in which site-level substitution parameters are to be created, updated or deleted.

Output (literal)

The AddOrUpdateSubstitutionParametersResponse contains a ResponseStatus (SUCCESS or FAILURE). If AddOrUpdate operation failed, a Message will be included with some information about the cause of the failure. Either all of the Add/Update operations will succeed, or none will be performed.

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 requests updates the value of a single global substitution parameter on 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:AddOrUpdateSubstitutionParametersRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <prov:ParameterizedMonitor monitorId="328430">
            <prov:SubstitutionParameters>
               <prov:SubstitutionParameter id="0"
                name="UserName" value="Updated User 11/05/2012
                 2:56:05 PM"/>
            </prov:SubstitutionParameters>
         </prov:ParameterizedMonitor>
      </prov:AddOrUpdateSubstitutionParametersRequest>
   </soapenv:Body>
</soapenv:Envelope>

Response

An example of the response to the previous message:

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

More Requests

The following message creates or updates the site-level substitution parameter values 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:AddOrUpdateSubstitutionParametersRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <!--1 or more repetitions:-->
         <prov:ParameterizedMonitor monitorId="328430">
            <prov:MonitorSites>
               <!--Zero or more repetitions:-->
               <prov:MonitorSite siteId="865">
                  <prov:SubstitutionParameters>
                     <prov:SubstitutionParameter id="0"
                        name="UserName" value="user2"/>
                     <prov:SubstitutionParameter id="1"
                        name="Password" value="password2"/>
                  </prov:SubstitutionParameters>
               </prov:MonitorSite>
               <prov:MonitorSite siteId="880">
                  <prov:SubstitutionParameters>
                     <prov:SubstitutionParameter id="0"
                        name="UserName" value="user3"/>
                     <prov:SubstitutionParameter id="1"
                        name="Password" value="password3"/>
                  </prov:SubstitutionParameters>
               </prov:MonitorSite>
            </prov:MonitorSites>
         </prov:ParameterizedMonitor>
      </prov:AddOrUpdateSubstitutionParametersRequest>
   </soapenv:Body>
</soapenv:Envelope>

The following message deletes a site-level substitution parameter assignment 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:AddOrUpdateSubstitutionParametersRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <prov:ParameterizedMonitor monitorId="326334">
            <prov:MonitorSites>
               <prov:MonitorSite siteId="880">
                  <prov:SubstitutionParameters>
                     <prov:SubstitutionParameter id="1"
                        name="Password" value="foo" deletionFlag="On"/>
                  </prov:SubstitutionParameters>
               </prov:MonitorSite>
            </prov:MonitorSites>
         </prov:ParameterizedMonitor>
      </prov:AddOrUpdateSubstitutionParametersRequest>
   </soapenv:Body>
</soapenv:Envelope>