Info

Created 26-07-2021 by Lavinia Gheghea

Revision



Description

The API allows you to  retrieve individual employee task as well as a list of all  employee tasks.

Endpoints


GET:  /employeetasks

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
 sPageName
 Page Name
 String
 nRefID
 Ref ID
 Integer
 dtStartDate
 Start Date
 String
 dtEndDate
 End Date
 String
Curl example

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

Response

200 (OK) :  array of employee tasks

Response body

{ "ID": 103, "ShortDescription": "test", "LongDescription": null, "Subject": "ID:103 Test Job 2 test/ test", "JobCode": "200", "JobDescription": "Test Job 2", "JobOperationLineNumber": 20, "OperationCode": "TEST", "OperationDescription": "test", "ActivityCode": null, "DueDate": null, "Status": "New", "EmployeeCode": null, "Progress": "{t}Estimated{/t}: 0, {t}Planned{/t}: 0, {t}Used{/t}: 0", "CreatedDate": "2018-07-02T00:00:00", "Group": "{t}Back log{/t}", "Sorting": 6, "Link": "" }, { "ID": 105, "ShortDescription": "test", "LongDescription": null, "Subject": "ID:105 Standard skabelon test/ test", "JobCode": "STANDARD", "JobDescription": "Standard skabelon", "JobOperationLineNumber": 12345, "OperationCode": "TEST", "OperationDescription": "test", "ActivityCode": null, "DueDate": null, "Status": "New", "EmployeeCode": null, "Progress": "{t}Estimated{/t}: 0, {t}Planned{/t}: 0, {t}Used{/t}: 0", "CreatedDate": "2019-06-26T00:00:00", "Group": "{t}Back log{/t}", "Sorting": 6, "Link": "" }, { "ID": 112, "ShortDescription": "test", "LongDescription": null, "Subject": "ID:112 Test 102 test/ test", "JobCode": "102", "JobDescription": "Test 102", "JobOperationLineNumber": 12345, "OperationCode": "TEST", "OperationDescription": "test", "ActivityCode": null, "DueDate": null, "Status": "New", "EmployeeCode": null, "Progress": "{t}Estimated{/t}: 0, {t}Planned{/t}: 0, {t}Used{/t}: 0", "CreatedDate": "2019-07-04T00:00:00", "Group": "{t}Back log{/t}", "Sorting": 6, "Link": "" }, ]




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} : /employeetasks/{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 task
 Integer
Curl example

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

Response

200 (OK) : the employee task

Response Body
[  { "ID": 112, "ShortDescription": "test", "LongDescription": null, "Subject": "ID:112 Test 102 test/ test", "JobCode": "102", "JobDescription": "Test 102", "JobOperationLineNumber": 12345, "OperationCode": "TEST", "OperationDescription": "test", "ActivityCode": null, "DueDate": null, "Status": "New", "EmployeeCode": null, "Progress": "{t}Estimated{/t}: 0, {t}Planned{/t}: 0, {t}Used{/t}: 0", "CreatedDate": "2019-07-04T00:00:00", "Group": "{t}Back log{/t}", "Sorting": 6, "Link": "" }, ]


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_EmployeeTask