Get the logs from a specified scanId-interval

getLogsById(p_companyID, p_exportIdFrom, p_exportIdTo, p_timeregistrationModules)

 

You can use this endpoint to retrieve set of logs from a range of id's from our software.

Parameters

Name Type Required Description
p_companyID string Yes The security code you have been provided with, string (32)
p_exportIdFrom string Yes The string first unique scanId
p_exportIdTo string Yes The last unique scanId
p_timeregistrationModules string No We can filter the logs made only on timeregistration modules by setting the value 1. Default value is 0 which means that we collect all the logs and not just from the timeregistration modules

Return values

getLogsObjectArray (array), containing structs (arrays) of getLogsObject with the following keys:

Name Type Description
scanID integer The id of from the module_logs table, the id of the actual scan
Terminal string On which device (serial number) the action has been taken place on - this field is also used to return possible error message when the case
TerminalKey string What type of the action was: IN, OUT, DUTY IN, DUTY OUT, TNA_1, TNA_2, TNA_3, TNA_4
UserID string To which user the action is related to
Time string When the action took place, datetime formatted string (yyyy-mm-dd hh:ii:ss)
LocationId integer The id of the location where the event occured
LocationName string The name of the location
Success integer 1 in case of identify OK, else 0 (Access Not Granted, Verify Fail)
Terminal Name string On which device (module name) the action has been taken place on
LogText string The text of the log. Can be one of the following:
In case of succes: Identify Success, Verify Success, Identify Duress, Verify Duress, Access Excused APB, Access Excused Timed APB, Access granted, Verify Success LPN, Verify Mobile Card.
In case of fail: Identify Fail, Verify Fail, Identify Not Granted, Verify Not Granted, Identify Disabled, Access Not Granted, Expired User, Access Denied APB, Access Denied Timed APB, Access denied, Verify Fail LPN, Access Denied Abnormal Temperature, Abnormal Temperature Detected.
Other: Battery low, Battery replaced, Lock jammed, System event, Internal error, Failed to unlock, Tampering detected, Blacklisted credential detected, Blacklist full.


NOTE 1*:
In case there is no result set to be returned, we send a "-1 NO RECORD" message in the Terminal field.

Sample

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uen="uen:esws">
<soapenv:Header/>
<soapenv:Body>
<uen:Esws.getLogsById soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<p_companyID xsi:type="xsd:string">^4p;tU0Q+#dEIhTWkuj5FnLD^aOLqVu0</p_companyID>
<p_exportIdFrom xsi:type="xsd:string">170</p_exportIdFrom>
<p_exportIdTo xsi:type="xsd:string">171</p_exportIdTo>
<p_timeregistrationModules xsi:type="xsd:string">1</p_timeregistrationModules>
</uen:Esws.getLogsById>
</soapenv:Body>
</soapenv:Envelope>

Response

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="uen:esws">
<SOAP-ENV:Body>
<ns1:Esws.getLogsResponse xmlns:ns1="uen:esws">
<return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:getLogsObject[2]">
<item xsi:type="tns:getLogsObject">
<scanID xsi:type="xsd:string">170</scanID>
<Terminal xsi:type="xsd:string">541610101</Terminal>
<TerminalKey xsi:type="xsd:string">IN</TerminalKey>
<UserID xsi:type="xsd:string">4</UserID>
<Time xsi:type="xsd:string">2021-01-06 14:11:13</Time>
<LocationId xsi:type="xsd:string">1</LocationId>
<LocationName xsi:type="xsd:string">Location 1</LocationName>
<Success xsi:type="xsd:string">1</Success>
<TerminalName xsi:type="xsd:string">BioEntry P2</TerminalName>
<LogText xsi:type="xsd:string">Identify Success</LogText>
</item>
<item xsi:type="tns:getLogsObject">
<scanID xsi:type="xsd:string">171</scanID>
<Terminal xsi:type="xsd:string">541610101</Terminal>
<TerminalKey xsi:type="xsd:string">OUT</TerminalKey>
<UserID xsi:type="xsd:string">4</UserID>
<Time xsi:type="xsd:string">2021-01-06 14:22:14</Time>
<LocationId xsi:type="xsd:string">1</LocationId>
<LocationName xsi:type="xsd:string">Location 1</LocationName>
<Success xsi:type="xsd:string">1</Success>
<TerminalName xsi:type="xsd:string">BioEntry P2</TerminalName>
<LogText xsi:type="xsd:string">Identify Success</LogText>
</item>
</return>
</ns1:Esws.getLogsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>