I’m trying to utilise the plsql_rest_sender_api.call_rest_endpoint method passing the CLOB. As soon as i try to follow the documentation to add url parameters the method fails with wrong number or types of arguments in call to ‘CALL_REST_ENDPOINT’.
My problem is, if i don’t use url parameters then i’ll need to set up multiple routing addresses for each specific endpoint. This will cause issues when the endpoint changes from test to production as i’ll need to change them all.
Has anyone managed to utilise the url_params_ functionality within plsql_rest_sender_api.call_rest_endpoint ?
Page 1 / 1
Hi @chriselliston,
First create a system parameter to store the url
INSERT INTO OBJECT_PROPERTY_TAB(OBJECT_LU,OBJECT_KEY,PROPERTY_NAME,VALIDATION_ENABLED) VALUES (:component,'SystemParameter',:parameter_name,'FALSE');
Add the value using the client according the env
Use the parameter value inside your api call (Object_Property_Api.Get_Value)
Thanks & Best Regards,
Wimali
Hi Wimali
Thanks for this.
Is this in the documentation anywhere? It’s the first I’ve seen of manually adding values to a table on this subject.
My suggestion is like a customization but please refer the Sahan’s documentation which is more suitable for your requirement.
Hi @chriselliston,
First create a system parameter to store the url
INSERT INTO OBJECT_PROPERTY_TAB(OBJECT_LU,OBJECT_KEY,PROPERTY_NAME,VALIDATION_ENABLED) VALUES (:component,'SystemParameter',:parameter_name,'FALSE');
Add the value using the client according the env
Use the parameter value inside your api call (Object_Property_Api.Get_Value)
Thanks & Best Regards,
Wimali
Thanks & Best Regards,
Wimali
I’ve followed that documentation and as soon as i try to use url_params_ in the overloaded method to pass a CLOB (plsql_rest_sender_api.call_rest_endpoint) IFS complains that i don’t have the correct number of arguments or type.
If i omit the url_params_ argument it works.
The other overloads for plsql_rest_sender_api.call_rest_endpoint don’t seem to hit the same error.
Regards
Chris
I have got it working. The documentation indicates you should call plsql_rest_sender_api.call_rest_endpoint, pass in a clob and then use documents to create the url parameters. This doesn’t seem to work.
if you call plsql_rest_sender_api.call_rest_endpoint2 you can pass in a clob and then use documents rather than records to create the url parameters as per the documentation.
Here’s an example of what I did with a few changes, hope it helps…
Some of the changes I made: Use XML of REST call for Json string, Add Text Accept to Header, use parameter of rest api in routing rule context based conditions, parameter is set in code. Any errors should show up in the application message screen in IFS. Also, Call_Rest_EndPoint2 was the only one I could get to work with the parameters I had available.
Write your PL/SQL Code, you can put your JSON in the field called XML. It’s misleading naming but it works. In my opinion there should be a JSON field. I used PL/SQL Developer and the TEST Window file to test.