Page 1 of 1

Http Connector Issue

Posted: Tue Aug 02, 2016 2:15 pm
by rickymartin06

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 (17.63 KiB) Viewed 6617 times

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

Re: Http Connector Issue

Posted: Tue Aug 02, 2016 4:09 pm
by rickymartin06
This is the screen with the issue ... tart_date=${BEGINDATE}

Untitled6.png (47.04 KiB) Viewed 6608 times

Re: Http Connector Issue

Posted: Wed Aug 03, 2016 12:54 pm
by cholastal

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: 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.

Re: Http Connector Issue

Posted: Wed Aug 03, 2016 7:25 pm
by rickymartin06
It worked flawlessly with your parameter example, Thanks.

Re: Http Connector Issue

Posted: Tue Nov 01, 2016 10:18 pm
by jcshep
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.

Re: Http Connector Issue

Posted: Mon Jun 29, 2020 12:57 am
by pfield

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?


Re: Http Connector Issue

Posted: Wed Jul 08, 2020 7:28 pm
by jandikovae
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("!=" + $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

Re: Http Connector Issue

Posted: Tue Aug 11, 2020 6:23 pm
by pfield
Hi Eva,

Thank you for this. Yes your solution works great - only just got round to testing now!

Kind Regards,