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.

  1. Sign in to the API Publisher.

    https://<hostname>:9443/publisher

    (e.g., https://localhost:9443/publisher).

  2. Create the following two APIs by importing the attached OpenAPI definition (a.k.a Swagger definition) files.

    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 you create each of the APIs, click Try Out, to view the respective resources for each of the APIs as follows:

    • Customer info API

      Customer info API

    • Leasing API

      Leasing API

    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 Internal/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.

  3. Click API Products on the left menu, and then click on API Product.

    Create API Product Menu

    The Create an API Product page appears.

  4. Enter the API Product details.

    Name customer-leasing
    Context customer-leasing

    Define an API product

  5. Click NEXT.

    The Add Resources page appears.

    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.
  6. Add resources from the customer-info API.

    1. Click on the customer-info API in the left pane.
    2. Select the GET /customers and GET /customers/{customerId} resources in the central pane.
    3. Click Add Selected to add these resources to the right pane so that you can use them to create the API Product.

    Add resources from the customer-info API

  7. Add resources from the leasing API.

    1. Click on the leasing API in the left pane.
    2. Select the GET /assets/{assetId} and POST /assets resources in the central pane.
    3. Click Add Selected to add these resources to the right pane so that you can use them to create the API Product.

    Add resources from the leasing API

  8. Create the API Product.

    • If you only want to create the API Product without deploying and publishing the API Product, click Create.

      The API Product will appear in the API Publisher, as shown below.

      API Product in the API Publisher

    • If you want to create, deploy and publish the API Product, click Create & Publish.

      Deploying the API Product will make it available for invocation via the Gateway, and publishing the API Product will make it available in the Developer Portal.

      Info

      Skip steps 9 and 10 if you opt for this option.

      In this case, the API Product will also appear in the Developer Portal, as shown below.

      API Product in the Developer Portal

  9. Deploy the API Product.

    This makes the API Product available for invocation via the Gateway.

    Info

    API developers can try out the API Products from Publisher Portal's tryout console when the API Product is in the CREATED state.

  10. Publish the API Product to make it available in the Developer Portal.

    Publish API Product

  11. Sign in to the Developer Portal to subscribe and consume the API Product in the same way you would do 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.

Top