SetAuditLogMd

Syntax

SetAuditLogMdResult SetAuditLogMd(AuditLogId tLog, SetAuditLogMdArg tArg)

Parameters

tLog. Access protocol moniker.

tArg. Operation execution parameters.

Description

The SetAuditLogMd operation sets parameters of access protocol work.

Comments

This operation enables the user to set various parameters for filtering records in access protocol. To execute the operation, in the tLog field specify opened workbook instance moniker, and in the tArg field specify work parameters.

The moniker can be obtained on executing the OpenAuditLog operation.

Set filtering parameters in the tArg.meta.filter field, and in the tArg.pattern field set the pattern, according to which the specified parameters are applied. If the filter has been set, the GetAuditLog operation selects records from the non-filtered records list. If the tArg.metaGet field has been defined, the SetAuditLogMd operation results in the list of specified filtering parameters. The specified parameters can also be obtained using the GetAuditLogMd operation.

Example

The example of setting records filter in access protocol. The request contains moniker of the access protocol and required filter parameters. The response contains the full list of filtering settings.

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">
<SetAuditLogMd xmlns="http://www.prognoz.ru/PP.SOM.Som">
<tLog xmlns=" ">
  <id>S1!M!S!A4</id>
  </tLog>
<tArg xmlns=" ">
<pattern>
<filter>
  <conditions>Set</conditions>
<condition>
  <userNames>Set</userNames>
  <stations>Set</stations>
  <osUsers>Set</osUsers>
  <userIPs>Set</userIPs>
  <operations>Set</operations>
  <classes>Set</classes>
  <objectKeys>Set</objectKeys>
  </condition>
  </filter>
  </pattern>
<meta>
<filter>
<conditions>
<Item>
  <isAnd>true</isAnd>
  <isNot>false</isNot>
  <minDate>2018-10-01T00:00:00</minDate>
  <maxDate>2018-12-01T00:00:00</maxDate>
  <includeFailedLogons>false</includeFailedLogons>
  <includeSucceededLogons>false</includeSucceededLogons>
  <includeFailedOperations>true</includeFailedOperations>
  <includeSucceededOperations>true</includeSucceededOperations>
<nameFilter>
  <isOn>true</isOn>
  <value>report</value>
  <caseSensitive>false</caseSensitive>
  <wholeWordsOnly>false</wholeWordsOnly>
  </nameFilter>
<idFilter>
  <isOn>true</isOn>
  <value>report</value>
  <caseSensitive>false</caseSensitive>
  <wholeWordsOnly>false</wholeWordsOnly>
  </idFilter>
  </Item>
  </conditions>
  <dateOrderAscending>true</dateOrderAscending>
  </filter>
  </meta>
<metaGet>
<filter>
  <conditions>Get</conditions>
  </filter>
  </metaGet>
  </tArg>
  </SetAuditLogMd>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetAuditLogMdResult xmlns="http://www.prognoz.ru/PP.SOM.Som" xmlns:q1="http://www.prognoz.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<metaGet xmlns=" ">
<filter>
<conditions>
<Item>
  <isAnd>1</isAnd>
  <isNot>0</isNot>
  <minDate>2018-10-01T00:00:00.000</minDate>
  <maxDate>2018-12-01T00:00:00.000</maxDate>
  <includeFailedLogons>0</includeFailedLogons>
  <includeSucceededLogons>0</includeSucceededLogons>
  <includeFailedOperations>1</includeFailedOperations>
  <includeSucceededOperations>1</includeSucceededOperations>
<nameFilter>
  <isOn>1</isOn>
  <value>report</value>
  <caseSensitive>0</caseSensitive>
  <wholeWordsOnly>0</wholeWordsOnly>
  </nameFilter>
