With Advanced Event Mesh enabled for API Management (covered in Part 1 of this blog series), we can now connect it to SAP Developer Hub and make the Event APIs available through the familiar developer experience.
This blog is Part 2 of a four-part series, covering the journey from setting up Advanced Event Mesh to consuming Event APIs through Developer Hub:
- Part 1: Enabling Advanced Event Mesh for API Management
- Part 2: Connecting Advanced Event Mesh and Developer Hub
- Part 3: Publishing Event APIs in Developer Hub and Managing API Products
- Part 4: Discover and consume Event APIs from SAP Developer Hub
In this part, we’ll create the required API token in Advanced Event Mesh and use it to establish a connection to Developer Hub in SAP Integration Suite.
Before you start (prerequisites):
- Have the Administrator role assigned to you in an Advanced Event Mesh instance
(we’ll be creating a token and managing Event Portal objects) - Have the “AuthGroup.Content.Admin” role collection assigned to you in subaccount where your SAP Integration Suite tenant is running
- Have the “Destination Administrator” role collection assigned to you in the subaccount where your SAP Integration Suite tenant is running
Creating an API Token
First, we need to create an API Token in SAP Integration Suite, advanced event mesh. This API Token will get the right permissions and will be used for authentication by the Developer Hub while connecting to Advanced Event Mesh.
- Go to the cloud console of SAP Integration Suite, advanced event mesh, copy the base URL of your tenant
(e.g. https://eu20.console.pubsub.em.services.cloud.sap)
⚠️don’t forget to copy “https://” - Click on the user icon at the left bottom ➡️ go to “Token Management”
- Click on “Create Token”
- Enter a name for your token, your API token must have at least the following permissions:
Permissions API Token Permission Allow access to Mission Control mission_control:access Get My Services with Management Credentials services:get:self Create/Update/Delete Client Profiles service_requests:post:client_profile Get Services with Management Credentials services:get Read any Application application:get:* Read any Application Domain application_domain:get:* Do anything to any Event API event_api:*:* Do anything to any Event API Product event_api_product:*:* Access to Event Portal Designer event_designer:access Get Application Configuration Push application_configuration_push_job:get:* Get Environment in Event Portal ep_environment:get:* Get Event Broker in Event Portal modeled_event_broker:get:* Get Modeled Event Mesh in Event Portal modeled_event_mesh:get:* Create, update, or delete published event API products and their underlaying resources apim_event_api_product:*:* Get published event API products and their underlaying resources apim_event_api_product:get:* - Once the right permissions are selected, click on “Create Token“.
- Now, a pop-up with the API Token appears.
⚠️It’s is important you copy this token and keep it for the next steps. Once the pop-up is closed you cannot reaccess the API token for security reasons. If you lose it, you’ll have to regenerate the token. - After closing the pop-up, click on the 3 dots at the right side of the token you just created and select “View Token”.
- Copy the Token ID from the token details.
✅If you have the Base URL of your AEM Cloud Console, your API Token and your Token ID at hand you are ready for the next part in this tutorial.
Create a destination on SAP BTP
After creating an API Token in Advanced Event Mesh, we’ll create a destination from the subaccount where the SAP Integration Suite is running. This destination will be used by the Developer Hub to connect to Advanced Event Mesh.
- Go to your subaccount ➡️ under “Connectivity”, select “Destinations” ➡️ click on “Create” ➡️ and select “Create New Destination From Scratch”
- Give the destination and a name and description and enter the following details:
- Type: HTTP
- Proxy Type: Internet
- URL: [AEM Base URL, copied in step 1 of the previous sections]
- User: Token ID
- Password: API Token
- Additional Properties:
- Key: sap.isuite.dh.aem.enabled
- Value: true
- After you created the destination, you can validate whether everything works fine by clicking on “Check connection” and in Developer Hub. Go to SAP Integration Suite click on the 9 little dots you see on the right top ➡️ go to “Developer Hub”
- In the Developer Hub, go to “Admin Center” ➡️ click on “Content”.
- Here you should see your Advanced Event Mesh environment under “Business Systems”, the name and description in the table should be the same name and description as your destination. Click on your AEM system.
- You should see the all your Application Domains being listed. Clicking on the Application Domain, you should see all events available in this domain. If you don’t see any events here, continue this tutorial, it will explain you how to get your Event APIs being published. If you already see some event APIs being there, skip to section “Publish an API Product”.
If you haven’t created any Application Domain yet (with applications, schemas and events), please do so, this will be required for the following exercises.
What’s next
If you see your Application Domains (from AEM) appearing in the Developer Hub it means we’ve now connected Advanced Event Mesh with Developer Hub.
In the next part, we’ll take the next step by publishing Event APIs in Developer Hub and creating and managing the API Products that make them available to developers:
Part 3: Publishing event APIs on Developer Hub and managing API Products.
With Advanced Event Mesh enabled for API Management (covered in Part 1 of this blog series), we can now connect it to SAP Developer Hub and make the Event APIs available through the familiar developer experience.This blog is Part 2 of a four-part series, covering the journey from setting up Advanced Event Mesh to consuming Event APIs through Developer Hub:Part 1: Enabling Advanced Event Mesh for API ManagementPart 2: Connecting Advanced Event Mesh and Developer HubPart 3: Publishing Event APIs in Developer Hub and Managing API ProductsPart 4: Discover and consume Event APIs from SAP Developer HubIn this part, we’ll create the required API token in Advanced Event Mesh and use it to establish a connection to Developer Hub in SAP Integration Suite.Before you start (prerequisites):Have the Administrator role assigned to you in an Advanced Event Mesh instance(we’ll be creating a token and managing Event Portal objects)Have the “AuthGroup.Content.Admin” role collection assigned to you in subaccount where your SAP Integration Suite tenant is runningHave the “Destination Administrator” role collection assigned to you in the subaccount where your SAP Integration Suite tenant is runningCreating an API TokenFirst, we need to create an API Token in SAP Integration Suite, advanced event mesh. This API Token will get the right permissions and will be used for authentication by the Developer Hub while connecting to Advanced Event Mesh.Go to the cloud console of SAP Integration Suite, advanced event mesh, copy the base URL of your tenant(e.g. https://eu20.console.pubsub.em.services.cloud.sap) ⚠️don’t forget to copy “https://”Click on the user icon at the left bottom ➡️ go to “Token Management”Click on “Create Token”Enter a name for your token, your API token must have at least the following permissions:PermissionsAPI Token PermissionAllow access to Mission Controlmission_control:accessGet My Services with Management Credentialsservices:get:selfCreate/Update/Delete Client Profilesservice_requests:post:client_profileGet Services with Management Credentialsservices:getRead any Applicationapplication:get:*Read any Application Domainapplication_domain:get:*Do anything to any Event APIevent_api:*:*Do anything to any Event API Productevent_api_product:*:*Access to Event Portal Designerevent_designer:accessGet Application Configuration Pushapplication_configuration_push_job:get:*Get Environment in Event Portalep_environment:get:*Get Event Broker in Event Portalmodeled_event_broker:get:*Get Modeled Event Mesh in Event Portalmodeled_event_mesh:get:*Create, update, or delete published event API products and their underlaying resourcesapim_event_api_product:*:*Get published event API products and their underlaying resourcesapim_event_api_product:get:*Once the right permissions are selected, click on “Create Token”. Now, a pop-up with the API Token appears.⚠️It’s is important you copy this token and keep it for the next steps. Once the pop-up is closed you cannot reaccess the API token for security reasons. If you lose it, you’ll have to regenerate the token.After closing the pop-up, click on the 3 dots at the right side of the token you just created and select “View Token”. Copy the Token ID from the token details.✅If you have the Base URL of your AEM Cloud Console, your API Token and your Token ID at hand you are ready for the next part in this tutorial.Create a destination on SAP BTPAfter creating an API Token in Advanced Event Mesh, we’ll create a destination from the subaccount where the SAP Integration Suite is running. This destination will be used by the Developer Hub to connect to Advanced Event Mesh.Go to your subaccount ➡️ under “Connectivity”, select “Destinations” ➡️ click on “Create” ➡️ and select “Create New Destination From Scratch”Give the destination and a name and description and enter the following details:Type: HTTPProxy Type: InternetURL: [AEM Base URL, copied in step 1 of the previous sections]User: Token IDPassword: API TokenAdditional Properties:Key: sap.isuite.dh.aem.enabledValue: true After you created the destination, you can validate whether everything works fine by clicking on “Check connection” and in Developer Hub. Go to SAP Integration Suite click on the 9 little dots you see on the right top ➡️ go to “Developer Hub” In the Developer Hub, go to “Admin Center” ➡️ click on “Content”.Here you should see your Advanced Event Mesh environment under “Business Systems”, the name and description in the table should be the same name and description as your destination. Click on your AEM system. You should see the all your Application Domains being listed. Clicking on the Application Domain, you should see all events available in this domain. If you don’t see any events here, continue this tutorial, it will explain you how to get your Event APIs being published. If you already see some event APIs being there, skip to section “Publish an API Product”.If you haven’t created any Application Domain yet (with applications, schemas and events), please do so, this will be required for the following exercises. What’s nextIf you see your Application Domains (from AEM) appearing in the Developer Hub it means we’ve now connected Advanced Event Mesh with Developer Hub.In the next part, we’ll take the next step by publishing Event APIs in Developer Hub and creating and managing the API Products that make them available to developers: Part 3: Publishing event APIs on Developer Hub and managing API Products. Read More Technology Blog Posts by SAP articles
#SAPCHANNEL