Reporting

  1. Creating your Reporting API User
  2. Retreiving your API Key
  3. Creating your Endpoint URL
  4. JSON request for retrieving submissions

Creating your Reporting API User

  • Create a new Reporting API User in Accounts > Reporting
  • Click on Add New
  • You can now create your Reporting API User:
    • Add a Name
    • Select the Is API User checkbox
    • Press Submit
  • You now need to assign reports to this new API User by clicking on the Reports button in the user account list:
    • Click on Add New
    • Start typing in the textfield to find your report and select it
    • Press Submit

Retreiving your API Key

  • On the main user account list click on the Edit button
  • Here you must take a Copy of your Key

Creating your Endpoint URL

  • Your Endpoint URL will be: https://subdomain.staffed.it/reporting/api/get-data/{report-id}
    • Where subdomain is the subdomain of your system
    • Where {report-id} is the report id of each report and can be retrieved from two places
      • On the main user accounts list
        • Go to Accounts > Reporting
        • Click on the Reports button
        • The number is the first column in the Report ID
      • In the main Reporting section of the system
        • Go to Reporting > View Reporting
        • The first column in the list is the Reporting ID

JSON request for retrieving submissions

  • Request the body in JSON format
    {
    "token":"your-token-here",
    "exportFormat":1,
    "dateStart":"2021-03-31",
    "dateStop":"2021-04-30"
    }
    • token
      • This is mandatory
    • exportFormat
      • This is optional
      • Values can be 0, 1 or 2
        • 0 = Export CSV file with multiple value questions as one row
        • 1 = Export CSV file with multiple value questions as one row and with a static number of columns.
          • Typically useful if you have logic added to your survey to keep every export consistent
        • 2 = CSV Export file with multiple value questions over multiple rows
    • dateStart
      • This is optional
      • ISO format YYYY-MM-DD
    • dateStop
      • This is optional
      • ISO format YYYY-MM-DD
  • API responses HTTP CODES:
    • 400
      • Incorrect request.
        • If there's a specific error such as exportFormat incorrect or Wrong date then there will be an error message
    • 401
      • Auth error
        • No token or user inactive, etc
    • 403
      • Access denied for this report
        • Report not added or does not exist
    • 200
      • All is fine, and you have a CSV as the output