Info

Created 29-07-2021 by Lavinia Gheghea

Revision



Description

The API allows you to  get filters

Endpoints


GET:  /getfilter

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
 sURL
 URL
 String
Curl example

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

Response

200 (OK) : filters

Response body

{ "ID": 100, "TableID": "Employee", "Description": "{t}Yes{/t}", "GroupName": "Employed", "GroupCaption": "{t}Employed{/t}", "Formula": "col.colemployed == 1", "ServerFormula": "Employed = 1", "Multiselect": false }, { "ID": 101, "TableID": "Employee", "Description": "{t}No{/t}", "GroupName": "Employed", "GroupCaption": "{t}Employed{/t}", "Formula": "col.colemployed == 0", "ServerFormula": "Employed = 0", "Multiselect": false }, { "ID": 25020, "TableID": "Employee", "Description": "Denmark2", "GroupName": "Department", "GroupCaption": "{t}Department{/t}", "Formula": "col.colname.indexOf(\"Denmark2\") >= 0", "ServerFormula": "DepartmentCode = 'DENMARK'", "Multiselect": true }, { "ID": 25021, "TableID": "Employee", "Description": "Romania", "GroupName": "Department", "GroupCaption": "{t}Department{/t}", "Formula": "col.colname.indexOf(\"Romania\") >= 0", "ServerFormula": "DepartmentCode = 'ROMANIA'", "Multiselect": true }, { "ID": 25022, "TableID": "Employee", "Description": "Germany", "GroupName": "Department", "GroupCaption": "{t}Department{/t}", "Formula": "col.colname.indexOf(\"Germany\") >= 0", "ServerFormula": "DepartmentCode = 'GERMANY'", "Multiselect": true }, { "ID": 25031, "TableID": "Employee", "Description": "ABC", "GroupName": "Department", "GroupCaption": "{t}Department{/t}", "Formula": "col.colname.indexOf(\"ABC\") >= 0", "ServerFormula": "DepartmentCode = 'TEST'", "Multiselect": true }, { "ID": 25036, "TableID": "Employee", "Description": "N24 DK Albertslund", "GroupName": "Department", "GroupCaption": "{t}Department{/t}", "Formula": "col.colname.indexOf(\"N24 DK Albertslund\") >= 0", "ServerFormula": "DepartmentCode = '600'", "Multiselect": true }, { "ID": 25106, "TableID": "Employee", "Description": "Hillerød", "GroupName": "Department", "GroupCaption": "{t}Department{/t}", "Formula": "col.colname.indexOf(\"Hillerød\") >= 0", "ServerFormula": "DepartmentCode = '602'", "Multiselect": true }, ]


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

SQL Procedure 

sp_GetFilter