Remove SnapLogic Users from Groups

In this example, we use the REST Patch Snap to connect to SnapLogic's public APIs and remove a user from a group.


Rest Patch pipeline

Design the Pipeline using a JSON Generator and a REST Patch Snap.

Download this Pipeline.

  1. 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.


    JSON Generator configuration for removing user

  2. 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.

    REST Patch Snap configuration

  3. 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.


    REST Patch output showing user removal

  1. Verify that the REST Basic Auth account has sufficient privileges to modify the group.
  2. Ensure that the Service URL and organization details are entered correctly.
  3. Revalidate the Pipeline after changes to confirm that the user was successfully removed.