Contact Us 1-800-596-4880

Create an Asset

To share an API, API Group, policy, ruleset, example, template, or connector in either an Anypoint Exchange private instance or an Exchange public portal, create an asset of that type.

The way to create an asset depends on its type. The type is set when the asset is created and cannot be changed.

  • For OAS, RAML, RAML fragments, AsyncAPI, HTTP, WSDL, rulesets, and custom assets, create the asset directly using the Exchange Publish 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 create REST APIs and API Spec Fragments using Design Center and publish 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

  • API groups are published to Exchange from Anypoint API Manager.

  • Mule applications are published to Exchange from Anypoint Runtime Fabric and managed in Runtime Fabric, and are not visible in the Exchange user interface.

  • External libraries are published to Exchange from the Exchange Maven Facade API and managed with this API, and are not visible in the Exchange user interface.

Exchange fully supports RAML fragments. Currently, Exchange does not support importing and managing OAS 3.0 components as Exchange dependencies inside a specification.

This illustration summarizes how some of the asset types (in green) appear in Exchange:

ex2 exchange assets

Create an API Asset

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

Creating an asset sets the asset type, which cannot be changed. All versions of an asset always have the same type.

To create an API asset:

  1. In Exchange, select Publish new asset.

  2. Enter a name for the asset.

  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 API specification file. OAS specifications can be either a YAML (.yaml) or JSON (.json) file. Exchange supports OAS 2.0 and OAS 3.0 specifications.

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

    • AsyncAPI: Provide an AsyncAPI specification file in a YAML (.yaml) or JSON (.json) file.

    • AsyncAPI with Avro schemas: Provide an Avro fragment in an AVSC (.avsc) file.

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

    • API Spec Fragment - JSON: Provide an API Fragment JSON specification (.json) file.

    • API Spec Fragment - OpenAPI Specification (OAS): Provide an API Fragment OpenAPI specification file either JSON or YAML.

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

  4. For assets that require a file:

    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 selected main file must be in the root directory of the ZIP file. If the file is not a ZIP or if the file is a ZIP file with only one main file, then the main file is selected automatically.

  5. If you want to edit the GroupId, AssetId, Version, and API version (GAV), click Advanced.

    Exchange generates the group ID, asset ID, and version (GAV) for you, and you can change these values as needed. You can change an API’s asset version and version separately. Use the advanced settings to change the asset version.

  6. Select an option for Lifecycle state. The default is Stable.

  7. Select Publish.

To create a ZIP file and put the items in a folder into the root directory of the ZIP file, use a command like this. Replace myfolder with the name of your folder and name.zip with the name for the new ZIP file.

cd myfolder; zip -r name.zip .

Do not use a command such as zip -r name.zip myfolder, which puts the folder into the root directory of the ZIP file. This causes an error message such as The zip file does not contain a .raml file in the root directory.

Create an API Group Asset

An API Group is an asset that enables organizations to publish a group of API instances as a single unit, so that developer client applications can access the APIs as a group, using one client ID and, optionally, client secret.

API Groups are created in Anypoint API Manager and published to Exchange.

API Groups have major versions, such as 1.0.0, 2.0.0, or 3.0.0, but no minor or patch versions. Every version of an API Group has one or more API Group instances. Each API Group instance is a group of API instances that all have the same identity provider and the same environment type, either production or sandbox. An API Group instance can contain API instances from multiple business groups.

Creating an API Group requires having the Group Administrator permission, as well as the Asset Administrator permission for each of the APIs in the group. This ensures that a group creator can change the underlying APIs between private and public visibility levels.

If an API Group has any private APIs, you see a warning when publishing the API Group to your public portal. The public portal never shows private content. To ensure that all content in the API Group is published to the public portal, go to each API’s page in Exchange and make the API public, and then publish the API Group.

Warnings are also shown when publishing an API Group to your public portal if all of its API Group instances are private, and when making an API Group instance public if all of its API instances are private.

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.

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.

SVG files are limited to 100 KB or less.

MuleSoft recommends deleting all old Custom assets containing files of types that are not 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 Publish new asset.

  2. Enter a name for the asset.

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

  4. To upload a file, click Choose file.

  5. To edit the GroupId, AssetId, and Version (GAV), click Advanced.

    Exchange generates the group ID, asset ID, and version for you, and you can change these values as needed. Use the advanced settings to change the asset version.

  6. Select an option for Lifecycle state. The default is Stable.

  7. Select Publish.

Create Custom Policy Definition Asset

Policies enforce regulations to help manage security, control traffic, and improve API adoption. For example, a policy can control authentication, access, and service level agreement (SLA). You can create a policy definition based on your specific business requirements. Develop custom policy definitions and apply them to APIs to extend existing functionality or define new ones.

To publish a custom policy definition:

  1. In Exchange, click Publish new asset.

  2. Enter a name for the asset.

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

  4. Click Choose File to select a JSON schema or YAML file.

  5. To edit the GroupId, AssetId, Version, and API version (GAV), click Advanced.

    Exchange generates the group ID, asset ID, and version (GAV). You can change these values. You can also change an API asset’s version and API version separately. The advanced settings are most often used to change the asset version.

  6. From Lifecycle state, select Stable.

    The policy must be in the Stable state to upload the implementation file in a later step.

  7. Select Publish.

    Pending status appears next to Implementations in the left navigation bar.

