Forum Discussion
Set the Service URL to “https://ServiceURL/services” and use the “Query parameters” table to set the query parameters. See the docs for this snap.
That is what I tried but it did not work without adding the encodeURIComponent function on the query.
My endpoint said that there were invalid characters when I did it as the document shows.
I tried putting the encodeURIComponent function into the query parameter but it doesn’t evaluate the function it sends it as text to the endpoint instead.
- cjhoward185 years agoEmployee
Do you have the “=“ sign enabled to make it evaluate as an expression and not just plain text?
- Garrett5 years agoNew Contributor II
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’)- cjhoward185 years agoEmployee
using your expression I am seeing this result:
- ptaylor5 years agoEmployee
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?
- ptaylor5 years agoEmployee
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.
- Garrett5 years agoNew Contributor II
It is not SQL. It is Oracle’s proprietary language ROQL.
I am not sure how to send you the configuration.