In this example, we use the REST Patch Snap to connect to SnapLogic's public APIs
and remove a user from a group.
Design the Pipeline using a JSON Generator and a REST Patch Snap.
Download this Pipeline.
-
Configure the JSON Generator Snap
Click the JSON Generator Snap and configure it to supply the email ID
that you want to remove from a SnapLogic Org, for example, DocTest.
-
Configure the REST Patch Snap
Configure the REST Patch Snap to send the user details retrieved from
the JSON Generator Snap to the service URL documented in
SnapLogic Public API documentation.
You must also specify in the HTTP Headers section that the content type
used in this REST call is application/json.
- Service URL: Set this to the API path for the group you are modifying,
for example,
https://elastic.snaplogic.com/api/1/rest/public/groups/<organization>/<groupname>.
- HTTP entity: Enable the expression toggle and set the value to
$.
- HTTP header: Create a header with
Key = Content-Type and Value = application/json.
- Account: Use a REST Basic Auth account with your SnapLogic
credentials. For information on setting up your account, see REST Basic Auth Account.
-
Execute the Pipeline
When you run the Pipeline, the user listed in the
JSON Generator Snap is removed from the group
specified in the Service URL.
- Verify that the REST Basic Auth account has sufficient privileges to modify the group.
- Ensure that the Service URL and organization details are entered correctly.
- Revalidate the Pipeline after changes to confirm that the user was successfully removed.