Forum Discussion

Garrett's avatar
Garrett
New Contributor II
5 years ago

API query invalid in SnapLogic, but valid in Postman

Split out from: 401 Error using Https in API REST GET call

Did you ever solve your issue?

I am experiencing something similar. To answer the question the User-Agent can be anything. Something like SnapLogic/version# replacing the number.

My issue is that when I run it in Postman I get results.
When I run it in SnapLogic the Server is saying that the query is invalid.

17 Replies

  • To this date nope. i have tried everything from create an SSL rest account and I am still getting the issue. The API works in postman and the browser but not the rest snap. I am out of ideas at this point

    • Garrett's avatar
      Garrett
      New Contributor II

      I was told to try something like this and it is working.

      My rest API requires a query parameter.

      http://ServiceURL?query=select * from table where id=1234

      I had put in the URL into the Service URL box and then added a query parameter called query.

      That did not work.

      What does work is this:

      https://ServiceURL /services/?query=’ + encodeURIComponent(‘select * from incidents where id < 1000’)

      And that entire line went into the ServiceURL.

      Seems that they do not fix the encoding in the query parameters.