Publish APIs
As an Anypoint API Community Manager community administrator, you can add and publish APIs, API groups, and minor and major updates from Anypoint Exchange into your Salesforce Experience Cloud site.
This information includes the API documentation stored with the APIs in Exchange. The API documentation is separate from the articles stored in the Salesforce content management system (CMS). The API release process includes API documentation updates, and the CMS article release process is usually separate. Often a development team will lead the API release process and a marketing team will lead the CMS article release process.
Add Assets from Exchange to Your Site
-
Open the API Community Manager control panel and select API Curator.
From this tab, you can manage the assets in your site, including their metadata and visibility. Assets include APIs and API groups.
-
Assets in Your Site shows the assets that have been added to your site.
-
Assets in Anypoint Exchange shows the assets that exist in your Exchange organization but have not been added to your site.
-
-
Next to the asset name, click Add.
Alternatively, select multiple assets and click Add to your site.
-
Set the asset information: name, icon, description, and visibility of APIs on your site, and the visibility of the instances in each API.
Set Asset Information
The asset editing page opens when you add an asset to the site.
To open the editing page again, next to the asset name, click the pencil shaped edit icon.
-
Optionally, edit the Asset Name, Asset Icon, and Description.
-
Set Instances visibility to Only Public so your site will show only public instances of the asset, or All instances to show public and private instances.
-
Use Manage visibility to set the visibility of all versions as Administrators only, or set visibility for some versions to None, while you preview the API or API Group as described in the next section.
-
Select Apply.
Preview APIs
-
In the API Community Manager control panel, click Community Builder.
Community Builder displays a preview of your community’s site and edit options.
-
Select Preview.
-
Scroll to the API carousel that displays a card for each API or API Group version in the community.
The new API version or API Group shows the message This is only visible for you, indicating Administrators only visibility. Consumer developers cannot see this API version or API Group preview.
If no changes are visible, refresh the cache.
Make API Versions Visible
-
In the API Community Manager control panel, click API Curator.
-
Click the edit icon next to the asset name.
-
For each version, set Manage visibility to Everyone if you want it to be publicly available, Members only if you want it to be seen only by logged-in members, or None if you do not want that version to be visible.
At least one version must be visible by having an option other than None.
-
Select Apply.
Consumer developers can now see this asset in the API carousel on the community site.
On the API Curator tab, the Visibility column shows the visibility of the most visible version of that asset.
Minor API Updates
When an API specification or documentation requires nonbreaking corrections, such as changing the text, these changes are given a minor version change, such as from 3.0.0
to 3.0.1
. API Community Manager automatically and immediately imports these updates to all communities in which the API is published, without requiring any action from the API Community Manager administrator.
For example, suppose both the text in an API’s documentation and the text in the API Specification description have spelling errors.
To make corrections in the API specification:
-
Open the Design Center.
-
Open the API project and fix the errors.
-
Select Publish to Exchange.
-
In the Publish API specification to Exchange dialog box, leave the existing Name, Main file, and API Version, but increment the Asset version for a non-breaking change. For example, change
3.0.0
to3.0.1
. -
Select Publish.
To make corrections in the API documentation:
-
Open Exchange.
-
Open the API.
-
Select Edit and fix the errors.
-
Select Save as draft.
-
Select Publish.
Consumer developers see the corrected information on the community site immediately.
If no changes are visible, refresh the cache.
Major API Updates
When a new version of the API with breaking changes is created, the API Community Manager community administrator controls when and how to publish the new version in the site, mark the old version as deprecated, and remove the old version.
For example, suppose a developer on the API team adds a new resource to an API.
-
In Design Center, the developer opens the API project, adds the resource to the specification, and selects Publish to Exchange.
-
Because this is a breaking change, the developer changes the API version information in Publish API specification to Exchange.
For example, if the API version is
v3
, it becomesv4
. If the Asset version is3.0.1
, it becomes4.0.0
. Name and Main file do not change. -
The developer selects Publish.
The previous API version remains in all communities where it was published without any changes.
The API Community Manager community administrator must then review and publish the changes:
-
In the API Community Manager control panel, select API Curator.
The API is still listed in Assets in Your Site. The new version has visibility None.
-
Next to the API name, click the edit icon.
-
Change the visibility to Administrators only.
-
Preview the API.
-
In the API Community Manager control panel, select API Curator.
-
Next to the API name, click the edit icon.
-
Change the visibility of the new version from Administrators only to Everyone if you want it to be publicly available, Members only if you want it to be seen only by logged-in members, or None if you do not want that version to be visible.
If the visibility is Everyone or Members only, then consumer developers can now see the new API version in the API carousel on the community site.
If no changes are visible, refresh the cache.
Searching for APIs and API Groups
In the API Community Manager control panel, the API Curator tab’s Assets in Your Site tab shows a filter icon and a search bar. The filter icon opens a menu to filter assets by asset type, visibility, and category.
You can filter search results in the search bar with the following filter attributes:
-
name
-
version
-
description
-
businessGroup
-
assetType
(api
orgroup
)
To use a filter attribute, type the attribute name followed by a colon and the value for that attribute.
For example: filtering with name:order
only shows APIs with names that include "order", such
as "Order Status API" or "Received Orders".
Search terms without a filter attribute only apply to API fields that are not filtered. For example, the
search businessGroup:Sales banking
shows APIs that include "Sales" in the "Business Group" field and
"banking" in any field other than "Business Group".
The API Curator tab’s Assets in Anypoint Exchange tab shows a search bar and filter options for asset type, category, business group, and status. The asset status filter shows only assets that were recently created or recently updated.
The tabs show a maximum of 100 results, followed by a message if additional results were omitted. Use the search field to filter the APIs so that no relevant API is omitted.