Http Connector Issue

Support/help with CloverETL (4.9) and CloverDX (5.0 or newer) implementation problems

rickymartin06
Posts: 23
Joined: Tue Jun 14, 2016 3:19 pm

Http Connector Issue

Postby rickymartin06 » Tue Aug 02, 2016 2:15 pm

Hi,

Im triying to pass 2 values withing the URL property in the HTTP Connector but is not working, am i having any syntax error?

I send an api token in the additional http header property and is working.

When i send the url string with ${BEGINDATE},${ENDDATE} is not passing the values any thoughs?

Thanx in advance.



Metadata containing TOKEN, ENDDATE,BEGINDATE:
Untitled4.png
Untitled4.png (17.63 KiB) Viewed 4171 times



HTTP Headers are working, URL parameters not working.
Untitled3.png
Untitled3.png (37.74 KiB) Viewed 4171 times

rickymartin06
Posts: 23
Joined: Tue Jun 14, 2016 3:19 pm

Re: Http Connector Issue

Postby rickymartin06 » Tue Aug 02, 2016 4:09 pm

This is the screen with the issue
https://api.ncrsilver.com/Employees/Tim ... tart_date=${BEGINDATE}

Untitled6.png
Untitled6.png (47.04 KiB) Viewed 4162 times

cholastal
Posts: 137
Joined: Tue Sep 01, 2015 1:22 pm

Re: Http Connector Issue

Postby cholastal » Wed Aug 03, 2016 12:54 pm

Hi,

It looks like you are mixing two different approaches together.

    1. Passing CloverETL parameters as request parameters - If you have some CloverETL parameters defined (Designer -> Outline window -> Parameters), then you can pass them via ${PARAM} syntax.

    2. Passing data from an edge as request parameters - If the parameter value is passed via an input edge, you can simply set the Add input fields as parameters of the HTTPConnector to true. This way every data coming from the input edge of the HTTPConnector will be sent as a request parameter. The name of the metadata field will become the name of the parameter and the data itself will be the value of that parameter.

Attached is an example graph where both solutions are shown. The graph uses RequestBin page for testing, so you can see your requests here: http://requestb.in/vepx9tve?inspect. The bin is preserved only for a limited amount of time so if it's no longer available, you can set up a new one for free.

More information can be found in our documentation. Should you have some follow-up questions, please don't hesitate to ask.

Hope this helps.
Attachments
http_connector_w_param.grf
(4.83 KiB) Downloaded 210 times

---
Lukas Cholasta
CloverCARE Support
CloverDX

Visit us online at http://www.cloverdx.com

rickymartin06
Posts: 23
Joined: Tue Jun 14, 2016 3:19 pm

Re: Http Connector Issue

Postby rickymartin06 » Wed Aug 03, 2016 7:25 pm

It worked flawlessly with your parameter example, Thanks.

jcshep
Posts: 1
Joined: Tue Nov 01, 2016 10:12 pm

Re: Http Connector Issue

Postby jcshep » Tue Nov 01, 2016 10:18 pm

Hi, this thread came up in my research of the NCR Silver API. @rickymartin - where did you find the documentation needed to integrate with the NCR Silver API? Your help is much appreciated.

pfield
Posts: 9
Joined: Thu Mar 19, 2020 3:46 pm

Re: Http Connector Issue

Postby pfield » Mon Jun 29, 2020 12:57 am

Hi,

I found this thread whilst trying to configure my HTTPConnector for a REST API call. One issue with the "Add input fields as parameters" function is that Clover metadata only allows certain characters. In my case the API parameter contained an exclamation mark (!) which meant I could not pass the parameter since I cannot have a metadata field which contains "!". The alternative is to use a fixed parameter from a .prm file, which without jobflows (requires server license), can't be updated dynamically if you want to call the same API multiple times using different values on your input port.

Would be interested to hear if there is a workaround? If not, I think that the "Add input fields as parameters" checkbox should be review to perhaps accept a metadata field label instead?

Paul

jandikovae
Posts: 43
Joined: Fri Nov 04, 2016 8:51 am

Re: Http Connector Issue

Postby jandikovae » Wed Jul 08, 2020 7:28 pm

Hi Paul,

You are right, the Field name is an internal CloverDX denotation where only letters, numbers, and underscore (_) are allowed. This works as designed even though it obviously limits the "Add input fields as parameter" function to be suitable only for those parameters whose names don't include any special characters.

However, I believe that the input port can be used anyway. You can use a Reformat component to add the query field to your URL itself and map the field to the URL attribute in the HTTPConnector. In more detail:

The Reformat component should be right before the HTTPComponent and the transformation function would then look as follows:

$out.0.URLfield = escapeUrl("https://number.m.pipedream.net?field!=" + $in.0.parameter_field);

As I used "escapeUrl" function, I don't need to worry about the exclamation mark in the field name. Also, the "escapeUrl" assures that whatever is the value of the field will be encoded to be suitable to URL syntax as well.

Then, the URL attribute in HTTPConnector can stay empty and we can map the input port to the URL field within the Input mapping attribute.

I am including an example graph for review. Please let me know if this meets your needs.

Thanks, Eva
Attachments
http_connector_w_param-updated.grf
Example Graph
(5.02 KiB) Downloaded 1 time
---
Eva Jandikova
CloverCARE Support
CloverDX

Visit us online at http://www.cloverdx.com