GetAuditLogResult GetAuditLog(AuditLogId tLog, GetAuditLogArg tArg)
tLog. Access protocol moniker.
tArg. Operation execution parameters.
The GetAuditLog operation gets access protocol records in accordance with the specified settings.
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:
Records about repository connections.
Records about operations executed with objects within one repository connection.
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.
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.
{
"GetAuditLog" :
{
"tLog" :
{
"id" : "S1!M!S!A2"
},
"tArg" :
{
"count" : "3"
}
}
}
{
"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: