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
  • 1.  could not conect to endpoint

    Posted Fri December 01, 2023 07:27 PM

    Hello community.
    I need help with the following:
    I'm creating an API that queries specific analytics.
    Using the IBM documentation I managed to extract the API KEY credentials, obtaining the following.
    This is a postman project that directly queries the back and extracts the token for the analytic query, but the body must be in 'x-www-form-urlencoded' format with 'grant_type' and 'apikey' variables.

    Now I am building the following flow in api connect 10

    Inside the gatewayScript I have the following:
    and in the invoke node I have the variable that contains the back endpoint, JSON type back and HTTP method POST.

    When creating my postman project with the api endpoint and sending the same variables in the 'x-www-form-urlencoded' method as indicated in the documentation, I am getting the following error:

    Can you help me resolve this error and be able to generate the token as shown by the postman project directly to the backend?
    thank you very much for your help



    ------------------------------
    JIMMY VIVAS PERILLA
    ------------------------------


  • 2.  RE: could not conect to endpoint

    Posted Mon December 04, 2023 09:37 AM

    Hi Jimmy,

    The error URL Open Error definitely points to the invoke policy being unable to connect to its endpoint.  Do you have access to the DataPower logs? If so, if you enable debug logging you should see the network log category messages associated with this connection attempt that will provide more information.
    Best Regards,
    Steve Linn



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