Usage


The usage API allows you to view the number of submissions made by each user in a month. These can be further broken down by project and survey.

To use these functions you will need "admin" privilege

Methods

URL Request Type / Format Description Version Example
/surveyKPI/adminreport/usage/ {year}/ {month} GET / Excel File The number of submissions in the specified month by user 18.10+ https://sg.smap.com.au/surveyKPI/adminreport/usage/2018/1

Parameters

Parameter Description Version Example
year Specify the year of the data to be retrieved (required) 18.10+ https://sg.smap.com.au/surveyKPI/adminreport/usage/2018/1
month Specify the month of the data to be retrieved (required). Must be between 1 and 12 inclusive. 18.10+ https://sg.smap.com.au/surveyKPI/adminreport/usage/2018/1
project=true Show usage by project as well as user 18.10+ https://sg.smap.com.au/surveyKPI/adminreport/usage/2018/1?project=true
survey=true Show usage by survey as well as project and user 18.10+ https://sg.smap.com.au/surveyKPI/adminreport/usage/2018/1?survey=true

Resources


Resources are files used by forms. The following types of resources can be managed through the API:

  1. Media: For example a CSV file that contains choices or a photograph that is used to illustrate a choice in a select one question.

Media

Service Request Type / Format Description Version Example
/surveyKPI/upload/media GET JSON Get a list of the media available in the users current organisation. The response includes URLs to:
  • download the file
  • download a thumb nail
  • delete the file
17.10+ https://sg.smap.com.au/surveyKPI/upload/media
/surveyKPI/upload/media POST Upload a new file to the organisation. 17.10+ curl -u xxxx -i -X POST -H "Content-Type: multipart/form-data" -F "data=@phone.jpg" https://sg.smap.com.au/surveyKPI/upload/media

Parameters

Parameter Description Version Example
survey_id Retrieve a list of files or upload media only for the survey with specified id. You can also use the form field survey_id when posting media. 17.10+ https://sg.smap.com.au/surveyKPI/upload/media?survey_id=1778