โ01-28-2021 06:40 AM
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.
โ01-29-2021 07:24 AM
Do you have the โ=โ sign enabled to make it evaluate as an expression and not just plain text?
โ01-29-2021 07:33 AM
I get this error:
Could not compile expression: https://serviceurl โฆ (Reason: Encountered extraneous input โ:โ at line 1:5; expecting={, โ||โ, โ&&โ, โ^โ, โ==โ, โ!=โ, โ>โ, โ<โ, โ>=โ, โ<=โ, โ+โ, โ-โ, โ*โ, โ/โ, โ%โ, โ?โ, โinstanceofโ, โinโ, โmatchesโ, โ[โ, โ(โ, โ.โ, PropertyRef}; Resolution: Please check expression syntax)
Query parameter looks like this:
incase the image doesnโt work:
Query parameter | Query parameter value
query | encodeURIComponent(โselect * from mytable where id < 1000โ)
โ01-29-2021 09:17 AM
using your expression I am seeing this result:
โ01-29-2021 09:21 AM
It is not necessary to use encodeURIComponent. The REST Get snap will properly encode the query parameter values. Can you please show the full configuration of your REST Get snap?
โ01-29-2021 09:23 AM
I also have to say that providing a REST service which accepts a SQL command to execute against your database seems like a rather significant security vulnerability.