Checking Total Responses for a Survey

Total Survey Responses

GET https://insight.plumvoice.com/api/surveys/{survey_id}/{instance_id}/responses

Check the total number of responses for an Insight survey.

Path Parameters

Name
Type
Description

survey_id

string

Insight survey ID number

instance_id

string

Instance number for an Insight survey

Headers

Name
Type
Description

content-type

string

application/x-www-form-urlencoded

{'success':true,'total_responses':'25'}

Possible Response Codes

  • 200: success

  • 401: authentication headers invalid or the account is inactive

  • 404: deployment or survey was not found

  • 405: invalid HTTP method supplied (only GET allowed)

  • 415: unsupported media type (Content-Type value in request)

  • 500: database error

The return structure contains the following item(s):

Name

Data Type

Always Present

Description

success

boolean

yes

Indicates the outcome of the request

error

string

no

If the success value is false this provides a message indicating what error(s) occurred

total_reponses

int

no

The total number of times the survey has been taken. This will be present when the success value is true

Sample Code

This sample PHP code makes a request to a deployed survey that returns the total number of responses:

Last updated