Solved

PLSQL REST Sender API - Call REST endpoint

  • 21 July 2021
  • 6 replies
  • 68 views

Badge +3

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 ?

icon

Best answer by chriselliston 22 July 2021, 17:10

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.

View original

6 replies

Userlevel 4
Badge +5

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

Badge +3

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.

Regards

Chris

Userlevel 5
Badge +8

Hi chriselliston,

 

hope this will helps

https://docs.ifs.com/techdocs/foundation1/040_administration/240_integration/300_ifs_connect/010_configure_connect/060_transport_connectors/configure_rest_transport_connector.htm

 

Regards,

Sahan

Userlevel 4
Badge +5

Hi @chriselliston ,

 

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

Badge +3

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

Badge +3

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.

Reply