Contact Free trial Login

Create an Asset

In Anypoint Exchange private and Exchange portal, to share an API, policy, example, template, or connector means that you first create an asset corresponding to the asset type.

How you create an asset depends on its type.

  • For OAS 2.0, RAML, RAML fragments, HTTP, WSDL, and Custom assets, create the asset directly using the Exchange New asset menu.

  • For an example or template, create each using the Mavenize feature in Anypoint Studio, and publish each to Exchange.

  • For a connector, policy, example, or template, see Publish and Deploy Exchange Assets Using Maven.

  • You can also publish a RAML, and OAS and RAML fragments using Design Center and publishing the API to Exchange.

    Another way to publish these type of assets is using the Exchange Experience API.

  • RAML and OAS API specifications can be uploaded to Exchange with the Anypoint Platform Command Line Interface (CLI).

    For example: exchange asset upload --classifier raml --apiVersion v1 --name HelloWorld --mainFile helloworld.raml helloword/1.0.0 /Users/nmouso/Downloads/helloworld.raml.zip

Each asset in Exchange is versioned. You can manage which versions are visible by deprecating a version to hide it, and you can delete versions if needed.

Note: In addition to asset versions, APIs have a consumer facing API version that is shown at the top of an asset’s detail screen. This API version is defined by API providers.

This illustration summarizes how each asset type (in green) appears in Exchange:

ex2 exchange assets

Asset Limits

Exchange prevents resource exhaustion attacks by limiting the number of asset versions that can be published.

The limit is 500 assets for master organizations with trial accounts, and 100 000 (one hundred thousand) assets for other master organizations.

This asset count does not include deleted assets or generated assets such as Mule 3 and Mule 4 connectors generated automatically from APIs.

When a master organization has reached 80% of its limit, Exchange shows a warning.

When a master organization has reached its limit, Exchange shows an error. Also, using the New asset button on the home page or the Add new version button on the asset detail page shows an error explaining that the limit has been reached and no more assets can be added.

Check the limit of your master organization with a CURL command like this:

    curl -X GET \
      https://anypoint.mulesoft.com/exchange/api/v1/organizations/MASTER_ORGANIZATION_ID/limits \
      -H 'Authorization: bearer ANYPOINT_TOKEN'

Replace MASTER_ORGANIZATION_ID with your master organization ID, and replace ANYPOINT_TOKEN with the authorization token with permissions for the master organization.

Get lists of assets with a CURL command like this:

    curl -X POST \
      https://anypoint.mulesoft.com/graph/api/v1/graphql \
      -H 'content-type: application/json' \
      -H 'Authorization: bearer ANYPOINT_TOKEN' \
      -d '{"query":"{assets(query: { masterOrganizationId:\"MASTER_ORGANIZATION_ID\", limit: 20, offset: 10 }) {groupId assetId version}}"}'

Replace MASTER_ORGANIZATION_ID with your master organization ID, and replace ANYPOINT_TOKEN with the authorization token with permissions for the master organization. Vary the limit and offset values as needed.

See Search Using the Graph API for more information about searching for assets.

Create an API Asset

An API asset specifies an interface completely, including its functions, descriptions, how to handle return codes, and dependencies.

To create an API asset:

  1. In Exchange, select New asset.

  2. Enter the asset portal name.

  3. Select the asset type from the drop-down list:

    • REST API - RAML: Provide a RAML API specification file. RAML specifications must be a RAML file (.raml).

    • REST API - OAS: Provide an OAS/Swagger 2.0 API specification file. (Exchange does not support OAS 3.0.) OAS specifications can be either a YAML (.yaml) or JSON (.json) file.

    • SOAP API - WSDL: Provide a WSDL API specification file. SOAP specifications file can be either a WSDL (.wsdl) or XML (.xml) file.

    • API Spec Fragment - RAML : Provide an API Fragment RAML specification file. Fragment specifications must be a RAML file (.raml).

    • HTTP API - This asset does not require a file, this type of asset provides an API endpoint that is defined by API Manager.

  4. For RAML, API Spec Fragment, OAS, and WSDL assets:

    1. Select Choose File to locate the API specification file.

    2. Select the Main file of the API. If the file is a zip, the Main file should be in the root directory inside the zip. If the file is not a zip or if it has only one Main file, it’s selected automatically.

  5. (Optional) Select Advanced and edit the advanced settings: GroupId, AssetId, Version, and API version. Exchange generates the group ID, asset ID, and version for you, and you can change these values here. You can change an API asset’s version (asset version) and API version separately. The advanced settings are most often used to change the asset version.

  6. Select Publish.

Create a Custom Asset

A custom asset lets you share information about any aspect of your organization such as announcements, documentation, videos, and sharing files. You can add an optional file to your Custom asset that users can download. The file is stored in Exchange.

Note: Exchange only permits the following file types as the optional file in a Custom asset:

Images: .jpg, .jpeg, .png, .gif, .svg
Documents: .docx, .pdf, .pptx, .rtf, .vsdx, .vssx
Compressed files: .zip, .tgz, .jar, .gz, .7z
Text files: .txt, .json, .raml, .yaml, .yml, .md, .csv, .xml, .xsd, .wsdl, .html, .pom, .log, .sql

A file without a file type is not allowed. All file types are case insensitive.

MuleSoft recommends deleting all old Custom assets containing files of types that are no longer permitted. For any Custom asset containing a non-supported file, delete the asset to remove the file.

To create a custom asset:

  1. In Exchange, select New asset.

  2. Enter the asset portal name.

  3. Select the asset type Custom from the drop-down list.

  4. (Optional) To share a file with users, choose the file.

  5. (Optional) Select Advanced and edit the advanced settings: GroupId, AssetId, and Version. Exchange generates the group ID, asset ID, and version for you, and you can change these values here. The advanced settings are most often used to change the asset version.

  6. Select Publish.

Asset Name, Icon, and Description Properties

You can create assets in API Designer or Exchange. After the asset is created, the name, icon, and description properties can only be changed in the Exchange asset details page as described in Describe an Asset.

Properties of Assets Created in API Designer

API Designer reads and uses the name of the asset from the RAML specification.

Before the asset is published in Exchange, you can edit the name in API Designer.

After the asset is published in Exchange, the name is used as the asset portal name. Any publication from API Designer to update the version of an asset in Exchange has the name field disabled, and shows the name from Exchange. The name, icon, and description properties can only be changed in the Exchange asset details page.

Properties of Assets Created in Exchange

When you create an asset in Exchange, you enter the name.

The name cannot be changed when adding a new version in Exchange.

The name, icon, and description properties can only be changed in the Exchange asset details page.

Create a New Version of an Existing Asset

If you have contributor or admin access to an asset, you can add a new version from the asset portal:

  1. In Exchange, open the asset list and select the asset.

  2. In the sidebar Versions table, select Add New Version.

  3. Enter the Version (asset version).

  4. (Optional) Enter the API version.

  5. (Optional) Choose a file to upload.

  6. Select Publish.

The new version of the asset has the same name, icon, and description as the previous version. Any changes to these properties apply to all versions of the asset.

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.