SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Send and Receive Test SAP Event Mesh

Test send and receive of message with REST protocol using the Postman tool for a SAP Event Mesh instance.

Overview

🎓 beginner 15 min. SAP Event MeshBeginnerCloudSAP Business Technology Platform

You will learn

  • โœ”Send and Receive message to and from a queue using Postman, a REST-based tool
  • โœ”IMPORTANT: It is really important to understand the concept of Service Key of an SAP Event Mesh instance. Check out Step 2 of Create Instance of SAP Event Mesh Service.
Unknown U Unknown November 1, 2022
Created by August 26, 2019
Contributors

Prerequisites

Prerequisites

  • Postman, API Development environment Tool is available to publish & receive message from queue using REST Protocol

Steps

Step 1 Configure postman
โ€”

  1. Open the Postman.

  2. Click on “New” to open a new tab on Postman to work on.

    new tab
    new tab

  3. Fetch the OAuth2.0 access token to be used for authorization on all subsequent operations in same session

    service keys for rest protocol
    service keys for rest protocol

  4. Provide the token endpoint URL in Postman URL from the Service Keys for the protocol type HTTPREST.

    Build the postman URL by appending the GRANTTYPE as CLIENTCREDENTIALS and RESPONSETYPE as token

    So the final postman URL should look like this:

Code
<<tokenendpoint>>?grant_type=client_credentials&response_type=token

<<tokenendpoint>> is to be replaced with the 'tokenendpoint' field of the service key.
In the Headers tab, enter `Content-Type` as KEY and `application/x-www-form-urlencoded` as VALUE.

postman headers
postman headers

In the Authorization tab, select the Type as Basic Auth from the dropdown.

  • In Username, provide the <clientid> value from the Service Keys for httprest protocol.

  • In Password, provide the <clientsecret> value from the Service Keys for httprest protocol.

    ![postman authorization](https://raw.githubusercontent.com/sap-tutorials/Tutorials/master/tutorials/cp-enterprisemessaging-test-queue-sendreceive/postman-authorization.PNG)
    

Select the POST option in Postman and click on the Send button. You will get the access_token.

Step 2 Send message to the queue
+
Step 3 Receive message from queue
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Configure postman 2. Send message to the queue 3. Receive message from queue

Learn more →