Here is the command i am using to get the data.

Tried using %20, + and also quotes. Nothing seems working.

curl -g -v -H "Authorization: "XXX" --request GET \
--url https://insights-api.clavistechnology.com/api/v2/search-term-results?filter\[online-store\]=amazon&\[search-term\]=250gb%20ssd \
--header 'accept: application/vnd.api+json' \
--header 'content-type: application/vnd.api+json' --globoff 

enclosing it quotes gives < HTTP/1.1 400 BAD_REQUEST

--url "https://insights-api.clavistechnology.com/api/v2/search-term-results?filter\[online-store\]=amazon&\[search-term\]=250gb ssd" \ 

I think you need a few more quotes, and to remove one quote. I got the following to give me a Not Authenticated message:

curl -g -v -H 'Authorization: XXX' \
  --url 'https://insights-api.clavistechnology.com/api/v2/search-term-results?filter[online-store]=amazon&[search-term]=250gb%20ssd' \
  --header 'accept: application/vnd.api+json' \
  --header 'content-type: application/vnd.api+json'

I replaced the double quotes with single quotes around Authorization: XXX, and removed the double quote in the middle. I single quoted the URL too.

Hope this helps.

  • For future readers using Windows: given the `` to continue the command on the next line(s), I assume the question and answer are not for Windows. For Windows, for what I've heard, one might need double quotes for all quoted parameters. (But: I've not tested, as I'm not on Windows myself.) – Arjan Nov 12 '18 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.