Get the logs from a specified time-interval

getLogs(p_companyID, p_exportTimeFrom, p_exportTimeTo, p_locationId, p_userId, p_infoFieldName, p_infoFieldValue, p_timeregistrationModules)

 

You can use this endpoint to retrieve set of logs from our software.

Parameters

Name Type Required Description
p_companyID string Yes The security code you have been provided with, string (32)
p_exportTimeFrom string Yes The start of the periode, datetime formatted string (yyyy-mm-dd hh:ii:ss)
p_exportTimeTo string Yes The end of the periode, datetime formatted string (yyyy-mm-dd hh:ii:ss)
p_locationId integer No If provided we retrieve the logs for that specific location
p_userId integer No If provided we retrieve the logs for that specific user
p_infoFieldName string No We can filter the logs to certain users looking based on this field, possible values: info1, info2, ..., info14
p_infoFieldValue string No We can filter the logs to certain users looking for this value in the p_infoFieldName field (string)
p_filterOn string No We can filter the logs on certain fields: 'event_time' or 'created'. Default value is 'event_time'. If any other value is supplied than these 2 possible ones the default value will be used
p_timeregistrationModules integer 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


NOTE*:
If p_infoFieldName is not one of the info1, ..., info14 values than the search based on user info fields will not take place.

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 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 The wsAltUserId (in case the company has the infolabel function set and the user has wsAltUserId value), otherwise we retrieve id of the user to which 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)


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


NOTE 2*:
In case there is > 4000 records to be returned by our wsdl, we display a warning message in the Terminal field, asking the user to use a smaller time frame to filter the logs.

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.getLogs soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<p_companyID xsi:type="xsd:string">^4p;tU0Q+#dEIhTWkuj5FnLD^aOLqVu0</p_companyID>
<p_exportTimeFrom xsi:type="xsd:string">2021-01-06 10:00:00</p_exportTimeFrom>
<p_exportTimeTo xsi:type="xsd:string">2021-01-06 18:00:00</p_exportTimeTo>
<p_locationId xsi:type="xsd:string">12</p_locationId>
<p_userId xsi:type="xsd:string">234</p_userId>
<p_infoFieldName xsi:type="xsd:string">info1</p_infoFieldName>
<p_infoFieldValue xsi:type="xsd:string">1234-ba</p_infoFieldValue>
<p_filterOn xsi:type="xsd:string">event_time</p_filterOn>
<p_timeregistrationModules xsi:type="xsd:string">1</p_timeregistrationModules>
</uen:Esws.getLogs>
</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>