-
Use the keyboard shortcuts:
-
Mac: Cmd+Shift+p
-
Windows: Ctrl+Shift+p
-
-
In the desktop IDE, select View > Command Palette.
-
In the cloud IDE, click the (menu) icon, and select View > Command Palette.
Publishing API Specs and Fragments to Exchange
Publish your API spec or fragment to Anypoint Exchange so that other team members can find and use it.
Before You Begin
Before publishing an API spec or fragment:
-
Have some familiarity with business groups.
When you publish your API spec to Exchange from Anypoint Code Builder, the IDE requests the name of the business group. See Business Groups.
Publish an API spec to Exchange
To publish your API spec to Exchange:
-
Open your API specification in Anypoint Code Builder.
-
Open the Command Palette.
Show me how
-
Enter
publish
and select the following command:MuleSoft: Publish API Specification to Exchange
-
If prompted, click Allow, and follow the prompts to sign in to Anypoint Platform.
-
In Select a Business Group, find and select your business group for the project.
For more information, see Before You Begin.
-
In Set Project Name, confirm or type the project name and press Enter.
-
Confirm or change each item and press Enter:
-
Artifact ID, such as
OAS-Example
-
Asset version, such as
1.0.0
-
API version, such as
v1
Press Escape to cancel publishing.
The status bar shows the progress. When complete, you see a message that the API specification successfully published to Exchange:
-
-
When prompted to implement the API, select:
-
No to avoid scaffolding the API specification into your integration.
-
Yes to scaffold the API specification into your integration.
If the scaffold fails, see Implementation Errors.
-
Locate Your API in Exchange
After publishing your API specification, you can find it in Anypoint Exchange:
-
Navigate to Anypoint Platform and log in using your credentials.
Show me how
-
US cloud (non-EU host): Anypoint Platform (US)
-
EU cloud (EU host): Anypoint Platform (EU)
-
-
Navigate to Anypoint Exchange.
Show me how
-
US cloud (non-EU host): Exchange (US)
-
EU cloud (EU host): Exchange (EU)
Your API specification appears as an asset in your organization, for example:
-
You can select the API, navigate through its summary, and see all the endpoints you defined in the previous tasks.
Publish a GraphQL API Spec to Exchange
To publish a GraphQL API specification to Exchange:
-
Navigate to Anypoint Platform and log in using your credentials.
Show me how
-
US cloud (non-EU host): Anypoint Platform (US)
-
EU cloud (EU host): Anypoint Platform (EU)
-
-
Navigate to Anypoint Exchange.
Show me how
-
US cloud (non-EU host): Exchange (US)
-
EU cloud (EU host): Exchange (EU)
-
-
Click Publish new asset:
-
Complete the Publish a new asset form:
-
For Name, type a name for your asset.
-
For Asset types, select GraphQL API.
-
For Method, select Upload a GraphQL API Schema.
-
For File upload, click Choose file and browse for your
.graphql
schema file. -
Click Advanced to change the version number.
-
For Lifecycle state, select Stable.
-
-
Click Publish.
Your GraphQL API spec is now available on Exchange, for example: