Customer Portal

Http Connector Issue

Comments 7

  • Avatar
    rickymartin06
    0
    Comment actions Permalink
    This is the screen with the issue
    https://api.ncrsilver.com/Employees/Tim ... tart_date=${BEGINDATE}

    Untitled6.png
  • Avatar
    Lukas Cholasta
    0
    Comment actions Permalink
    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.
  • Avatar
    rickymartin06
    0
    Comment actions Permalink
    It worked flawlessly with your parameter example, Thanks.
  • Avatar
    jcshep
    0
    Comment actions Permalink
    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.
  • Avatar
    pfield
    0
    Comment actions Permalink
    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
  • Avatar
    admin
    0
    Comment actions Permalink
    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
  • Avatar
    pfield
    0
    Comment actions Permalink
    Hi Eva,

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

    Kind Regards,
    Paul

Please sign in to leave a comment.