Import an API Specification from Exchange
Anypoint Studio enables you to import a RAML or OAS 2.0 and 3.0 API specification into either a new Mule project or an existing one.
If you are using Mule runtime engine (Mule) 4.1.3 and earlier, or if you prefer to import an API specification that is not available in Exchange, follow the steps presented in import an API specification from a local file or import an API specification from Design Center depending on your preferred use case.
If you cannot access Exchange from your work environment, you can still import an API specification from your local Maven installation.
Import an API Specification from Exchange Into a New Project
-
In the taskbar at the top of the Anypoint Studio display, select File > New > Mule Project.
-
Type a name for your project.
-
Select a Mule runtime engine version 4.1.4 or later.
-
In the API Specification section, select the From Exchange or Maven tab.
-
Click the Add icon (), and select From Exchange.
-
Select your Anypoint Platform username.
If you are not logged in, you can click the Add Account button to add your Anypoint Platform account. -
From the list of available APIs, select one or more and click the Add button.
You can type a
*
character in the search bar and press enter to list all your available APIs. -
To select the version of the API that you want to import, use the Selected Modules table.
-
Click Finish.
Studio scaffolds your API specification. If you choose not to create flows out of your API specification, unselect the Scaffold Flows From These API Specifications checkbox.
You can manage the API specifications in your project that are linked to Exchange from the API specification project management view by clicking the Manage Mule Project APIs icon () in the top task bar.
Import an API Specification from Exchange Into an Existing Project
-
Right click on your project in the Package Explorer view, select Mule, and then Manage APIs.
-
Click the Add icon (), and select From Exchange.
-
Select your Anypoint Platform username.
If you are not logged in, you can click the Add Account button to add your Anypoint Platform account. -
From the list of available APIs, select the one you want and click the Add button to add it to your project.
You can choose more than one API to import.You can type a
*
character in the search bar and press enter to list all your available APIs.You can select the version of the API you want to import in the Selected Modules table.
-
Click Finish.
Studio scaffolds your API specification. If you choose not to create flows out of your API specification, unselect the Scaffold Flows From These API Specifications checkbox.
You can manage the API specifications in your project that are linked to Exchange from the API specification project management view by clicking the Manage Mule Project APIs icon () in the top task bar.
The API specification published as an asset in Exchange needs to be marked as stable to be listed in Studio when searching for available APIs. |