Summary


This document describes how to implement Boomi API's in a standard way.

We will discuss the following subjects to successfully implement an API in Dell Boomi:


 

Create an API

Create an API service via the build tab and give the API the name of the object that you will use in the process.

In this example we will use "employee" as an object:



General tab

In the general tab we can add the API title, published version number and base API path.

For the API title we can add the name of the object (employee) and for the version number we can add 1.0 as a value.

The Base API path must be unique for each environment that the API component is deployed:

<object>/<version>/<sub-object (when applicable)>


In this example the API path will be as follows : employee/v1



When upgrading to a new version (for example employee/v2) it's necessary to create a new API service!



REST tab

In the REST tab we can implement an endpoint in two different ways:


  1. Creating an endpoint manually 
  2. Import an existing process

Before you can choose option 2 it's necessary to create a web service process first.


Creating a web service process

Create a new process called WS-<name of the object>.

In this example we will create a new process called WS-Employee.


Open your new process and select the web services server as a start shape.

The name of the operation will be as follows WSS-<name of the object>.

In this example we will create a new operation called WSS-Employee.


Web Services server operation

Please select the right operation type for this process. For more information about operation types please click here.

After selecting the operation type it's necessary to select the expected input and output type.

For more information about input and out types please click here.



After creating a web services server as a start shape add a sub process:



In the sub process you will create all the logic behind the API.


Parameter settings

To retrieve a parameter value from a REST API URL you can add a variable in the resource path, for example id:

In a (sub-)process you can call this variable by using a dynamic process property in a set properties shape.

The parameter will start with param_ and the name of the variable, in this example "id".


Multiple Parameters

It's also possible to retrieve data by using multiple parameters (queries).

You can set the query parameters in the REST API URL call:


To retrieve those parameters you can use also a "Set Properties Shape" and add (multiple) dynamic process properties.

The parameter will start with query_ and the name of the variable, in this example "employee_id or department".




Error handling

Add a try / catch shape in the sub-process.

Set a process property shape in the catch route and add a dynamic document property with "outstatuscode" as a name and call a dynamic process property called "DPP_OUTSTATUSCODE"



In every decision or connector call during the process you will set this dynamic process property with the right status code as a parameter.


After the set properties shape you will add a (dummy) exception shape.



Publish an API

Before you publish the API it's necessary to deploy the WS process first!