SAP Process Automation: How to test the API trigger with postman
In my last blog post I explained how to design a process with an API based trigger. Many of you are curious about how you can test this new feature.
I will describe the technical implementation and the testing procedure in this blog post.
To use the API trigger you need a service instance with a service key in your sub-account where you are using SAP Process Automation.
In your subaccount a service instance should be already exist. You can find the service instance in the Instances and Subscriptions section.
If you have no service instance please create a service instance by following the guided procedure after the click on the Create button.
If you have already the service instance or just created it, check if you have also created a service key.
If not please create a service key using the icon with three dots.
All information to call the API trigger are available in the service key. Therefor open the service key and use the following information:
- endpoints api url
- uaa url
Create a new post request in postman with the endpoints api url and add /workflow/rest/v1/workflow-instances to the url.
To get a token select Client Credentials as Grant Type, use the uaa url plus /oauth/token for the Access Token URL and fill in Client ID and the Client Secret.
For the Client Authentication use “Send as Basic Auth header”.
After maintaining the data click on Get New Access Token and use the token.
After this you switch to the Body tab and maintain the payload.
You can find the definition ID in the Monitoring section of SAP Process Automation. Go there to Manage and then to Processes and Workflows.
Copy the ID and paste the value into the payload. In the “context” of your payload you have to maintain all the fields you need.
Now you can execute the post request and you successfully create your first process instance via the API trigger.
You learned now how to test the API trigger in SAP Process Automation and you can start now integrate processes designed in SAP Process Automation in your applications.
You are curious now but do not how to start? Try it out now using our Free Tier offering.
You are interested in the bigger picture of LCNC?
To see LCNC in action, check out the SAP Low-Code/No-Code Learning Journey – designed to increase low-code/no-code skills and teach citizen developers the basic concepts of software development including SAP AppGyver, SAP Process Automation, and SAP Work Zone and learn how to build mobile apps for free. Check out LCNC and plus much more free learning for developers at SAP Learning site.
For more information on SAP Process Automation, please refer to the following sources:
- Exchange knowledge: SAP Community | Q&A| Blogs
- Explore: SAP Product Page | Product Demo
- Learn more: SAP Help Portal | SAP Learning Journey
- Follow us on LinkedIn, Twitter, and YouTube