<idFilter>
  <isOn>1</isOn>
  <value>report</value>
  <caseSensitive>0</caseSensitive>
  <wholeWordsOnly>0</wholeWordsOnly>
  </idFilter>
  </Item>
  </conditions>
  <dateOrderAscending>1</dateOrderAscending>
  <top>0</top>
  </filter>
  </metaGet>
  </SetAuditLogMdResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetAuditLogMd" :
{
"tLog" :
{
"id" : "S1!M!S!A4"
},
"tArg" :
{
"pattern" :
{
"filter" :
{
"conditions" : "Set",
"condition" :
{
"userNames" : "Set",
"stations" : "Set",
"osUsers" : "Set",
"userIPs" : "Set",
"operations" : "Set",
"classes" : "Set",
"objectKeys" : "Set"
}
}
},
"meta" :
{
"filter" :
{
"conditions" :
{
"Item" :
{
"isAnd" : "true",
"isNot" : "false",
"minDate" : "2018-10-01T00:00:00",
"maxDate" : "2018-12-01T00:00:00",
"includeFailedLogons" : "false",
"includeSucceededLogons" : "false",
"includeFailedOperations" : "true",
"includeSucceededOperations" : "true",
"nameFilter" :
{
"isOn" : "true",
"value" : "report",
"caseSensitive" : "false",
"wholeWordsOnly" : "false"
},
"idFilter" :
{
"isOn" : "true",
"value" : "report",
"caseSensitive" : "false",
"wholeWordsOnly" : "false"
}
}
},
"dateOrderAscending" : "true"
}
},
"metaGet" :
{
"filter" :
{
"conditions" : "Get"
}
}
}
}
}

JSON response:

{
"SetAuditLogMdResult" :
{
"metaGet" :
{
"filter" :
{
"conditions" :
{
"Item" :
{
"isAnd" : "1",
"isNot" : "0",
"minDate" : "2018-10-01T00:00:00.000",
"maxDate" : "2018-12-01T00:00:00.000",
"includeFailedLogons" : "0",
"includeSucceededLogons" : "0",
"includeFailedOperations" : "1",
"includeSucceededOperations" : "1",
"nameFilter" :
{
"isOn" : "1",
"value" : "report",
"caseSensitive" : "0",
"wholeWordsOnly" : "0"
},
"idFilter" :
{
"isOn" : "1",
"value" : "report",
"caseSensitive" : "0",
"wholeWordsOnly" : "0"
}
}
},
"dateOrderAscending" : "1",
"top" : "0"
}
}
}
}
public static SetAuditLogMdResult SetAuditLogFilter(string logId, string findText)
{
    var somClient = new SomPortTypeClient(); //Proxy object for operation execution
    //Operation execution parameters
    var setAuditLog = new SetAuditLogMd()
    {
        tArg = new SetAuditLogMdArg()
        {
            meta = new AuditLogMd()
            {
                filter = new AuditLogFilter()
                {
                    conditions = new AuditLogFilterCondition[1]
                    {
                        new AuditLogFilterCondition()
                        {   
                            isAnd = true,
                            isNot = false,                       
                            minDate = DateTime.Parse("01.10.2018"),
                            maxDate = DateTime.Parse("01.12.2018"),
                            includeFailedLogons = false,
                            includeSucceededLogons = false,
                            includeFailedOperations = true,
                            includeSucceededOperations = true,
                            nameFilter = new StringFilterCondition()
                            {
                                caseSensitive = false,
                                isOn = true,
                                value = findText,
                                wholeWordsOnly = false
                            },
                            idFilter = new StringFilterCondition()
                            {
                                caseSensitive = false,
                                isOn = true,
                                value = findText,
                                wholeWordsOnly = false
                            }
                        }
                    },
                    dateOrderAscending = true
                }
            },
            pattern = new AuditLogMdPattern()
            {
                filter = new AuditLogFilterPattern()
                {
                    conditions = ListOperation.Set,
                    condition = new AuditLogFilterConditionPattern()
                    {
                        userNames = ListOperation.Set,
                        stations = ListOperation.Set,
                        osUsers = ListOperation.Set,
                        userIPs = ListOperation.Set,
                        operations = ListOperation.Set,
                        classes= ListOperation.Set,
                        objectKeys= ListOperation.Set
                    }
                },
            },
            metaGet = new AuditLogMdPattern()
            {
                filter = new AuditLogFilterPattern()
                {
                    conditions = ListOperation.Get
                }
            }
        },
        tLog = new AuditLogId() { id = logId }
    };
    //Set filtering parameters in access protocol
    var result = somClient.SetAuditLogMd(setAuditLog);
    return result;
}

See also:

Common Operations