Contact Free trial Login

Create an Asset

In Anypoint Exchange private and Exchange portal, to share an API, 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, 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:

Illustration - How Assets appear in Exchange

Creating an API Asset

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

  1. In Exchange, click New asset.

  2. Specify a name for the asset.

  3. Click 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. Click 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. Click Publish.

Advanced Settings

Exchange generates the GroupId, AssetId, and version automatically. You can change the values if needed. For an OAS asset, you can set the asset version and the API version separately.

The Advanced settings are most often used to change the version number.

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. Click New asset.

  2. Specify a name for the asset.

  3. Click the Custom Asset Type.

  4. If you want to share a file with users, click Choose File to locate the file.

  5. Click Publish.

Add a File to an Existing Asset

If you have contributor or admin access to an asset, you can add a file to an existing asset.

Click the asset and click Add New Version. The new version screen lets you change the asset name, choose a file to add, and change the asset’s version.

If you don’t want to add a new version, if you have contributor or admin access to an asset, serve the file from a web server in your organization and edit the asset to add a link to the file in the asset’s description.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub