In this example we would show how to configure Web Service Consumer (REST) Service to call and get data from BambooHR.
BambooHR provides documentation on the various REST API operations available to get and post data into the cloud application. For example Get Table operation can be called to get a table of all the employees in your organization. Refer to http://www.bamboohr.com/api/documentation/tables.php#getTable
There are few parameters that need to addressed.
- URL Endpint: For BambooHR the sample API endpoint is https://myCompany.bamboohr.com/api/gateway.php/myCompany/v1/employees/directory
- This Endpoint (with getTable operation) when called would give us employee data
- This is a Get operation
- Security Policy to authenticate the request from Adeptia
So now let's get started on how to call a REST API by using Adeptia Integration Suite.
Step 1: If request authentication is required then Go to Develop > Services > Web Services > Security Policy and create a new security policy.
Security Policy may be a simple basic authentication where user has to provide a simple login and password or it may require an API KEY which is the case shown below. If authentication is not required then skip to Step 2.
Step 2: Configure a new Web Service Consumer activity by going to Develop > Services > Web Services > Consumer and click on create new.
Three main fields that need to be configured are
- URL is https://myCompany.bamboohr.com/api/gateway.php/myCompany/v1/employees/directory
- Method is "Get"
- Security Policy created in the previous step is selected here
- If any Key Value pairs are needed to be sent as the body of the call then you can add those parameters in the Parameter list.
Step 3: Configure an orchestration that would call and convert the REST API response into a CSV format.
Here I have created a process flow which has following steps (your process may be different based on your business needs).
- Calls BambooHR web service and gets employee data
- Maps the data into a CSV formatted report
- Report is created by the specific text schema attached after the mapping step
- Distribute the CSV file to end-users via Email target
After running the process you can view the logs and check the status as shown below.
Also refer to the attached deployable process flow to see how it is designed and configured. Use the Adeptia Migration Utility to deploy the flow into your local Adeptia instance. If you need help in designing a process flow please contact support@adeptia.com
Comments
0 comments
Article is closed for comments.