Contributed by @MohammedRafi from Agilisium
The purpose of this pattern pipeline is to create a single/group of admin users and the default project folder for each user in SnapLogic using an API.
Note: This pattern assumes the email convention of email@example.com is used.
This pattern consists of two pipelines:
Sources: JSON File
Targets: JSON File
Snaps used: Mapper, JSON Splitter, Pipeline Execute, Copy, JSON Formatter, File Writer
This pipeline is called from a Triggered task. It consumes the input JSON message, which contains two fields: Email ID and administrator. The Email ID field contains the list of users to be added to SnapLogic while the administrator field contains either “true” or “false”, specifying whether the user is an administrator.
The output will be written in file to SLDB in JSON format and we have an unconnected output view to get the response using REST calls.
Output Values: It contains the following fields: statusUser, user, and email.
Sources: email address
Targets: SnapLogic user and user project
Snaps used: REST Get, Mapper, Router, REST Post, Union
This pipeline validates whether the users already exist in SnapLogic and if not, creates a new user and default folder in SnapLogic using REST POST. It also captures the error and sends back the response to the master user provisioning pipeline.