Skip to content

Commit 5299da0

Browse files
Start drafting how to
Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com>
1 parent 37cd59b commit 5299da0

File tree

3 files changed

+122
-20
lines changed

3 files changed

+122
-20
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: "Package APIs for partners with Dev Portal"
3+
description: "Learn how to package existing APIs in Dev Portal into API packages for partners."
4+
content_type: how_to
5+
related_resources:
6+
- text: About Dev Portal
7+
url: /dev-portal/
8+
- text: Dev Portal API packaging reference
9+
url: /dev-portal/api-catalog-and-packaging/
10+
automated_tests: false
11+
products:
12+
- konnect
13+
- dev-portal
14+
15+
works_on:
16+
- konnect
17+
tools:
18+
- deck
19+
tags:
20+
- api-catalog
21+
- api-composition
22+
23+
tldr:
24+
q: How do I create API packages from existing Dev Portal APIs?
25+
a: |
26+
Packaging APIs involves the following steps:
27+
1. Create an API and attach an OpenAPI spec. Operations from your API's OpenAPI spec should overlap with Routes to ensure requests will be routed to the correct Service. Gateway routing configuration isn't directly modified by adding operations.
28+
1. Link a control plane to allow developer consumption.
29+
1. Apply the Access Control Enforcement (ACE) plugin globally.
30+
1. Create an API package by adding operations and package rate limits. Operations are automatically mapped to Routes using your API's OpenAPI spec or you can create them manually. The Gateway configuration isn't directly modified– any unmatched operations will be highlighted to indicate that a user Gateway Manager permissions needs to perform an action.
31+
prereqs:
32+
show_works_on: false
33+
inline:
34+
- title: "{{site.konnect_product_name}}"
35+
include_content: prereqs/products/konnect-account-only
36+
icon_url: /assets/icons/gateway.svg
37+
- title: "{{site.konnect_short_name}} roles"
38+
content: |
39+
To recover create API packages, you need the following [roles](/konnect-platform/teams-and-roles/):
40+
* Editor role for APIs
41+
* Publisher role for the API and API package
42+
* API Creator
43+
icon_url: /assets/icons/gateway.svg
44+
- title: Dev Portal
45+
include_content: prereqs/dev-portal-create-ui
46+
icon_url: /assets/icons/dev-portal.svg
47+
- title: Dev Portal APIs
48+
content: |
49+
To complete this guide, you'll need an API in Dev Portal.
50+
1. In the {{site.konnect_short_name}} sidebar, click **Catalog**.
51+
1. Click [**New API**](https://cloud.konghq.com/apis/create).
52+
1. In the **API name** field, enter `MyAPI`.
53+
1. Click **Create**.
54+
icon_url: /assets/icons/dev-portal.svg
55+
entities:
56+
services:
57+
- example-service
58+
routes:
59+
- example-route
60+
61+
cleanup:
62+
inline:
63+
- title: Clean up {{site.konnect_short_name}} environment
64+
include_content: cleanup/platform/konnect
65+
icon_url: /assets/icons/gateway.svg
66+
---
67+
68+
You can compose API packages from existing APIs in Dev Portal. API packages allow you to:
69+
* Create distinct APIs for specific use cases or partners based on existing API operations.
70+
* Link to multiple Gateway Services and/or Routes for developer self-service and application registration.
71+
* Apply rate limiting policies to an API Package, or per operation.
72+
* Manage role-based access control to specific developers and teams.
73+
74+
### Associate a control plane
75+
76+
To allow developers to consume your API, you must first link an API Gateway and control plane to your API.
77+
78+
1. In {{site.konnect_short_name}}, click **Catalog**.
79+
1. Click **MyAPI**.
80+
1. Click the **Gateway** tab.
81+
1. Click **Link gateway**.
82+
1. From the **Control plane** dropdown menu, select "quickstart".
83+
1. Select **Link to a control plane**.
84+
1. In the Add the Access Control and Enforcement plugin settings, click **Add plugin**.
85+
1. Click **Link gateway**.
86+
87+
### Assign operations to API packages
88+
89+
1. In {{site.konnect_short_name}}, click **Catalog**.
90+
1. Click the **API packages** tab.
91+
1. Click **Create API package**.
92+
1. In the **API package name** field, enter `Partner package`.
93+
1. Enable the Package rate limit and configure your rate limit.
94+
1. Click **Add operations from APIs** in the API operations settings.
95+
1. In the Add API operations pane, click your API and click **Add** next to the operations you want to package.
96+
1. Click **Create API package**.
97+
98+
### Publish packages to Dev Portal
99+
100+
1. In {{site.konnect_short_name}}, navigate to **Dev Portal** > **APIs** in the sidebar.
101+
1. Click the **API packages** tab.
102+
1. Click your API package.
103+
1. Click **Publish API**.
104+
1. Select your Dev Portal from the **Portal** dropdown menu.
105+
1. Select an auth strategy from the **Authentication strategy** dropdown menu.
106+
1. Click **Publish API**.
107+
108+
Your API package will now be published to your Dev Portal. Published API packages appear the same as published APIs in the Dev Portal, and both allow developers to register applications with them.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
For this tutorial, you’ll need a Dev Portal pre-configured. If you don't have these settings already configured, follow these steps to pre-configure it:
2+
3+
1. In the {{site.konnect_short_name}} sidebar, click **Dev Portal**.
4+
1. Click **New portal** to [create a Dev Portal](https://cloud.konghq.com/portals/create).

app/dev-portal/api-catalog-and-packaging.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ related_resources:
3535
url: /dev-portal/auth-strategies/
3636
---
3737

38-
<!--{:.success}
39-
> This is a reference guide, you can also follow along with our [Package APIs for partners with Dev Portal](/how-to/package-apis-for-partners-with-dev-portal/) tutorial.-->
38+
{:.success}
39+
> This is a reference guide, you can also follow along with our [Package APIs for partners with Dev Portal](/how-to/package-apis-for-partners-with-dev-portal/) tutorial.
4040
4141
You can compose API packages from existing APIs in Dev Portal. API packages allow you to:
4242
* Create distinct APIs for specific use cases or partners based on existing API operations.
@@ -193,34 +193,24 @@ To package APIs with Dev Portal, you need:
193193
* Publisher role for the API and API package
194194
* API Creator
195195
* [An API created](/dev-portal/apis/) with an [OpenAPI spec](/dev-portal/apis/#api-specs) associated with it
196+
* A Gateway control plane linked to your API in **Catalog** > **APIs**
196197

197-
### Associate a control plane
198+
### Create an API package
198199

199-
1. In {{site.konnect_short_name}}, navigate to **Dev Portal** > **APIs** in the sidebar.
200-
1. Click your API.
201-
1. Click the **Gateway** tab.
202-
1. Click **Link gateway**.
203-
1. Select a control plane from the **Control plane** dropdown menu.
204-
1. Select **Link to a control plane**.
205-
1. In the Add the Access Control and Enforcement plugin settings, click **Add plugin**.
206-
1. Click **Link gateway**.
207-
208-
Your operations should now be autogenerated based on how your OpenAPI spec maps to your Routes.
209-
210-
### Assign operations to API packages
211-
212-
1. In {{site.konnect_short_name}}, navigate to **Dev Portal** > **APIs** in the sidebar.
200+
1. In {{site.konnect_short_name}}, click **Catalog**.
213201
1. Click the **API packages** tab.
214202
1. Click **Create API package**.
215-
1. Enter a name in the **API package name** field.
203+
1. In the **API package name** field, enter a name for your package.
216204
1. Enable the Package rate limit and configure your rate limit.
217205
1. Click **Add operations from APIs** in the API operations settings.
218206
1. In the Add API operations pane, click your API and click **Add** next to the operations you want to package.
219-
1. Click **Create API package**.
207+
1. Click **Create API package**.
208+
209+
Your operations should now be autogenerated based on how your OpenAPI spec maps to your Routes.
220210

221211
### Publish packages to Dev Portal
222212

223-
1. In {{site.konnect_short_name}}, navigate to **Dev Portal** > **APIs** in the sidebar.
213+
1. In {{site.konnect_short_name}}, click **Catalog**.
224214
1. Click the **API packages** tab.
225215
1. Click your API package.
226216
1. Click **Publish API**.

0 commit comments

Comments
 (0)