To implement the policy so that it is available at runtime, follow the steps in Add Policy Implementation Files to Published Policy Definition.

Create a GraphQL API

A GraphQL API schema is a collection of operations and object types that are composed of fields. A GraphQL API allows a client to fetch only the object types and fields needed instead of fetching a fixed response like in a REST API.

There are two types of schemas that you can upload:

  • GraphQL API schema

  • GraphQL Apollo API schema

    A GraphQL API schema designed with Apollo GraphQL specific directives and structure, also known as the schema definition language (SDL).

To create a GraphQL API:

  1. In Exchange, select Publish new asset.

  2. Enter a name for the asset.

  3. From the drop-down list, select the asset type GraphQL API.

  4. Select which GraphQL API schema to upload, GraphQL API schema or GraphQL Apollo API schema.

  5. To select a file to upload, click Choose file.

  6. To edit the advanced settings, GroupId, AssetId, and Version (GAV), click Advanced.

    Exchange generates the group ID, asset ID, and version for you, and you can change these values as needed. Use the advanced settings to change the asset version.

  7. Select an option for Lifecycle state. The default is Stable.

  8. Select Publish.

Create an RPA Activity Template Asset

Activity templates are reusable code within RPA that standardize the most used activity steps and make them available to other developers in the organization. These templates are .cawl files that are imported in the RPA Activity library for developers to use as part of their RPA processes.

To create an RPA activity template asset:

  1. In Exchange, select Publish new asset.

  2. Enter a name for the asset.

  3. From the drop-down list, select the asset type RPA Activity Template.

  4. To select a .cawl file to upload, click Choose file.

  5. To edit the advanced settings, GroupId, AssetId, and Version (GAV), click Advanced.

    Exchange generates the group ID, asset ID, and version for you, and you can change these values as needed. Use the advanced settings to change the asset version.

  6. Select an option for Lifecycle state. The default is Stable.

  7. Select Publish.

Create an RPA Process Template Asset

Templates for RPA processes are imported into RPA Builder as projects and are customizable before deploying to RPA bots. Process templates are built on common patterns for RPA to build automation faster. These templates are .crpa files that are exported from RPA Builder to share with other developers.

To create an RPA activity template asset:

  1. In Exchange, select Publish new asset.

  2. Enter a name for the asset.

  3. From the drop-down list, select the asset type RPA Process Template.

  4. To select a .crpa file to upload, click Choose file.

  5. To edit the advanced settings, GroupId, AssetId, and Version (GAV), click Advanced.

    Exchange generates the group ID, asset ID, and version for you, and you can change these values as needed. Use the advanced settings to change the asset version.

  6. Select an option for Lifecycle state. The default is Stable.

  7. Select Publish.

Create a Ruleset Asset

Rulesets are a group of rules or guidelines that define an application, for example best practices or industry-specific standards. Add a zip file with multiple YAML files that describe the new ruleset.

To create a ruleset asset:

  1. In Exchange, select Publish new asset.

  2. Enter a name for the asset.

  3. From the drop-down list, select the asset type Ruleset.

  4. To upload, click Choose file.

  5. To edit the advanced settings, GroupId, AssetId, and Version (GAV), click Advanced.

    Exchange generates the group ID, asset ID, and version for you, and you can change these values as needed. Use the advanced settings to change the asset version.

  6. Select an option for Lifecycle state. The default is Stable.

  7. Select Publish.

Create an AsyncAPI Asset

An AsyncAPI is an AsyncAPI specification file that specifies an event-driven API. You can create AsyncAPIs with Avro schemas. The file type for Avro schemas is AVSC (.avsc).

To create an AsyncAPI:

  1. In Exchange, select Publish new asset.

  2. Enter a name for the asset.

  3. From the drop-down list, select the asset type AsyncAPI.

  4. To select a file to upload, click Choose file.

  5. To edit the advanced settings, GroupId, AssetId, and Version (GAV), click Advanced.

    Exchange generates the group ID, asset ID, and version for you, and you can change these values as needed. Use the advanced settings to change the asset version.

  6. Select an option for Lifecycle state. The default is Stable.

  7. 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 can’t 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 for an existing asset:

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

  2. Click Add version.

  3. For API assets, follow the steps for the corresponding API asset type:

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

    • REST API - OAS: Provide an OAS API specification file. OAS specifications can be either a YAML (.yaml) or JSON (.json) file. Exchange supports OAS 2.0 and OAS 3.0 specifications.

    • 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).

    • AsyncAPI: Provide a JSON (.json) or YAML (.yml) file.

    • AsyncAPI spec with Avro schema: Provide an Avro fragment spec. Fragment specification must an AVSC (.avsc) file.

    • 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:

    • Select Choose File to locate the API specification file.

    • Select the main file of the API.

  5. If you want to select a file to upload, click Choose file.

  6. Enter the version for the asset.

  7. Select on option for Lifecycle state. The default is Stable.

  8. 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.