SetMaintenanceMode

Syntax

MaintenanceModeState SetMaintenanceMode(MbId tMb, MaintenanceModeState tArg)

Parameters

tMb. Moniker of opened repository connection.

tArg. Operation execution parameters.

Description

The SetMaintenanceMode operation changes maintenance mode status in the repository.

Comments

To execute the operation in the tMb field specify moniker of opened repository connection, and in the tArg.active field specify set maintenance mode:

The moniker can be obtained on executing the OpenMetabase operation.

The operation results in information about maintenance mode status: enabled or not enabled.

Example

Below is the example of enabling maintenance mode in the repository. The request contains moniker of opened repository connection and determines whether maintenance mode should be enabled. The response contains information about maintenance mode status.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetMaintenanceMode xmlns="http://www.fsight.ru/PP.SOM.Som">
<tMb xmlns="">
  <id>NEJOFNHNBNFGGOAEGABOLMDNHJDHEPEEHIDONAKOKJMGBMEK!M</id>
  </tMb>
<tArg xmlns="">
  <active>true</active>
  </tArg>
  </SetMaintenanceMode>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetMaintenanceModeResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <active xmlns="">1</active>
  </SetMaintenanceModeResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetMaintenanceMode" :
{
"tMb" :
{
"id" : "NEJOFNHNBNFGGOAEGABOLMDNHJDHEPEEHIDONAKOKJMGBMEK!M"
},
"tArg" :
{
"active" : "true"
}
}
}

JSON response:

{
"SetMaintenanceModeResult" :
{
"active" : "1"
}
}
public static MaintenanceModeState SetMaintenanceMode(string moniker, bool maintenanceMode)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetMaintenanceMode()
{
tArg = new MaintenanceModeState() { active = maintenanceMode },
tMb = new MbId() { id = moniker }
};
// Change maintenance mode status
var result = somClient.SetMaintenanceMode(tSet);
return result;
}

See also:

Working with Repository