This blog demonstrates how to consume REST Service in Boomi

In this blog, let us discuss about how to consume REST service.
- To consume REST service in boomi, we have a connector called “HTTP Client” through which we can use the service provided by third party API.
- Here, we want to access particular employee data from third party API where we give employee id as an input and will return complete data of an employee as the response.
Note : We are going to cosnume below third party api in this use case:
http://dummy.restapiexample.com/api/v1/employee/{id}
Above endpoint has following parts:
a) Base URI / Base Path : http://dummy.restapiexample.com
b) Relative URI / Resource Path : /api/v1/employee/{id}
Here id is the URI parameter which is dynamically populated by the client while calling the api.
Now, let us see the steps involved:
Step 1:
Firstly, create a process with a start shape and type http in shape pallete, you will get to see “Http Client” connector.

Step 2:
Drag and drop “Http Client” connector onto the process canvas and place it after the start shape. Also drop a staop shape as shown below.

Step 3:
Now, we have to configure 3 things in the connector i.e Action, Connection and Operation.

Step 4:
If we look at the Action, we find two operations i.e Get and Send. If we are sending data to an API, we will use send operation. In this example, we are going to get the records of an employee. Therefore, we use Get Action.

Step 5:
To configure the connection, Click + and give a relevant name to the connection. You see 2 parts in the connection tab i.e URL and Authentication type.0
- In place of URL, give base URI of the api which we want to consume.
- Based on the authentication type provided by the third party api, we have to choose the right Authentication Type. We are going to leave it as none which is default (as we don’t have any authentication on the api being consumed in this blog)
- You can optionally configure client certificate authentication i.e SSL options based on the certificate provided by the third party.
- Click on save and close.

Step 6:
Now, click on + to configure the operation and give a relevant name.
In options tab, we find connector action as GET by default as we have configured GET in the connector.
- Select request and response profiles based on the data that is being sent and received by the connector but it’s not mandatory to populate them.we will put both request and response profiles as NONE for now.
- Content type describes the format of data. In this example, it is application/json.
- HTTP Method defines the type of request. In this case, it would be GET as we want the employee record to be fetched.

Step 7:
- If you scroll down you will find Request Headers where you can add the headers which are required to access the API. In this case, we don’t have any headers.
- Next, place the Resource Path i.e (add the path which is after the baseuri).
- The URL which we are going to access is http://dummy.restapiexample.com/api/v1/employee/{id}. So, http://dummy.restapiexample.com becomes the base path and “api/v1/employee/{id}” will be added to the resource path. Make id as replacement variable so that would be a dynamic value defined in the shape’s Parameters tab that gets populated dynamically.
- The value would be replaceable only if we check the parameter as shown below.


Click save and close.
Step 8:
Now, to assign value to the replacement variable (which is id in this example), we should click on “HTTP Client” connector and go to Parameters tab.

Step 9: Now, set the value by hitting + button and you see parameter value with 3 options i.e Input, Type and Static Value. Choose input and you will automatically see id as input as you have declared it to be a replacement variable in the resource path. Give Type as Static and Static value would be any employee id (In this case, the value is 12)

Step 10:
Now, test the process and check for the response.

