Unify Logo Footer.svg
Unify Integrations
Logo
MuleSoft

MuleSoft

Logo

3 mins READ

Use the MuleSoft connector to discover and invoke APIs managed in Anypoint Platform.

Integrating your application with MuleSoft lets you use these operations in an automation. It exposes 4 actions and 3 triggers, listed below. Add the connector from the Connections area, authenticate, then select its operations in the automation builder. Capabilities: actions, triggers.

Authentication

Before you begin, make sure you have the following information:

Connection Name: Choose a meaningful name for your connection. This name helps you identify the connection within your application or integration settings.

Authentication Type: MuleSoft authenticates with an Anypoint Platform connected app using the OAuth 2.0 client credentials grant. You supply the connected app's client ID and client secret.

Authentication & Setup

Anypoint Platform authorizes machine-to-machine access through connected apps. A connected app that acts on its own behalf exchanges its client ID and secret for a bearer token, which is then sent on each Anypoint Platform API call. Apps of this type are always assigned the profile scope implicitly; every other permission has to be added explicitly, and is granted per business group and per environment. The client ID is assigned automatically and cannot be changed, while the client secret has no default expiration but can be rotated.

Obtaining Your Client ID and Secret

  1. Log in to Anypoint Platform and open Access Management.

  2. Click Connected Apps, and select your business group if you are prompted.

  3. Click Create App and enter a unique name for the application.

  4. Select App acts on its own behalf (client credentials) as the app type.

  5. Click Add Scopes and select the scopes this connection needs — API Manager scopes to discover and monitor managed APIs, and Exchange scopes to read API specifications. The Scopes Documentation tab lists what each scope grants.

  6. Select the business groups the scopes apply to and click Next, then select the environments and click Next.

  7. Click Add Scopes, then click Save.

  8. Open the app under Owned Apps, copy its client ID and client secret, and store them securely for further authentication purposes.

Requesting an Access Token

Exchange the credentials for a bearer token at the Anypoint token endpoint:

curl --location --request POST https://anypoint.mulesoft.com/accounts/api/v2/oauth2/token \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'client_id={your_client_id}' \ --data-urlencode 'client_secret={your_client_secret}' \ --data-urlencode 'grant_type=client_credentials'

The response returns {"access_token": "...", "token_type": "bearer"}. Send that token as Authorization: Bearer {access_token} on subsequent requests. The endpoint above belongs to the US control plane; if your organization is hosted in another region, use that region's Anypoint hostname instead.

Actions

Action Name

Description

Discover apis

List apis managed in an anypoint api manager environment

Get api model

Get an api specification from anypoint exchange

Invoke api get

Send a get request to an api exposed by mulesoft

Invoke api post

Send a post request to an api exposed by mulesoft

Triggers

Trigger Name

Description

New api

Triggers when a new api is added in anypoint api manager

New audit log event

Triggers on a new entry in the anypoint platform audit log

On webhook event

Triggers when mulesoft posts an event to unifyapps

About the API

The connector's operations sit across several Anypoint Platform services, all reached with the same connected app token:

  • API Manager: lists and monitors the APIs managed within a given environment, which is what backs API discovery and the new-API trigger.

  • Exchange: stores API specifications and reusable assets, and is where an API's model is retrieved from.

  • Audit logging: records activity across the platform, surfaced here as a trigger on new audit log entries.

  • Managed APIs: the GET and POST invoke operations call the APIs your Mule applications expose, rather than the platform's own control-plane endpoints.

Official documentation

https://docs.mulesoft.com/