I have a RESTful Service that accepts a bind value to a query that ORDS will run for me.
How do I pass that bind to ORDS?
You can do it explicitly be defining it as part of the URI.
Or, you can use the classic web ?var=value to pass it.
ORDS supports both 🙂
The only difference is the URI itself.
Easy, just include it on the call.
So, which one to use? I imagine it’s a matter of personal preference. For me the former seems more COLLECTION/RESOURCE-RESTy, and the latter seems more flexible.
7 Comments
Thx. But how can I specify that a parameter is mandatory for the generated swagger? It seems that URI parameters are mandatory in swagger (obvious), put QUERY parameters are always optional.
If it’s mandatory implement it as a parameter i.e. /ords/hr/departments/:id/manager
This is very helpful. Per the note above, if additional parameters are added with an &, ORDS creates bind variables automatically.
However, upon doing the following I see a 400 bad request error.
ords/schema_name/other_text?parameter1=12&limit=10
If I remove ‘limit’, this works. Even if I change the parameter to “Limit” it works. Is there a way to use this URI with the parameter ‘limit’? I am on APEX 20.1 Thanks in advance for your help!
limit is a reserved word, change it to something else if you’re going to use it as a parameter
‘Get Table Data Using Paging:/ords///?&limit=
Example: GET http://localhost:8080/ords/ordstest/emp/?offset=10&limit=5‘
This example specifies the offset and limit parameters to control paging of result
data.
Pattern: GET http://
offset=
I have a SQL based GET handler, and if I call it, i only get 2 records
http://localhost:8080/ords/hr/eco/employees/rich?limit=2
But i can’t have a parameter named ‘limit’ – it’s reserved.
hi, please guide me for Template URI with multiple bind variables the correct syntax
uri/:p_id
how i can add more bind variables? i am using oracle apex interface SQL Workshop -> RESTful Services
thanks n regards
Just add them to your template
/something/:x/else/:y
/something/:x/:y/:z
…
Thanx man. You saved my life after migrating to Apex 18 from 4.2. I cannot change other external application behavior with REST calls with “old style” URI templates and I was terrified after getting “URI Template may contain only alphabetic, numeric, underscore, dash, period, and forward slash characters, or may contain a single trailing asterisk.” message from REST modules designer… Now I know how to design them I can still use “old style” URI call 🙂