Skip to main content

So related to this https://help.mulesoft.com/s/question/0D56R00008i6Cj3SAE/is-there-a-tool-to-show-all-runtimes-all-their-apis-and-any-contracts

 

I tossed together some java code as a POC.

 

The main thing it does is to:

  1. Get all applications
  2. Check to see if they have an API instance, regardless of name
  3. Get any apis tied to the instance ids, if more than one like we have in some cases.
  4. Get any contracts tied to those APIs
  5. Make a list of the above in JSON format
  6. Find and list any orphan applications and apis and add those to the JSON Array

 

The issue is below:

  1. Applications = 1 call to the REST API (v2)
  2. API = 1 call to the REST API (v1)
  3. Contracts require a call for each one to the REST API (v1)

 

This of course just spams the endpoint but I could not find an alternate v1 or v2 way of getting them.

 

We plan to further develop a stack list from the external app, through the apis, to the source system. As such I want to avoid spamming the REST API as much as possible.

0/9000