# Anypoint API & API Group Synchronization

{% hint style="warning" %}
This configuration is only required if using Revenium's Drop-In Storefront for Mulesoft's Anypoint Community Manager (ACM).
{% endhint %}

Revenium supports API & API Group synchronization from Anypoint API Manager / Exchange to the Revenium platform for monetization.

The synchronization features enable subscribers browsing your API storefront to be routed seamlessly to the API details pages published in ACM when viewing a product bundle you have published for sale. (from the API details page in ACM, interested developers will find your API documentation, sample code, and an interactive console they can use to test integrations with your API).

This feature also allows Subscribers to view all product bundles you publish that provide access to a given API so that they can easily sign up and pay for access to the API (an example can be viewed in the image below).

To enable this feature, please follow these steps:

1. Go to the Community API Details page in your Community and look for the API Header component, once there, uncheck the **Show API Access Requester** option.
2. Drag & drop the Revenium **Request Access from Source** component into the section of this page where you want to show it.

<figure><img src="/files/RImj99w4Wx3JQXq5TlfJ" alt=""><figcaption></figcaption></figure>

**As a starting point, please review the** [**official Anypoint documentation**](https://docs.mulesoft.com/api-manager/2.x/api-groups-creating-groups) **to Create and Publish API Groups.**

## API Synchronization

Within Revenium's configuration [for a source](/ai-and-api-monetization/assets.md), you can define an external ID that links back to MuleSoft Exchange. This allows the Revenium Drop-In Storefront to dynamically create links to the API details pages in ACM for customers who are browsing your API product documentation.

Before you can sync your data ensure the Anypoint account you're using is configured with the following API Manager permissions:

<figure><img src="/files/ZXyfBmiT2TwRcqGAxDss" alt=""><figcaption></figcaption></figure>

Once your permissions are set, the process of linking the Revenium & MuleSoft record is straight-forward. View the API source in exchange and copy the identifier from the URL into the source record in Revenium.

<figure><img src="/files/IoU2AqOOiGYXvfH33jo8" alt=""><figcaption><p>The external ID for each source can be find in the Exchange URL in the red box above.</p></figcaption></figure>

Next, paste this source into the source record in Revenium as shown below:

![](/files/cT8aUU0PghF0sTo5ZGvh)

Sources can also be synchronized automatically from Anypoint API Manager to Revenium. This can be accomplished by tagging the Source with REVENIUM. Note that Sources sync'd in this manner will be created by the Revenium Subscriber account who initially configured the [APIM configuration](https://docs.hypercurrent.io/user-guide/manage/external-configurations/apim-configurations#create-apim-configuration) in Revenium's UI.

<figure><img src="/files/HF8pl39KBjDQgSEgulsZ" alt=""><figcaption></figcaption></figure>

## API Group Synchronization

Because API Group publishing is detail-oriented, we've provided a step-by-step guide below explaining the steps required for API Groups in Exchange to appear dynamically in Revenium's Drop-In Storefront.

1. **Create the API Group in API Manager.** A version of the group name chosen here will be used as the external ID in the product configuration of Revenium. One important note is that all group names will be converted to lowercase, and any spaces in group names will be converted to dashes. From the example below, "Test Product" becomes 'test-product' for the external ID in Exchange and Revenium. Also note that the "API Group instance label" chosen below will be displayed to end subscribers when requesting access to your API product, so use a customer friendly name here (i.e. U.S. Instance or European Instance")\\

   <figure><img src="/files/bTfwbKq4AvlKe3EuDyy1" alt=""><figcaption></figcaption></figure>
2. Assign the APIs you wish to be a part of your product to the API Group in API Manager and click Save.\\

   <figure><img src="/files/8hpSg2ZifDGc7hR1aN8S" alt=""><figcaption></figcaption></figure>
3. With the newly-created API group opened in API manager, add an SLA Tier using the left side menu as shown in the image below. Name & describe your SLA, and choose the approval method appropriate for your use case. **Note that assigning SLAs is MuleSoft best practice and also required for successful use of Revenium's storefront components.**\\

   <figure><img src="/files/vsvf3XRhZtHCnemKdnjp" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/cgPZDZaVJ7pMpBm3rPNn" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/SCzXEVNRzIGRlMsomw6J" alt=""><figcaption></figcaption></figure>
4. Return to the "Group Details" tab from the left side navigation menu. From this page, click "Publish to Exchange."\
   \\

   <figure><img src="/files/UrJtxNXHfR6yxt8qEYF8" alt=""><figcaption></figcaption></figure>
5. When complete, click the link to view your product in Exchange. <mark style="color:red;">**At this point, you will be able to view the external ID required for linking your Revenium storefront in the URL**</mark>\*\* \*\* (found in the blue box in the example image below)\
   \\

   <figure><img src="/files/E8RAtuk3K7V5tNhCIxGq" alt=""><figcaption></figcaption></figure>
6. Next, return to Revenium and create a new product. A summary of the required steps is laid out below. Pay careful attention to the requirement to add the external **ID to the product where indicated,** which in the case of this example is "test-product".

{% hint style="info" %}
Revenium will always use the latest API Group version published to Exchange.
{% endhint %}

If the [Revenium Metering Policy ](https://docs.hypercurrent.io/integrations/mulesoft/metering-policy-configuration)is configured as an Automated Policy the URL/URI defined in the [Revenium Sources](/ai-and-api-monetization/assets.md) must be unique. If the Source are being synchronized from the Anypoint Platform then the "Subscriber Endpoint" should be set the appropriate unique URI.

<figure><img src="/files/lnIUjZ9U896lalWdGkYC" alt=""><figcaption></figcaption></figure>

### Creating a Revenium Product Linked to Exchange

Once the API Groups are created and published, to set up the synchronization, select "Products" from the navbar on the left-hand side of the screen:

<figure><img src="/files/QSDJvDkkgXyfnsDPqxsI" alt=""><figcaption></figcaption></figure>

Next, you can either select an existing Product to edit it or click on the "Plus" button from the upper right-hand side of the UI to create a new one:

<figure><img src="/files/fczulOjS9iIbNr87ZR4R" alt=""><figcaption></figcaption></figure>

Once the Product form is open, go to the "Options" tab and fill the External ID field with the API Group ID:

![](/files/QrC7rqUjdTnW6L6IDBGP)

{% hint style="warning" %}
Lastly, remember that for any Revenium products to be visible in third party portals, the option to "publish to commerce" portal must be selected when configuring the product in Revenium (shown below).
{% endhint %}

<figure><img src="/files/a2W0elDpoUZJd52yyDg7" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.revenium.io/ai-and-api-monetization/readme/mulesoft/anypoint-api-group-synchronization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
