Info

Created 22-07-2021 by Lavinia Gheghea

Revision



Description

The API allows you to retrieve individual employee app log  as well as a list of all employee app logs

Endpoints


GET:  /employeeapplogs?sEmployeeCode=xxxx


Parameters
Headers and Query
 Name
 Description
 Type
 API-key - required
  Authorization Token
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
 DEVICEID
 String
 sEmployeeCode- required
 Employee Code
 String
 offset
 starting record
 Integer
 limit
 how many records displayed on a page
 Integer
 OrderFieldName
 field name to order the recordset
 String
 OrderDirection
 ASC or DESC
 String
 Filter
 filter the recordset
 String

Curl example

curl -X GET "https://smartapi.smarttid.dk/employeeapplogs?sEmployeeCode=xxxx" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 (OK) :  array of employee app logs

Response body

{ "ID": 2066, "EmployeeCode": "9999", "LogTime": "2021-06-14T13:43:19.98", "UID": "f43e1e1d-53e0-41ff-a5fc-828485b1cdca", "GPSActivated": true, "Latitude": 37.785834, "Longitude": -122.406417, "GPSTimestamp": "2021-06-14T11:43:07.837", "GPSAccuracy": 5, "PlatformOSType": "ios", "PlatformOSVersion": "14.5", "PlatformDeviceModel": "iPhone 12", "AppID": "dk.smarttid.phone3", "AppVersion": "3.0.27", "StoredProcToExec": "sp_App_Logout", "DeviceTime": "2021-06-14T14:43:19.78", "NetworkInfo": "wifi:", "Answer": null, "SmartPointID": null }, { "ID": 2065, "EmployeeCode": "9999", "LogTime": "2021-06-14T13:43:08.09", "UID": "f43e1e1d-53e0-41ff-a5fc-828485b1cdca", "GPSActivated": true, "Latitude": 0, "Longitude": 0, "GPSTimestamp": "1970-01-01T00:00:00", "GPSAccuracy": 0, "PlatformOSType": "ios", "PlatformOSVersion": "14.5", "PlatformDeviceModel": "iPhone 12", "AppID": "dk.smarttid.phone3", "AppVersion": "3.0.27", "StoredProcToExec": "sp_App_MainMenu", "DeviceTime": "2021-06-14T14:43:07.88", "NetworkInfo": "wifi:", "Answer": null, "SmartPointID": null }, { "ID": 2064, "EmployeeCode": "9999", "LogTime": "2021-06-14T13:41:53.143", "UID": "acb16d47-342a-4ced-97b5-16a07441a6cb", "GPSActivated": true, "Latitude": 0, "Longitude": 0, "GPSTimestamp": "1970-01-01T00:00:00", "GPSAccuracy": 0, "PlatformOSType": "android", "PlatformOSVersion": "11", "PlatformDeviceModel": "sdk_gphone_arm64", "AppID": "dk.smarttid.phone3", "AppVersion": "3.0.27", "StoredProcToExec": "sp_App_MainMenu", "DeviceTime": "2021-06-14T14:41:52.687", "NetworkInfo": "wifi:AndroidWifi", "Answer": null, "SmartPointID": null }, ]


Response headers:
content-encoding: gzip 
 content-length: 238 
 content-type: application/json; charset=utf-8 
 date: Mon, 24 Aug 2020 08:01:23 GMT 
 server: Microsoft-IIS/10.0 
 vary: Accept-Encoding 
 x-pagination: {"totalCount":4,"totalFiltered":4,"Offset":0,"Limit":4,"Returned":4} 
 x-powered-by: ASP.NET 

400 (ERROR) : Error message

Response Body
Error message


GET{id} : /employeeapplogs/{id}  


Parameters
 Name
 Description
 Type
 API-key - required
  Authorization Token 
 String(64)
 UID - required
UID -how can be obtained
 String
 DEVICEID - required
 DEVICEID
 String
 id- required
 ID of employee app log
 Integer
Curl example

curl -X GET "https://smartapi.smarttid.dk/employeeapplogs/id" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 (OK) : the employee app log

Response Body

 { "ID": 2064, "EmployeeCode": "9999", "LogTime": "2021-06-14T13:41:53.143", "UID": "acb16d47-342a-4ced-97b5-16a07441a6cb", "GPSActivated": true, "Latitude": 0, "Longitude": 0, "GPSTimestamp": "1970-01-01T00:00:00", "GPSAccuracy": 0, "PlatformOSType": "android", "PlatformOSVersion": "11", "PlatformDeviceModel": "sdk_gphone_arm64", "AppID": "dk.smarttid.phone3", "AppVersion": "3.0.27", "StoredProcToExec": "sp_App_MainMenu", "DeviceTime": "2021-06-14T14:41:52.687", "NetworkInfo": "wifi:AndroidWifi", "Answer": null, "SmartPointID": null }
]

Response Headers
content-encoding: gzip
  content-length: 175
  content-type: application/json; charset=utf-8 
 date: Mon, 24 Aug 2020 08:39:57 GMT 
 server: Microsoft-IIS/10.0 
 vary: Accept-Encoding  x-powered-by: ASP.NET 

400 (ERROR) : Error message

Response Body
Error message


SQL Procedure 

sp_EmployeeAppLog