Data Integration is a set of processes that bring data from disparate sources in to Anaplan models. These processes could include activities that help understand the data (Data Profiling), cleanse & standardize data (Data Quality), and transform/load data (ETL).
Anaplan offers following data integration options.
Anaplan learning center offers several on-demand courses on Anaplan’s data integration options. Following is a list of on-demand courses.
This article presents step by step instructions on different integration tasks that can be performed using Anaplan integration APIs. These tasks include:
Setup Install & Configure Postman
You may follow instructions provided in this article against your instance of Anaplan platform. You will need to download a set of files for these exercises.
Anaplan RESTful API, Import, allows you to bring data into Anaplan. This is done by using POST HTTPs verb to call an import. This means, an import action must exist in Anaplan prior to the API call. Initially, you will import Employees.csv into Anaplan using the application. Subsequent imports into this list will be carried out via API calls.
Anaplan Integration API Fundamentals
Anaplan Integration APIs (v1.3) are RESTful API that allow for requests to be made via HTTPS using GET, PUT, POST, & DELETE verbs. Using these APIs, you can perform integration tasks such as:
End points enable you to obtain information regarding workspaces, models, imports, exports, processes, etc… Many end points contain a chain of parameters.
We want to get a list of models in a workspace. In order to get a list of models, we will, first, need to select a workspace a model belongs to.
"name": "Pavan Marpaka"
Many end points contain a set of parameters that can be chained together in a request. For example, to get a list of import actions we can chain together workspaceId & modelId as parameters in a GET request. Request call to get a list of import action might look something like:
Following sequence of requests need to be made to get a list of import actions in a selected model.
Format for most request and responses is application-json. Exception to this are when uploading files in a single chunk or multiple chunks and getting data in a chunk. These requests use application/octet-stream format. These formats are specified in header of an API request. They are also specified in header of a response.
Data Integration with Anaplan APIs & Postman Background
Next few sections will provide you with step by step instructions on how to perform different data integration tasks via Anaplan integration API requests. You will perform following data integration tasks using Anaplan APIs:
Postman application, an HTTP client for making RESTful API calls, will be used to perform these integration tasks. You should have installed and configured Postman on your workstation using instructions provided in the beginning of this article. You may follow steps outlined in the next few sections. You may also import Postman collection (json file) provided with this article.
Navigating Postman UI
This section presents basics of Postman user interface (UI). You will learn how to perform simple tasks required to make API calls. These tasks include:
You will perform above steps repeatedly for each integration task.
Import data into a List using Anaplan APIs
One of the data integration tasks is to bring data into Anaplan. Popular method to bring data into Anaplan platform is via Import feature in Anaplan application. Once imported, an import action is created. This import action can be executed via an API request.
Earlier, you have imported Employees.csv file into a hierarchy. In this section, you will use Anaplan Integration APIs to import employees’ data into the hierarchy. Following sequence of requests will be made to import data into the list.
Get a list of workspaces
Get a list of Models in a workspace
Get a list of files
Upload a file
Get a list of Import actions in a model
Call an import Action
Click Send button
Response to this request should result in the following.
Check status of an import call
Validate import in Anaplan
In Anaplan application, validate the Customers list with a list of customers.
Export data using Anaplan APIs
An export definition can be saved for later use. Saved export definitions can be viewed under Settings > Actions > Exports.
Earlier (Section 2), you exported the organization hierarchy and saved the export definition. This should have created an export action (ex: Grid – Customers.csv).
In this section, we will use Anaplan APIs to execute the export action. Following sequence of requests will be made to export data.
Get a list of Export Definitions
Run the export
Get status of an export task
Download File using Anaplan APIs
Files that have been either previously uploaded or exported can be downloaded using Anaplan API.
In previous section, you exported the list to a csv file via APIs. In this section, you will use APIs to download the exported file. Following sequence of requests will be made to download files.
Get a list of files
Get chunkID and Name a file
Get a chunk of data
Repeat the above step for each chunkID returned from the "Get chunkID and Name" API call. Concatenate all the data into a single file.
Concatenate chunks into a single file
After collecting data from all the chunks, concatenate the chunks into a single output file.
CAUTION: If you would like to download the file in a single chunk, DO NOT make the following API call. It is NOT supported by Anaplan and may result in performance issues. Best practice for large files is to download the files in chunks using steps described above.
Delete File using Anaplan APIs
Files that have been either previously uploaded or exported can be deleted using Anaplan API. In previous sections, you have uploaded a file to Anaplan for import. You’ve also exported a list to a csv file via APIs. In this section, you will use APIs to delete the exported file.
Run a Process using Anaplan APIs
A process is a sequence of actions. Actions such as import, and export can be included in a process. In an earlier section (Setup), you created a process called “Import & Export a List”. In this section, we will execute this process using Anaplan APIs. Following sequence of requests will be made to execute a process.
Get a list of Processes in a model
Run a Process
Get status of a process task
In this article, you learned fundamentals of Anaplan integration APIs & their structure. You were also presented with step by step instructions on how to call Anaplan REST APIs to perform various data integration tasks.
Attached with this article is an export of Postman collection in .json format. If you choose to, you may import this export into your Postman environment for solution to exercises described in this article. You will need to modify various variables (ex: username/password) and end points specific to your environment, for the solution to run successfully.