GetAuditLog

Syntax

GetAuditLogResult GetAuditLog(AuditLogId tLog, GetAuditLogArg tArg)

Parameters

tLog. Access protocol moniker.

tArg. Operation execution parameters.

Description

The GetAuditLog operation gets access protocol records in accordance with the specified settings.

Comments

Depending on the parameters that are used to execute the OpenAuditLog operation, this operation enables the user to get one of the following lists of access protocol records:

To execute the GetAuditLog operation, in the tLog field specify opened access protocol instance moniker, and in the tArg field specify parameters for getting information about protocol records. The moniker can be obtained on executing the OpenAuditLog operation.

The SetAuditLogMd operation can be used to set filter in access protocol. The GetAuditLog operation will work with filtered records list.

Example

The example of getting records from the opened instance of the access protocol. The request contains moniker of the access protocol and the number of records, information on which must be retrieved.

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">
<GetAuditLog xmlns="http://www.prognoz.ru/PP.SOM.Som">
<tLog xsi:type="q1:OpenAuditLogResult" xmlns="" xmlns:q1="http://www.prognoz.ru/PP.SOM.Som">
  <id>S1!M!S!A2</id>
  </tLog>
<tArg xmlns="">
  <count>3</count>
  </tArg>
  </GetAuditLog>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetAuditLogResult 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">
<logRecords xmlns="">
<rs>
<r>
  <session>76206</session>
  <stamp>2018-10-22T05:53:39.399Z</stamp>
  <succeeded>1</succeeded>
  <isLogon>0</isLogon>
<oper>
  <operation>15</operation>
  <position>0</position>
  <level>0</level>
  <name>Read</name>
  <mask>2</mask>
  <objectKey>4294967295</objectKey>
  <objectId>AUDITLOG</objectId>
  <objectName>Access protocol</objectName>
  <objectClass>7938</objectClass>
  <comment />
  <objectLabel>0</objectLabel>
  </oper>
  </r>
<r>
  <session>76206</session>
  <stamp>2018-10-22T05:53:37.040Z</stamp>
  <succeeded>1</succeeded>
  <isLogon>0</isLogon>
<oper>
  <operation>13</operation>
  <position>0</position>
  <level>0</level>
  <name>Read policy</name>
  <mask>1048576</mask>
  <objectKey>4294967295</objectKey>
  <objectId>METABASESECURITY</objectId>
  <objectName>Security policy</objectName>
  <objectClass>7937</objectClass>
  <comment />
  <objectLabel>0</objectLabel>
  </oper>
  </r>
  </rs>
  <notEof>0</notEof>
  <dateOrderAscending>0</dateOrderAscending>
  <supportObjectsLabel>1</supportObjectsLabel>
  </logRecords>
  <dataKey xmlns="">-1</dataKey>
  </GetAuditLogResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
 "GetAuditLog" :
  {
   "tLog" :
    {
     "id" : "S1!M!S!A2"
    },
   "tArg" :
    {
     "count" : "3"
    }
  }
}

JSON response:

{
 "GetAuditLogResult" :
  {
   "logRecords" :
    {
     "rs" :
      {
       "r" :
        [
          {
           "session" : "76206",
           "stamp" : "2018-10-22T05:53:39.399Z",
           "succeeded" : "1",
           "isLogon" : "0",
           "oper" :
            {
             "operation" : "15",
             "position" : "0",
             "level" : "0",
             "name" : "Read",
             "mask" : "2",
             "objectKey" : "4294967295",
             "objectId" : "AUDITLOG",
             "objectName" : "Access protocol",
             "objectClass" : "7938",
             "comment" : "",
             "objectLabel" : "0"
            }
          },
          {
           "session" : "76206",
           "stamp" : "2018-10-22T05:53:37.040Z",
           "succeeded" : "1",
           "isLogon" : "0",
           "oper" :
            {
             "operation" : "13",
             "position" : "0",
             "level" : "0",
             "name" : "Read policy",
             "mask" : "1048576",
             "objectKey" : "4294967295",
             "objectId" : "METABASESECURITY",
             "objectName" : "Security policy",
             "objectClass" : "7937",
             "comment" : "",
             "objectLabel" : "0"
            }
          }
        ]
      },
     "notEof" : "0",
     "dateOrderAscending" : "0",
     "supportObjectsLabel" : "1"
    },
   "dataKey" : "-1"
  }
}
public static GetAuditLogResult GetOperations(string logId, uint operationCount)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var getAuditLog = new GetAuditLog()
{
tArg = new GetAuditLogArg()
{
count = operationCount,
},
tLog = new AuditLogId() { id = logId }
};
//Get operations list
var result = somClient.GetAuditLog(getAuditLog);
return result;
}

See also:

Common Operations