Hello,

We have a requirement in our API management system which is to auto-discover REST APIs created in certain modules, so that system can automatically show them in a pool for manual publish for client subscription. And system can auto-check the health of published APIs and send notification in case any change to the API.

But we are not able to find any forge component or documentation about how to retrieve Outsystems REST APIs, we found metadata table ossys_Rest_Expose, but it's high level, no details about APIs and its structure, anyone has idea?

Solution

Hi Huiping,

Hi you can use the https://www.outsystems.com/forge/component-overview/2146/extended-metamodel component that exposed the REST_Expose entity.You need from RichWidgets the GetServerName() action.

You need the URL property and prefix it with your server name and espace name to get to the OutSystems generated documentation. If you suffix it with "swagger.json" you will get the generated JSON file.

Long story short, if you download the attached OAP you can see how it works. 

The two links for the swagger file and the documentation you could refactor into download links or write them to disk or whatever you want to do with the content.

Regards,

Daniel

Solution

Hi Daniël,

Great idea of leveraging on swager.json, and the sample clearly represents the point, thank you!