webMethods

webMethods

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.  webMethods.io Integration: Custom Response for APIs

    Posted Tue February 25, 2025 03:37 AM

    Hi All,

    We have a Integration Flow which connects has object stream as the output. The Flow service is exposed as an API, but while adding the resource we could not add the API response to give the object stream.

    Does it not support to provide custom parameters for the API Response? If it does, can you please let us know how this can be achieved. 

    Thanks!



    ------------------------------
    Aalok
    ------------------------------


  • 2.  RE: webMethods.io Integration: Custom Response for APIs

    Posted Wed February 26, 2025 02:58 AM

    Hi Aalok,

    When ever we are creatng any API using the flow service  then input and output of the API will implicitly will be same as what you have configured in the flow service.

    There is no steps explicity need to be done for input and output definition.

    Please let me know if you are facing any issue with response difference between flow service and API exposed.



    ------------------------------
    Vikash Sharma
    ------------------------------



  • 3.  RE: webMethods.io Integration: Custom Response for APIs

    Posted Wed February 26, 2025 03:10 AM

    Hi Vikash,

    The Flow Service has the object as the response, but that is not implicitly coming in the API response.

    Thanks!



    ------------------------------
    Aalok
    ------------------------------



  • 4.  RE: webMethods.io Integration: Custom Response for APIs

    Posted Wed February 26, 2025 04:21 AM

    Hi Aalok,

    I have tried with flow service and then created the API.

    Invoked the flowservice and API using postman client. For both of them we have same response.

    Sharing the screenshot for same.

    Can you try same at your end.
    Let me know if this helps.


    ------------------------------
    Vikash Sharma
    ------------------------------



  • 5.  RE: webMethods.io Integration: Custom Response for APIs

    Posted Wed February 26, 2025 04:30 AM

    Hi Vikash,

    Thanks for the details. Will try it out and confirm you.



    ------------------------------
    Aalok
    ------------------------------



  • 6.  RE: webMethods.io Integration: Custom Response for APIs

    Posted Wed February 26, 2025 09:59 AM

    Hi Vikash,

    what do you want to achieve with the stream being returned?
    Due to the nature of a stream you are only receiving a hnadler, which cannot be accessed downstream in your application.
    Most likely you will have to convert the content of the stream into a string content and return this one instead of the stream handler.

    Regards,
    Holger



    ------------------------------
    Holger von Thomsen
    Software Developer
    Deutsche Telekom IT GmbH
    Darmstadt
    ------------------------------



  • 7.  RE: webMethods.io Integration: Custom Response for APIs

    Posted Thu February 27, 2025 01:29 AM
    Edited by Aalok Thu February 27, 2025 01:29 AM

    Hi Holger,

    That makes sense.

    The use case is more of sending a file to downstream application, where the downstream application hits the API and expect the file as API response. 

    Any thoughts?

    Thanks!



    ------------------------------
    Aalok
    ------------------------------



  • 8.  RE: webMethods.io Integration: Custom Response for APIs

    Posted Fri March 07, 2025 01:51 AM

    Hi Holger,

    I was trying to make Aalok understand when he sayd the API response is not same when compared with flow service.



    ------------------------------
    Vikash Sharma
    ------------------------------