top of page

MuleSoft API Governance: Guide for Better API Quality

Updated: Sep 4, 2023

API Governance

Usual tendency of every API developer,designer is to finish API design as quick as possible and put it through development phase, they usually ignore importance of API design,documentation which cost them later in the stage when API development is finished and some one wants to explore their API.

API documentation is not clear enough

API Authorization/Authentication pattern is not explained

Header Parameter description is not user friendly.

Example for request/response doesn't match or missing from API document.

I am sure you have faced this during integration with any API. You have investigated and invested no of hours to do seamless integration with those API's. Third party would have faced same challenge while integrating with your API. To Avoid such time investment, support and maintenance on API integration, API Governance plays a vital to make sure API Quality is up to mark and followed best practices.


API Governance is a feature on Anypoint platform which provides governance rules on your API which are in design or stable state.

API Governance can be applied to your API at any stage of API Life cycle. Its better to be early than too late. Governance provide below benefits -

  • Improve API Quality

  • API follows Best Practices

  • Consistent rules at design time

  • Enforce governance to keep API quality up to the mark.


Let me walk you through API Governance and how to use it on Anypoint Platform.

Prerequisite - You must have the Anypoint API Governance administrator permission

Step 1 -> Add tags and categories to API assets in exchange which will help you to add tags/categories in filter criteria while applying governance profile.

Step 2 -> Go To API Governance -> click on New Profile

Add Profile Name and Purpose(optional)

Step 3 -> Search Rulesets (custom or Mulesoft provided)

API Governance Profile

Step 4 -> Filter API List using Tags/ categories/ API Type or API lifecycle

Filter criteria matched API List will be shown on same page

Step 5 -> Enable Notification and recipient contact details on Non-conformance condition

Click on Create and At real time profile will be created and API Governance Dashboard will display Profile status,Non-conformant Assets

API Governance Dashboard

API Governance Dashboard

Monitoring API Governance Profile

Once you have applied api governance profile to selected API's you can see result or governance report on API Governance Dashboard.

You can select Governance profile have below status

  1. Normal - More than 70% of APIs are conformant

  2. At Risk - Less than 70% of API are conformant (You should take action)

You can click on profile name link and open up individual profile report which will show no. of API's, Nonconformance API's Time in Risk(no of day's API's are not following Governance rules)

Each Individual API conformance details can be found by expanding API Name. You can click on violations/warning or info link to see which rules are not followed while designing API.

You can export these reports as well as edit Profile settings.

You have option to Notify owner of the API regarding non-conformance report. Export individual API non-conformance report or Open API in exchange.

Conformance Status in Exchange

Another way to look at conformance status on any API is to go on anypoint exchange and select stable/development version and next to it ,will be conformance status ( governance profile name will be shown on mouse hover)

Custom Governance Rulesets

Apart from having Mulesoft provided Governance rulesets, you can create your own custom ruleset and publish on exchange.

Pre-requisite - you must install API Governance CLI to perform governance ruleset import, update or upload new rulesets on Excahnge.

You can find documentation to create custom ruleset on below link -

Benefits -

API Governance is like a guard on your API's which will make you follow best practices, your API design comply to rules defined and finally it will bring seamless integration with your API.

This is quick glance on API Governance provided by Mulesoft. Let me your thought and feedback on it.


1 Comment

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Jun 19, 2023
Rated 5 out of 5 stars.

Good Explanation Amit. Thank you. - Pavan Nagineni

bottom of page