Create and Share Event API Products

This tutorial will teach you how to create an Event API Product (EAP) and release the EAP and/or host it as a public website so that your external partner developers can access its AsyncAPI document. The following topics are covered in this tutorial:

  1. Create an Event API Product
  2. Download the EAP's AsyncAPI Document
  3. Release the EAP
  4. Host an Event API Product Website

Before your begin

  • Ensure that you have the correct user role and permission in Event Portal. At minimum you will need the Event Portal Manager permission. For more information, refer to Managing Users, Roles, and Permissions. '
  • Only events marked as shared can be part of an Event API Product. To learn how to mark an event as shared, refer to Creating an Event.

Create an Event API Product

You can create an Event API Product (EAPs) containing a subset of events from one or more applications domains. In the example below, we will create an EAP and add events to it.

  1. Log in to your PubSub+ Cloud account and select Event API Products on the welcome screen or the API Products icon on the left navigation bar.
  2. If you are haven't previously created an EAP, the Event API Products page will be empty. Click Create.
  3. On the Create Event API Products page, perform the following tasks:
    1. Give a Name to the EAP. The name must be unique.
    2. Select a Logical Event Mesh. Only shared events from the selected LEM can be added to an EAP. Note that once an EAP is created, you cannot change the LEM.
    3. Write a Summary.
    4. Provide a detailed Technical Description.
    5. Optionally, add the server settings information:
      • Server URL. A URL that applications can use to connect to a specific server and start sending and/or receiving data. For more information refer to Server Objects section in the AsyncAPI documentation.
      • Server Protocol. A mechanism (wireline protocol OR API) by which messages are exchanged between applications. For more information refer to Protocol section in the AsyncAPI documentation.
  4. At this stage, your EAP does not have any events. Select the Events tab to add one or more shared events.
  5. Click the Add Events button.
  6. On the dialog that appears, select the checkbox beside the event you want to use. You can select multiple events. Once you have selected the events you want to add to the Event API Product, click Apply.

    Perform a search to find the events you want to use.

  7. (Optional) After adding the events, configure the event operation to publish, subscribe, or both. The subscribe option is selected by default. Configuring the pub/sub operation on an event should be done from the client application perspective. For example, an event selected as “subscribed,” implies that a client application using the EAP’s AsyncAPI can choose to “subscribe” to receive this event.
  8. Click Save.

Your newly created EAP will be available on the Event API Products page and it will have the Not released status. The EAP must be released to make it externally accessible. In the next topics, we will show you how to:

Download the EAP's AsyncAPI Document

In some situations you may not want to release an Event API Product (EAPs) externally. For example, some partner developers may work in a highly secure environment without internet access. In that case, you can download the Event API Product's Async API document from the console and share it with external partner developers so that they can host it on their own private servers.

To download an EAP AsyncAPI File, do the following.

  1. Log in to your PubSub+ Cloud account and select Event API Products on the welcome screen or the API Products icon on the left navigation bar.
  2. On the Event API Products page, select an EAP.
  3. On the EAP page, click Download AsyncAPI.
  4. In the dialog that appears, select JSON or YAML.
  5. Click Download Async API.

Release the EAP

To provide external access to an Event API Product (EAP), you must first release it. After an EAP is released, external partners and developers can immediately access its AsyncAPI document using the public REST API. This allows external partners and developers to integrate the REST API into third-party API Portals to advertise the availability of the EAP. Optionally, you can make the EAP available as a hosted website so that your partner developers can view the EAP from their web browser and download the AsyncAPI document.

To release an EAP and optionally host its website, perform the following steps:

  1. Log in to your PubSub+ Cloud account and select Event API Products on the welcome screen or the API Products icon on the left navigation bar.
  2. On the Event API Products page, select an EAP.
  3. On the EAP page, click the Release button on the top right.
  4. On the dialog that appears, do the following:
    1. (Optional) Select the checkbox beside Host Website to host the EAP on a public web page. You can host an Event API Product website while releasing it or after. For additional information about hosting an EAP website, refer to Create and Share Event API Products.
    2. Click Release. After the EAP is released, the REST API icon will be visible on the EAP page. If you selected the Host Website option, the website icon will also display.
  5. You can now share the REST API URL or the website URL (if enabled) with your partner developers. On the EAP page, peform the following steps to share the REST API URL or the Website URL.
    • REST API—select JSON or YAML format, and click Copy URL to share.
    • Website—copy the URL to share or click the URL to open it in a new tab

Your partner developers can now retrieve the EAP’s AsyncAPI document through REST API or the hosted website, and integrate it into a third-party API Portal.

For information on how your partner developers can retrieve the AsyncAPI document using the public REST API, see Retrieve an EAP's AsyncAPI Document (Partner Developers).

For information on using the EAP's hosted website, see Host an Event API Product Website.

Host an Event API Product Website

You can make a released Event API Product (EAP) available as a hosted website so that your partner developers can view the EAP from their web browser and download the AsycnAPI document. In the case of multiple EAP's, each published EAP is hosted on it's own website. There are two ways you can enable hosting of an Event API Product website:

  • When releasing an EAP, you can optionally choose to host it as a website. To learn more, refer to Release the EAP .
  • Host an Event API Product website after the EAP is released.

To host an Event API Product website after it has been released, perform the following steps:

  1. Log in to your PubSub+ Cloud account and select Event API Products on the welcome screen or the API Products icon on the left navigation bar.
  2. On the Event API Products page, select an EAP that has been released. A released EAP will have a green REST API icon () displayed on the card.
  3. On the EAP page, click Host Website located on the right pane.
  4. On the dialog that appears, click Host. Once an EAP is hosted as a public website, the following icons will be displayed on the EAP page: website () and REST API ().
  5. You can now obtain the EAP's public URL from the console and share it with your partner developers. To view the EAP's hosted website, click the URL to open it on a new tab.

Your partner developers—or, anyone with the URL—can browse the website to view the EAP’s AsyncAPI as a web document and download it in JSON or YAML format.

Next Steps