Info

Created 31-08-2020 by Lavinia Gheghea

Revision



Description

The API allows you to get the list of the analyses and execute each analyse

Endpoints


GET:  /analyses


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
 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/analyses" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 (OK) :  array of analyses

Response body

{ "Name": "ANALYSE_EMPL", "Description": "ANALYSE_EMPL_HINT" }, { "Name": "ANALYSE_EMPL_REG", "Description": "ANALYSE_EMPL_REG_HINT" }, { "Name": "ANALYSE_EMPL_ABSENCE", "Description": "ANALYSE_EMPL_ABSENCE_HINT" }, { "Name": "ANALYSE_EMPL_WORKPL", "Description": "ANALYSE_EMPL_WORKPL_HINT" }, { "Name": "ANALYSE_JOB", "Description": "ANALYSE_JOB_HINT" }, ]




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




POST: /analyses?sAction=nameofanalyse&dtStartDate=mm-dd-yyyy&dtEndDate=mm-dd-yyyy


Parameters
 Name
 Description
 Type
 API-key - required
 Authorization Token 
 String(64)
 UID - required
 UID-how can be obtained
 String
 DEVICEID - required
 DEVICEID
 String
 sAction
 The name of the analyse
 String
 dtStartDate
 The start date
 String format mm-dd-yyyy
 dtEndDate
 The end date
 String format mm-dd-yyyy



Curl example

curl -X POST "https://smartapi.smarttid.dk/analyses?sAction=ANALYSE_EMPL&dtStartDate=mm-dd-yyyy&dtEndDate=mm-dd-yyyy" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -d ""


Response

200 (OK) : array that contain info about that analyse

Response Body
[
 {
    "{t}Employee{/t}": "employee",
    "NORMAL": 960,
    "OVERTID1": 512,
    "OVERTID2": 128
  },
  {
    "{t}Employee{/t}": "employee",
    "NORMAL": 1,
    "OVERTID1": 1,
    "OVERTID2": null
  }
]
Response Headers
content-encoding: gzip 
 content-length: 138 
 content-type: application/json; charset=utf-8 
 date: Mon, 24 Aug 2020 09:24:44 GMT 
 server: Microsoft-IIS/10.0 
 vary: Accept-Encoding  x-powered-by: ASP.NET

400 (ERROR) : Error message

Response Body
Error message