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.


#API Connect
#Applicationintegration
#APIConnect
 View Only
  • 1.  I need to access the status of consumer apps to create an activity alert

    Posted Mon August 26, 2024 12:28 PM
    I need to access the status of consumer apps to create an activity alert.
     
    Hi team.
    I am currently having problems performing the following task:
    Using the toolkit I am trying to access a reserved instance, list the consumer applications and access the status of each one. This is for the purpose of monitoring and creating an alert when a consumer app is activated or deactivated.
    The CMD command I am running is the following:
    C:\localpath...>apic apps:get --catalog development --server "dataServer" --org "Organization" --consumer-org
     
    I appreciate any recommendations or commands that I can run to obtain the status of consumer apps.
     
    Thanks team


    ------------------------------
    Jimmy Perilla
    ------------------------------


  • 2.  RE: I need to access the status of consumer apps to create an activity alert

    Posted Tue August 27, 2024 02:04 AM

    What authentication are you using? API Manager credentials?

    Have you managed to run other commands successfully so you know you're logged in and authenticated correctly?

    There could be thousands of consumer apps, this does not seem a very bright way to go about this. What are you intending to do, get every single application on some kind of schedule and loop over them? That doesn't sound a great plan.

     I'm curious why too - consumers don't have access to enable or disable apps, only providers can do that from api manager so it seems an odd thing to need alerts for.

    Personally if I was doing this I would use a custom module in the developer portal that gets triggered when an app is updated, then have code to trigger whatever external endpoint you want when the status field changes.



    ------------------------------
    Chris Dudley
    ------------------------------



  • 3.  RE: I need to access the status of consumer apps to create an activity alert

    Posted Tue August 27, 2024 12:06 PM

    Thanks for your reply Chris.
    I was actually considering alternatives to be able to carry out this task of alerting when the status of a consumer app changes.
    How can I create this custom module that you mention, generating that activation when an application has an update in its status? Do you perhaps have some documentation that can guide me?
    Thanks



    ------------------------------
    Jimmy Perilla
    ------------------------------



  • 4.  RE: I need to access the status of consumer apps to create an activity alert

    Posted Tue August 27, 2024 03:54 AM

    Chris brings up a good point about scalability. While apic apps:get works, it might not be ideal for frequent monitoring.  An alternative approach could be using webhooks. You can set up a webhook in API Connect that triggers an event whenever a consumer app's status changes. This way, you only receive alerts for actual changes instead of constantly checking all apps.



    ------------------------------
    Warner Mark
    ------------------------------



  • 5.  RE: I need to access the status of consumer apps to create an activity alert

    Posted Tue August 27, 2024 12:08 PM

    Thanks for your reply Mark.
    How can I configure this webhooks in api connect? Do you have any documentation that can guide me?
    Thanks



    ------------------------------
    Jimmy Perilla
    ------------------------------