[Solved] Problem deleting a response via the REST API

0

I am trying to delete a survey response via the REST API.

I am passing the survey ID in the URL following /survey/ and am passing a filter to select the survey response which needs to be deleted based on the value of one of its questions.  The composed URL is as follows:

 

https://restapi.surveygizmo.com/v4/survey/#########/surveyresponse?_method=DELETE&user:pass=*******:********&filter[field][0]=[question(16)]&filter[operator][0]==&filter[value][0]=318905451

 

The reply which I am egetting back from the REST API is:

{“result_ok”:false,”code”:0,”message”:”Please specify which response you would like to delete and from what survey (DELETE)”}

I am dumbfounded since all of the data necessary to delete the response is being passed.

If I change the action to GET instead of DELETE, it is displaying the data for the response, so the filtering query is correct.  I believe this may be a bug, so I will report it there as well.  API Docs state that the the DELETE action exists, but does not elaborate any further.

 

 

Benjamin Krajmalnik asked

    Best answer

    0

    I think the issue here is the filtering…

    The document entry on the delete option requires both the survey ID and response ID to effectively delete a response:

    https://apihelp.surveygizmo.com/help/article/link/surveyresponse-sub-object#deleteobject

    Does not look like you can delete a response based on an answer to a specific survey question.

    Dominic Sharpe answered
      ×

      Login

      Question stats

      • Active
      • Views775 times
      • Answers1 answer
      • Followers0 followers