The following article shows how to run a yunIO service in Postman.

Postman is an API platform for building and using APIs. You can use Postmn as a Desktop App or in your browser. For more information on Postman, see Postman Documentation.

Prerequisites in yunIO #

  1. Create a service in yunIO. The depicted example uses the BAPI SD_RFC_CUSTOMER_GET to search and extract customer data from SAP. The service has the following settings:
    • Set the Import Parameter NAME1 to Supplied by Caller.
    • Select all fields in the Table CUSTOMER_T for the output.
  2. Click copy-URL to copy the URL of the service definition or click download-file to download the service definition.
    yunio-Services

Loading a yunIO Service in Postman #

  1. Open Postman in your browser or on your desktop.
  2. To load a service definition in Postman, navigate to your workspace and click [Import].
    Postman-Workspace
  3. There are 2 ways to import a yunIO service definition:
    • Paste the URL of the service definition in the tab Links.
    • Upload a service definition from your harddrive in the tab File.
  4. Click [Import] to import the service definition. The service definition is now available in your workspace.
    Postman-Import

Tip: If you don’t have any authentication, headers, or parameters to add to the service, open a new tab and paste the URL of your yunIO service endpoint into the main URL input line. Select POST from the method drop-down list and click [Send] to execute the service.

Parameterizing the Service #

All parameters defined in yunIO are accessible in the request body of the service.
To set parameters, edit the Body accordingly e.g., set the input parameter NAME1 to “John%” to get all data of customers whose names starts with “John”.
There are multiple ways to set the parameter:

  • Enter the parameter value directly into the request body: "NAME1": "John%"
  • Use a variable to set the parameter: "NAME1": "{{my_variable}}"
    For more information on variables in Postman, see Using Variables in Postman.

Postman-Import

Running the Service #

Note: If the option Request credentials from callers when running services is active in the connection settings in yunIO, you have to select Basic Authentication in the Authentication tab of Postman and enter your SAP credentials before running the service.

After importing the service definition, the URL of the service endpoint is available in the main URI input line. If not, enter the URL and select the POST method. Click [Send] to execute the service.
Swagger-Inspector

The results are displayed in the Response section of Postman. Postman-Results