SAP Build Process Automation – Deploy and Test an API Trigger using Postman
SAP build process automation refers to the implementation of tools and workflows that streamline the development, deployment, and testing of SAP applications. SAP Build Process Automation with Postman involves streamlining the deployment and testing of an API trigger. With Postman, you can create a collection of API requests, including the trigger, and define test scenarios with assertions. By running the collection, Postman automatically deploys the API and performs tests, validating responses for efficiency and accuracy. This automation saves time and ensures a reliable SAP API build process.
Step 1 – Release Business Process Project
Before you run the process, ensure that the process is saved and that there are no errors showing in the Design Console. Release and deploy the Business Process project initially in order to commence the process. An updated version of the project is created when it is released.
- Select Release from the Process Builder menu.
- Add a Version Comment if needed and choose Release.
- If it is an additional version, choose the type of version, add a Version Comment if needed and choose Release.
- The project has successfully been released and is being prepared for deployment.
Step 2 – Deploy the Released Process
Each project’s released version can be deployed as a business process project in the Process Builder or via the Lobby. The project is made available for usage by others after deployment. Bare in mind that you can only deploy the project’s released version.
- Select Deploy from the Business Process project’s released menu in the Process Builder.
- In this case there are no Variables to set, choose Confirm.
- Choose Deploy.
- The project deployed successfully and is now ready for running and monitoring.
- In the project status list next to the project name, you can also view every version of every deployed and/or launched project.
Step 3 – Create a Trigger
An API trigger opens a specific endpoint that enables an external application to initiate the execution of an automation or scenario in a selected deployed package via an HTTP POST request. An API trigger is always attached to one automation or scenario in one deployed package.
- Select Add Automation Trigger.
- Select your Application and click Next.
- Select API and click Next.
- Set Trigger Name and click Next.
Step 4 – Create API Key
An API key is a unique token that may be used as authorization to read access to environments and to run API triggers. For many public endpoints, API keys are used in addition to client credentials.
- Head over to SAP Build’s lobby landing page.
- Go to Settings > API Keys.
- To create your API Key. Click Add API Key.
- Set Name to myAPIKey and click Next. Click Next after selecting both trigger_read and trigger_execute.
- and click Next.
- Click Add.
- Click Copy and note down what was just copied to your clipboard.
Step 5 – Create Instance and Service Binding
Service binding makes the information or credentials needed by the application to access the service instance.
- Navigate to SAP BTP Cockpit sub-account > Services > Instances and subscriptions.
- Choose Create.
- For the new instance:
- Select SAP Build Process Automation as Service.
- From the list of plans, choose the Standard Instance plan.
- Select Other as Runtime Environment.
- Name your instance “SPA-instance”.
- Choose Create.
- Create a new Service Binding by selecting your SPA-instance instance > Select … to expand > Create Service Binding.
- Put the name as myServiceBinding and click Create.
- Click … and then click View to view the Service Binding created.
- Click Form and copy the clientid, clientsecret and URL. It is required in the next phases.
Step 6 – Create API Trigger URL
An API trigger is always attached to one automation or scenario in one deployed package.
- Navigate to Home > Monitor > Triggers/ Automations
- Find your trigger.
- Choose Edit by clicking Actions.
- Copy URL and Payload.
Step 7 – Work with Postman
Postman is an API Platform for developers to design, build, test and iterate their APIs.
- Open Postman Workspace.
- Paste the copied URL and set the method to POST
- Go to Authorisation tab and select OAuth 2.0.
- Select Configure New token > Grant type > and Paste your Client Credentials.
- Select Headers and in the value section, paste the api key and give it a random name..
- Select Body > raw > json and paste the copied payload with values inside it.
- Choose the Authorisation tab, enter all the credentials, then click Get New Access Token and Run Body.
- Finally it displays, Success 200 Ok created.
Here you can find some learning content:
This short blog can help you to understand basic knowledge about SAP Build Process Automation.
Since i am also new to writing blogs, Expert suggestions & feedbacks are much appreciated.
If you like this blog post you can follow me for more blogs i will try to make in coming future specifically related to SAP BTP Technologies.
Tazeem Umra Rajgolkar.