Summary of Services


Note: To use the examples you will need to enter a user id and password. However if you are already logged on to the server you should see your data.

  • user: api
  • password: api

Submitted Results


Service Format Description Version Example
/api/v1/data JSON Get a list of services to retrieve form data 15.12+ https://sg.smap.com.au/api/v1/data
/api/v1/data/{key} JSON Get submitted data from a form. {key} is the survey id which can be found in the list of services. 15.12+ https://sg.smap.com.au/api/v1/data/1778
/api/v1/data.csv CSV Get a list of services to retrieve form data 15.12+ https://sg.smap.com.au/api/v1/data.csv
/api/v1/data.csv/{key} CSV Get submitted data from a form 15.12+ https://sg.smap.com.au/api/v1/data.csv/1778

Filters

Filter Description Version Example
start Retrieve data from the specified primary key 15.12+ https://sg.smap.com.au/api/v1/data.csv?start=2
limit The number of records to retrieve 15.12+ https://sg.smap.com.au/api/v1/data.csv?start=2&limit=1

Task List


This service is a Smap specific extension to the kobo api

Service Format Description Version Example
/api/v1/tasks JSON Get a list of tasks 16.03+ https://sg.smap.com.au/api/v1/tasks

Filters

Filter Description Version Example
user The user id. (optional) 16.03+ https://sg.smap.com.au/api/v1/tasks/stats?x=scheduled&group=status&user=2

Task Statistics


This service is a Smap specific extension to the kobo api

Service Format Description Version Example
/api/v1/tasks/stats JSON Get statistics on tasks. In version 16.03 and below of the Smap server this only returns data on tasks that have been assigned to a user. 16.03+ https://sg.smap.com.au/api/v1/tasks/stats?x=scheduled&group=status

Filters

Filter Description Version Example
x X axis value. (Required) Alternatives:
  • scheduled
16.03+ https://sg.smap.com.au/api/v1/tasks/stats?x=scheduled&group=status
group Group results by this parameter. (Required) Alternatives:
  • status
16.03+ https://sg.smap.com.au/api/v1/tasks/stats?x=scheduled&group=status
user The user id. (optional) 16.03+ https://sg.smap.com.au/api/v1/tasks/stats?x=scheduled&group=status&user=2
period Group results by this time interval. (Optional) Alternatives:
  • day
  • month
  • year
  • week
16.03+ https://sg.smap.com.au/api/v1/tasks/stats?x=scheduled&group=status&period=month