|
| 1 | +# Publish an API to Developer Portal |
| 2 | + |
| 3 | +This guide provides step-by-step instructions for publishing APIs, AI APIs, MCP Servers, and API Products to the WSO2 API Manager Developer Portal, making them available for application developers to discover, subscribe, and consume. |
| 4 | + |
| 5 | +!!! info |
| 6 | + You can publish the following to the Developer Portal: |
| 7 | + |
| 8 | + - **APIs**: REST, SOAP, SSE, WebSocket, WebSub, GraphQL |
| 9 | + - **AI APIs** |
| 10 | + - **MCP Servers** |
| 11 | + - **API Products** |
| 12 | + |
| 13 | +## Overview |
| 14 | + |
| 15 | +**API Publishing** is the process of making an API visible and available for subscription in the Developer Portal. When an API is published: |
| 16 | + |
| 17 | +- The lifecycle state changes from **CREATED** to **PUBLISHED** (see [API Lifecycle]({{base_path}}/api-design-manage/design/lifecycle-management/api-lifecycle/)) |
| 18 | +- API metadata becomes visible in the Developer Portal |
| 19 | +- Application developers can discover and subscribe to the API |
| 20 | +- The API becomes available for consumption through applications |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +## Prerequisites |
| 25 | + |
| 26 | +Before publishing, ensure the following requirements are met: |
| 27 | + |
| 28 | +1. **Endpoint Configuration**: Valid [endpoint URL]({{base_path}}/api-design-manage/design/endpoints/endpoint-types/) configured (for APIs and AI APIs) |
| 29 | +2. **Business Plans**: At least one [business plan]({{base_path}}/api-design-manage/design/rate-limiting/assign-business-plans/) (subscription tier) selected |
| 30 | +3. **Created State**: The API, AI API, MCP Server, or API Product must be created and in CREATED state |
| 31 | + |
| 32 | +!!! tip |
| 33 | + You can check if these requirements are met in the Lifecycle page of the Publisher Portal. |
| 34 | + |
| 35 | +--- |
| 36 | +## Publishing to Developer Portal |
| 37 | + |
| 38 | +### Step 1: Sign in to the Publisher Portal |
| 39 | + |
| 40 | +1. Navigate to the Publisher Portal: |
| 41 | + ``` |
| 42 | + https://<hostname>:9443/publisher |
| 43 | + ``` |
| 44 | + Example: `https://localhost:9443/publisher` |
| 45 | + |
| 46 | +2. Sign in with your credentials. |
| 47 | + |
| 48 | +### Step 2: Select the API or API Product |
| 49 | + |
| 50 | +1. Click on an API or API Product that is in the **CREATED** state |
| 51 | + |
| 52 | + <img src="{{base_path}}/assets/img/learn/select-created-api.png" alt="Select API" title="Select API" width="35%" /> |
| 53 | + |
| 54 | +!!! note "Enhanced API Visibility" |
| 55 | + You can enhance the API tile display in developer portal by configuring the following settings in: |
| 56 | + |
| 57 | + `<APIM_HOME>/repository/deployment/server/webapps/devportal/site/public/theme/settings.json` |
| 58 | + |
| 59 | + ```json |
| 60 | + "tileDisplayInfo": { |
| 61 | + "showMonetizedState": true, |
| 62 | + "showBusinessDetails": true, |
| 63 | + "showTechnicalDetails": true |
| 64 | + } |
| 65 | + ``` |
| 66 | + |
| 67 | + This displays: |
| 68 | + |
| 69 | + - Monetization status |
| 70 | + - Business owner information (with email on hover) |
| 71 | + - Technical owner information (with email on hover) |
| 72 | + |
| 73 | + <img src="{{base_path}}/assets/img/learn/select-created-api-with-monetization.png" alt="API with Business Info" title="Select API" width="35%" /> |
| 74 | + |
| 75 | +### Step 3: Navigate to Lifecycle |
| 76 | + |
| 77 | +1. Click on the **Lifecycle** tab in the left menu |
| 78 | + |
| 79 | +  |
| 80 | + |
| 81 | + |
| 82 | +2. The lifecycle state transition grid appears. Check for any missing requirements: |
| 83 | + - Endpoint provided |
| 84 | + - Business Plan(s) selected |
| 85 | + |
| 86 | +  |
| 87 | + |
| 88 | +!!! warning |
| 89 | + If requirements are not satisfied, navigate to the relevant sections (Endpoints, Subscriptions) to provide the missing information. |
| 90 | + |
| 91 | +### Step 4: Publish the API |
| 92 | + |
| 93 | +1. Click the **PUBLISH** button |
| 94 | + |
| 95 | +  |
| 96 | + |
| 97 | +2. Upon successful publication, the lifecycle state changes to **PUBLISHED** |
| 98 | + |
| 99 | +  |
| 100 | + |
| 101 | +### Step 5: Verify in Developer Portal |
| 102 | + |
| 103 | +1. Navigate to the Developer Portal: |
| 104 | + ``` |
| 105 | + https://<hostname>:9443/devportal |
| 106 | + ``` |
| 107 | + Example: `https://localhost:9443/devportal` |
| 108 | + |
| 109 | +2. Verify that your published API is visible under the **APIs** listing |
| 110 | + |
| 111 | +!!! success |
| 112 | + Your API is now published and available for developers to discover and subscribe! |
| 113 | + |
| 114 | +--- |
| 115 | + |
| 116 | +## Publishing Third-party APIs |
| 117 | + |
| 118 | +WSO2 API Manager supports publishing APIs that are deployed on external gateways. These APIs are listed in the Developer Portal for discovery but are not proxied through WSO2 Gateway. |
| 119 | + |
| 120 | +For detailed instructions on adding and configuring third-party APIs, see [Add a Third-party API]({{base_path}}/api-design-manage/deploy-and-publish/publish-on-dev-portal/third-party-api-support/). |
| 121 | + |
| 122 | +--- |
| 123 | + |
| 124 | +## Best Practices |
| 125 | + |
| 126 | +### Before Publishing |
| 127 | + |
| 128 | +1. **Complete API Documentation**: Add comprehensive documentation before publishing - See [Add API Documentation]({{base_path}}/api-design-manage/design/api-documentation/add-api-documentation/) |
| 129 | +2. **Configure Appropriate Business Plans**: Select business plans that match your API's target audience - See [Assign Business Plans]({{base_path}}/api-design-manage/design/rate-limiting/assign-business-plans/) |
| 130 | +3. **Set Correct Visibility**: Configure API visibility (Public, Restricted, Private) - See [Control API Visibility and Subscription Availability]({{base_path}}/api-design-manage/design/advanced-topics/control-api-visibility-and-subscription-availability-in-developer-portal/) |
| 131 | +4. **Add Business Information**: Include business owner and technical owner details |
| 132 | +5. **Test Endpoints**: Verify all endpoints are reachable and working |
| 133 | + |
| 134 | +### During Publishing |
| 135 | + |
| 136 | +1. **Monitor Lifecycle State**: Ensure the state transition completes successfully |
| 137 | + |
| 138 | +### After Publishing |
| 139 | + |
| 140 | +1. **Verify in Developer Portal**: Always check the API appears correctly |
| 141 | +2. **Test Subscription Flow**: Create a test application and subscribe |
| 142 | +3. **Monitor Analytics**: Keep track of API usage and subscriber growth |
| 143 | +4. **Update Documentation**: Keep documentation current with API changes |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +Following these steps ensures your APIs, AI APIs, MCP Servers, and API Products are properly published and discoverable in the Developer Portal, enabling application developers to easily find, subscribe to, and consume them. |
| 148 | + |
| 149 | +## See Also |
| 150 | + |
| 151 | +- [Consume APIs Overview]({{base_path}}/api-developer-portal/consume-api-overview/) - Learn how application developers can discover and consume published APIs. |
| 152 | +- [Discover APIs]({{base_path}}/api-developer-portal/discover-apis/search/) - Explore how to search and find APIs in the Developer Portal. |
| 153 | +- [Subscribe to an API]({{base_path}}/api-developer-portal/manage-subscription/subscribe-to-an-api/) - Subscribe to published APIs from an application. |
| 154 | +- [Create Application]({{base_path}}/api-developer-portal/manage-application/create-application/) - Create applications to consume APIs. |
0 commit comments