Basic Authentication Talend Workflow Example


There is a small, but growing, user base interesting in integrating with Anaplan using Talend. Previously, we shared (upon request) a sample workflow, with the launch of our latest API version, I've been working to update this demo.


Today, I'm sharing a very simple workflow, which fetches a list of imports from your Anaplan model. This demo is intended to show how how to fetch an auth token from our authentication server, using Basic authentication, and save that for use with our API server. Please note, if your integration takes more than 30 minutes, you will need to create a subroutine to refresh and save the new token for subsequent requests.


When working with this demo, the first step will be to edit the t_JavaFlex_1 object, where you will enter your email address and Anaplan password. This object creates a string, which is the Base64 encoded value of your email address and password, and updates the authHeader variable in the AuthDetails context.

Screenshot 2020-04-22 at 22.45.46.png


The next component requests a token from our auth server, using your username and password, then updates the authToken variable in the AuthDetails context for later use. The final component is the one in which you actually communicate with our API server. Here, in the tRest_2 object, you will update the URL with your own workspace and model IDs.

Screenshot 2020-04-22 at 22.56.13.png


This is the object that will request, from our API server, the list of imports in your model. e.g. "" You can change this to exports, processes, etc. to fetch the necessary details for your integration task. This request will return a JSON array of all the imports in the model, and their metadata. You can use this to create a mapping of names to IDs, so you can work by name.