"No matches found" error when using Response API to delete a response | Community
Skip to main content
Answered

"No matches found" error when using Response API to delete a response


Hi all,

I’m having some issues I really cannot seem to solve with the Response API.

Here’s an example of a get request I write and its response:

~ % curl --request GET \   
  --url https://api.typeform.com/forms/H81Mb7nu/responses \                                                    
  --header 'Authorization: Bearer <my_access_token>'
{"total_items":1,"page_count":1,"items":[{"landing_id":"69fe75dceuwxdbxya69fe75bjjmk9jb1","token":"69fe75dceuwxdbxya69fe75bjjmk9jb1","response_id":"69fe75dceuwxdbxya69fe75bjjmk9jb1","landed_at":"2022-03-22T19:19:15Z","submitted_at":"2022-03-22T19:19:21Z","metadata":{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.83 Safari/537.36","platform":"other","referer":"https://03s53lbqr3z.typeform.com/to/H81Mb7nu","network_id":"95ff44c264","browser":"default"},"hidden":{},"calculated":{"score":0},"answers":[{"field":{"id":"C3XSLyaFknzB","ref":"9928b5837d1b5b8a","type":"yes_no"},"type":"boolean","boolean":true},{"field":{"id":"d92iC0mopIVO","ref":"b8fe21c6-6934-4bef-93d9-c257e7bf11d9","type":"picture_choice"},"type":"choice","choice":{"id":"zdAXVyrGmJEE","ref":"23408126-4940-4e97-a664-32d869178cb1","label":"So-so"}},{"field":{"id":"gBITsh1OD3F8","ref":"0030c67f-be98-47fb-9776-3b22a85d4c20","type":"number"},"type":"number","number":1}],"variables":[{"key":"priority","type":"number","number":2},{"key":"score","type":"number","number":0},{"key":"timefactor","type":"number","number":1.25}]}]}

Now here’s the delete request I send and its response:

~ % curl --request DELETE \
  --url https://api.typeform.com/forms/H81Mb7nu/responses?included_response_ids=69fe75dceuwxdbxya69fe75bjjmk9jb1 \  
  --header 'Authorization: Bearer <my_access_token>'
zsh: no matches found: https://api.typeform.com/forms/H81Mb7nu/responses?included_response_ids=69fe75dceuwxdbxya69fe75bjjmk9jb1

Frankly I have no idea what I could be doing wrong here. I am directly copying and pasting the response_id from my get request.

Any insight would be excellent!

Thank you.

Best answer by mathio-tf

Hello @rholo and @Liz 

the issue here is not with our API, but rather with your zsh shell. As you can see, your curl command is not executed (the request never reaches our servers) because your shell is treating the question mark ? as wildcard. The error message is from your shell, not our API:

zsh: no matches found

I think the best way to fix this would be to wrap the URL in single quotes like this:

curl --request DELETE \
  --url 'https://api.typeform.com/forms/H81Mb7nu/responses?included_response_ids=<id>' \  
  --header 'Authorization: Bearer <my_access_token>'

 

View original

2 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14960 replies
  • March 22, 2022

@mathio have you seen this issue before? It looks like everything is setup correctly to me. 


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • Answer
  • March 23, 2022

Hello @rholo and @Liz 

the issue here is not with our API, but rather with your zsh shell. As you can see, your curl command is not executed (the request never reaches our servers) because your shell is treating the question mark ? as wildcard. The error message is from your shell, not our API:

zsh: no matches found

I think the best way to fix this would be to wrap the URL in single quotes like this:

curl --request DELETE \
  --url 'https://api.typeform.com/forms/H81Mb7nu/responses?included_response_ids=<id>' \  
  --header 'Authorization: Bearer <my_access_token>'

 


Reply