Create an API Product¶
Let's create an API Product named customer leasing that includes resources from the Customer Info API & Leasing API, as discussed in the previous example.
-
Sign in to the API Publisher.
https://<hostname>:9443/publisher
(e.g.,
https://localhost:9443/publisher
). -
Create the following two APIs by importing the attached OpenAPI definition (a.k.a Swagger definition) files.
-
Customer Info API - customer-info-api.yaml
-
Leasing API - leasing-api.yaml
Note
Ensure that you provide an endpoint for each API after it is imported. The API Product will reuse the endpoint specified at the API-level.
- It is not necessary to publish an API in order to use it to create an API Product.
After the APIs are created, the respective resources for each of the APIs will appear as follows:
Note
Only users with publisher permission are allowed to create an API Product.
If you have not already signed in to the Publisher Portal as a user who has publisher permissions (e.g.,
admin
), you need to sign out and sign in with this permission in order to be able to carry out the following instructions.
-
-
Click API Products, and then click CREATE AN API PRODUCT.
The Create an API Product page appears.
-
Enter the API Product details.
Name customer-leasing Context customer-leasing Business plan(s) Bronze -
Click NEXT.
The Add Resources page appears.
- The leftmost pane shows the available list of APIs.
- The central pane lists the available resources of a given API, which is selected in the left pane.
- You can select a resource in the central pane and add it to the right pane, which shows the resources that will be added to the API Product.
-
Add resources from the
customer-info
API.- Click the
customer-info
API in the left pane. - Select the
GET /customers
andGET /customers/{customerId}
resources in the central pane. - Click Add Selected to add them to the right pane so that it can be used for the API Product.
- Click the
-
Add resources from the
leasing
API.- Click the
leasing
API in the left pane. - Select the
GET /assets/{assetId}
andPOST /assets
resources in the central pane. - Click Add Selected to add them to the right pane so that it can be used for the API Product.
- Click the
-
Click PUBLISH to create and publish the API Product.
The API Product will appear in the API Publisher, as shown below.
The API Product will also appear in the Developer Portal, as shown below.
-
Sign in to the Developer Portal to subscribe and consume the API Product in the same way that you would do so for an API.
https://<hostname>:9443/devportal
(e.g.,
https://localhost:9443/devportal
).For more information on how to subscribe to an API, see Subscribe to an API.