Genesys Engage on-premises

 View Only
Discussion Thread View
  • 1.  GIA iHub with REST API Call

    Posted 04-12-2021 13:59
    It is hard finding information regarding creating a REST API call within iHub's Integration
    I am trying to create a GET REST call that would return a JSON response using the parameter of an email.  I am having a difficult time with the syntax of the request.
    For example, our REST call should look like this:

    http://people.abc.alpha.abcinc.com/search/ops?Email=John.smith@abcinc.com

    I use a variable to pass the email address, however, the request fails. It appears that Integration adds a ':' to the string that I using as the email variable.

    Here is the script:
    sEmail is being passed in as John.smith@abcinc.com

    Map<String,String>params = new HashMap<String,String>()
    params.put("Email=",sEmail);

    I can see from the logs that the value of the Email for the call becomes:
    Parameters [Email=:John.smith@abcinc.com]

    How do I create the correct syntax to not include the ':' ?

    #Integrations

    ------------------------------
    Le Tien
    Kaplan University
    ------------------------------


  • 2.  RE: GIA iHub with REST API Call

    Posted 06-07-2021 00:21

    Hi Le,

    I've recently started working with REST APIs in iHub as well. You should remove the '=' from the script as it's not required:

    params.put("Email",sEmail);

    Since this is a Map object, the Key and Value pair are separated by the colon automatically, hence it appearing in your logs.



    ------------------------------
    Oscar Alvarez
    Link Market Services Limited
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources