Contact Free trial Login

Use Object Store v2

Anypoint Object Store v2 (Object Store v2) lets you share data and states across Mule runtime workers within a single application.

Object Store v2 is enabled by default in the Anypoint Platform EU Control Plane and in Mule 4.

In Mule 3, enable Object Store v2 from Anypoint Platform > Runtime Manager for each application you want to access Object Store v2.


Object Store v2 interacts with these components:

  • Object Store Connector

    Use with Anypoint Studio to construct flows to write to and read from the object store. You can install the Object Store connector using Anypoint Exchange from within Anypoint Studio. After installed, search Studio for objectstore. The Object Store connector works with both Object Store version 1 and version 2. Use Studio to create an application that you deploy to Runtime Manager where the application runs and serves requests to read to and write from the object store.

    The Object Store Reference field for Object Store Connector (objectStore-ref element in XML) must be set to _defaultUserObjectStore for data to appear in Object Store v2.


    The Object Store v2 API lets you create and delete objects, set TTL (time to live) for objects, and set usage limits.

    The Object Store v2 Stats API enables you to retrieve Object Store v2 usage statistics, such as how many API calls per month your organization makes to Object Store.

  • Runtime Manager

    When you enable Object Store v2, the Runtime Manager > Application Data setting changes its label to Object Store. From the object store interface, you can administer objects and their values in the object store. The interface also lets you delete object store objects.

About Protecting Object Store Data

Object Store v2 uses TLS for secure transport. Data at rest is stored using FIPS 140-2 compliant encryption standards. If you require a higher level of security, we recommend that you encrypt sensitive data before writing it to the Object Store.

Install the Object Store Connector

  1. In Anypoint Studio, click the Exchange icon in the Studio task bar.

  2. Click Login in Anypoint Exchange.

  3. Search for the "objectstore connector", choose the version of the connector for Mule 3 or Mule 4, and click Install.

  4. Follow the prompts to install the connector.

Use Object Store Connector in an Application

Note: The information that follows applies only to Mule 3.

  1. In Anypoint Studio, click File > New > Mule Project.

  2. Create a simple flow such as the following:

    Building Block


    HTTP connector

    Click the green plus sign
    Host = All interfaces [] (Default)
    Port = 8081
    Click OK
    Path = /store
    Allowed Methods = POST

    Object to String

    No settings (use defaults)

    JSON to Object

    Return Class = java.util.Map

    Object Store connector

    Click the green plus sign.
    Set the Partition field.
    Set the Object Store Reference field to _defaultUserObjectStore. This is mandatory for data to be stored in Object Store v2.
    Click OK.
    Set Operation = Store
    Key = #[payload.key]
    Value Reference = #[payload.value]

    Set Payload

    Settings = KEY: #[payload.key] AND VALUE: #[payload.value] WERE SAVED OK

    When complete, the flow appears:

    osv2 studio flow
  3. Save the application. Test run the application so you know it works. Right-click the canvas and click Run project <name>. If the application starts successfully, you can stop it. Right-click the canvas and click Stop project <name>.

  4. Right-click your application’s name in Anypoint Studio’s Package Explorer and click Anypoint Platform > Deploy to Cloud.

  5. At the User login window, specify your Anypoint Platform username and password, and click Sign In. If you don’t have an Anypoint Platform login, click Sign Up.

  6. In Runtime Manager:

    • Give the application a name. Each name is unique and becomes the URL under which your application is stored in Runtime Manager. The URL is in the form <application_name> Ensure the application name gets a green checkmark for proper naming and being unique.

    • Set the Runtime version to Mule 3.8.5 and later, or to any Mule 4.x version.

    • Click the Use Object Store v2 checkbox.

  7. After configuring your application, click Deploy Application.

  8. Runtime Manager prompts you to ensure you want to make this choice.

  9. Start your application.

The Application Data label in the Runtime Manager navigation bar on the left side of the screen changes to Object Store.

Send Data to an Object Store

From a command line prompt, send JSON data to your Mule application using a curl command or similar. If you prefer, you can use Postman, a browser extension or other tool instead of the command line. For Windows, you can use Postman, curl, or cygwin.

For example:

curl -X POST -H "Content-Type: application/json" -d '{ "key": "TestKey01", "value": "This is an object store test" }' ""

Change application_name to the name you chose when you deployed your application. Each time you submit this command, change the key’s name so that each key is unique.

View Data in an Object Store

To view data in the Object Store:

  1. Log into Anypoint Platform and click Runtime Manager.

  2. Click the name of your application to view the application’s dashboard.

  3. Click Object Store from the left navigation bar:

    osv2 in nav bar

    The Object Store user interface appears as follows:

    osv2 ui
    • The default Object Store name is DEFAULT_USER_STORE.

    • The columns show the Object Store name, partition name, key, and key data. The partition groups object stores keys.

  4. Click the Object Store name, partition name, and key to view its value.

  5. To delete a key, hover over a key name, and click the trash can icon. Similarly, you can delete a partition or the store itself by hovering and clicking the trash can icon.