API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How to pass the queryparameter value in get call (from api connect to app connect)

  • 1.  How to pass the queryparameter value in get call (from api connect to app connect)

    Posted Fri February 18, 2022 04:26 AM
    Hi,
    I have created a get call api in api manager and connected to app connect using invoke node...But whatever the query parameter I'm passing in api connect is not passed to app connect...Tried setting in headers using xslt... but still I'm not able to achieve that.
    using this command in xslt:
    <apigw:set-header message="data" name="X-Query-String" value="123123"/>


    Please help me out in this. Helping hands are greatly appreciated..


    ------------------------------
    Kothaai R
    ------------------------------


  • 2.  RE: How to pass the queryparameter value in get call (from api connect to app connect)

    Posted Mon February 21, 2022 03:13 AM
    Hi Kothaai,

    The Query parameters and Headers are different concepts,

    You can achieve by following this:

    1. In the API Paths section you need to select Get operation and in parameters section inside the Get operation add query parameter name and select located option is Query.
    2. add this same parameter which you added in Get operation for esb backend URL also with '?'

    ------------------------------
    kandula nagababu
    ------------------------------



  • 3.  RE: How to pass the queryparameter value in get call (from api connect to app connect)

    Posted Mon February 21, 2022 08:27 AM

    Hi Korhaai,
    Depending upon your gateway version, v5/v5c or the v10 API Gateway, there are some choices.

    1. For both v5/v5c and the API Gateway, your target url can be something like https://backendhost:port/url?X-Query-String=$(request.parameters.x-query-string).  In this case the request query parameter value will be substituted into the target url

    2. For the API Gateway only, in the invoke policy under "parameter control" select the "Allow list" radio button, and then specify x-query-string in the allow list and it will propagate just that query header.  This list also supports regular expressions, so .* will allow all request query parameters to be propagated, ^x- will allow all request query parameters that start with an x-, etc.

    Regards,
    Steve



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------