Thanksgiving Week Special – Get 50% OFF on FileTranz

Claim Your Offer

Exploring MuleSoft API Manager In Anypoint Platform

Explore MuleSoft API Manager and understand what its key features, API Instances, API Groups, AI Management, Automated Policies, Client Applications.

By Prasanna Saravanan
Assistant Software Developer

Exploring MuleSoft API Manager in Anypoint Platform

Initially, I was not fully clear about these concepts on API Manager, so I spent much time for learning and understanding the concepts in API Manager. After going through the topics, I prepared this blog with the concepts and practical understanding I gained. Let me share what I have learned about the API Manager.

API Manager:

The API Manager is a main component of MuleSoft that will helps to govern and manage our APIs effectively throughout their life cycle. With the help of API Manager, we don't need to manage our APIs individually. It allows developers to enforce certain policies, track, monitor, and control the API instances individually or all together from one platform.

For instance, companies can use this feature to manage their employee, customer, and payment APIs effectively. After deploying these API, the business can control and monitor them using the API Manager. In this part, the organization can enforce policies such as client ID enforcement, rate limiting (Maximum number of hits or request for our API at a particular time period), and OAuth 2.0, among others. Developers can oversee the performance of the API and ensure there is no unauthorized access to the system.

To use the API manager first you login to your Anypoint Platform account, In the home page select the APIs, In the dropdown you can see the API Manager. 

 

In Anypoint platform, Design Center are used to write the API specification (RAML/OAS), and runtime manager is used to (like Cloud Hub or on-premises servers) host the actual running application, API Manager acts as the Centralized layer that works between consumers and your backend services.

Environment Switcher (Sandbox):

Environment switcher enables users to switch between different working environments such as Sandbox, Design, and Production in MuleSoft. These working environments help different departments work on different stages of the development and design of the API. For instance, developers can work on the Sandbox environment to design, test, and apply changes to the system without affecting other system operations.

Once changes have been made to the Sandbox environment, the amended version can be promoted to the production environment through the organization’s deployment pipeline. Thus, the environments ensure that changes to the system are made safely and with confidence without disturbing the performance of other departments.

API Management:

API Instances:
  • The list of registered API endpoints managed in the environment. Here we can add a policy to our API.
  • Which helps to connect the API manager and Runtime manager with the help of Auto Discovery function (This function act as a bridge that links your running Mule application in Anypoint Studio to API Manager, allowing policies to apply dynamically without code changes).
  • With out the Instance ID (A unique number assigned by API Manager created to identify, control, and associate a particular API deployment with its management policies), the runtime manager cannot identify what policies are applied like ClientID Enforcement, Rate Limiting policies, Cross origin policies etc.
 
API Groups:
  • API Groups provide a convenient way to organize a set of related APIs. The grouping can be achieved by putting together APIs that support similar applications and business functions.
  • For example, an e-commerce application can have several APIs, including order, customer, and payment APIs. Such services can be organized into one “Mobile App API Group.” which will ease the access control to these APIs. when a client application wants to use these APIs, it will be enough to obtain the necessary credentials and permissions for a group rather than for individual APIs.

 

AI Management:

LLM Proxies & Semantic Service Configuration:
  • LLM Proxies and Semantic Service Configuration help organizations manage and control how AI and generative AI models are used within their applications. They provide a centralized way to route AI requests, apply security controls, monitoring the usage, and manage interactions with different language models.
  • LLM Proxies: Here we can see and manage our LLM.
  • Semantic Service Configuration: Here we can add or configure our LLM.
  • For example, if a company uses some models such as OpenAI, Anthropic, or internal models, MuleSoft LLM Proxies can manage the prompts and responses of these models. Thus, it may help the companies to control the number of tokens, prevent malicious requests and unwanted prompts, track the use of the model, and save the responses for similar prompts by using semantic caching. It will enable the organizations to get more power and control the use of AI, save the API calls in the paid models, and reduce the cost.
Agent and tool instances:
  • Agent and Tool Instances offer a unified approach to managing AI agents and the specific tools or APIs that individual agents can utilize. This method allows an organization to establish and maintain control over how their particular AI agent operates in relation to other backend systems and what precisely the AI is permitted to do.
  • For instance, an AI agent might be required to interact with customer data, generate new entries in a database, or update existing data records. By implementing the described method, one can ensure that only authorized operations take place, thus providing an additional level of control and security when dealing with enterprise systems and AI agents in general.
 
Difference between LLM Proxies, Semantic Service and Agent & Tool Instances:

Feature

What It ProtectsWhat It ProtectsSimple Real-World Example
LLM ProxiesPrompt & BudgetSits in front of models like OpenAI to mask sensitive data (passwords, cards) and enforce token limits.Hides a user's credit card number before sending the text to ChatGPT.
Semantic ServiceCost & SpeedUnderstands the meaning of a query to return cached answers for similar questions without calling the model again.Knows "Track my order" and "Where is my package?" mean the same thing, saving you API costs.
Agent & Tool InstancesBackend SystemsManages autonomous AI bots and limits which internal APIs (Tools) they are allowed to execute.Manages autonomous AI bots and limits which internal APIs (Tools) they are allowed to execute.

 

Automated Policies:

  • Policies that are applied to all of your APIs in an environment by default, without having to configure them individually for each one.
  • Your company’s security policy requires that all of your APIs log their traffic and validate an OAuth token. Instead of asking all your developers to add this capability to their 50 APIs, your admin can configure an Automated Policy that will automatically enforce logging and token validation for all APIs in that environment.

     

Client Applications:

  • Client Applications is a workspace in which applications that seek to use your APIs can be managed. This allows API owners to monitor the applications that are using their APIs and set limits per application.
  • For example, if a mobile bank application wanted to use your APIs, the developer or user want to give request to access your APIs via Exchange. You, as an API owner, can then review the application's request in the Client Applications workspace and allow to use. The developer or user can use your APIs with the help of the Client ID and Client Secret it has been issued in the Exchange.

 

Key Take aways:

  • Zero-Code Security: We don't need to write or change a code to manage our APIs. Instead of writing code the API manager will do all kind of works in simple manner.
  • Flexible Scope & Automation: From single API to full environment policy enforcement - define and enforce rules with just a few clicks.
  • Ready for the AI Era: Secure not only standard REST APIs but also generative AI prompts, limit token spend and prevent rogue autonomous AI agents from doing unwanted things in your backend.
  • Instant Sync via Autodiscovery: Every policy change in the cloud will be instantly enforced by your running application.

CONCLUSION:

In this blog, we explored the core architecture and core functional areas of MuleSoft API Manager, in our next blog we will see about, how to take API Instance ID and how to use that ID, we can apply and manage our policies for the particular API in the API Manager. Stay tuned.

 


free-consultation