User and Group APIs (archived)

This topic might be out-of-date and is replaced by the following:

In this Article

Overview

User and Group APIs enable you as an Org admin to perform operations on users and groups in a SnapLogic Org.

The following user-based operations are supported:

  • Creating a user

  • Updating a user

  • Deleting a user

  • Retrieving a user's information

The following group-based operations are supported:

  • Creating a group

  • Fetching a group's information

  • Fetching information of all groups in an Org

  • Updating members' list

  • Adding members in a group

  • Removing members from a group

  • Deleting a group



Any user can retrieve their own user data, but only Org admins can see other users and are able to make any modifications.

Authentication

The API authenticates requests using basic authentication over HTTPS. Support for more authentication methods is under consideration for future updates.

If you are using the REST Snaps to access the SnapLogic API, you will need to create a REST account with your SnapLogic credentials.

User API

  • Creating a User (POST)

  • Fetching Information

    • Get Users by Email (GET)

    • Get Users by Org (GET)

  • Updating a User (PUT)

  • Deleting a User (DELETE)

Create User

This is a POST-type request to create a new user. Only Org admins can use this API. The response from such a call is a document displaying details of the user.

API

Syntax

Parameters

Key

Description

Key

Description

email

String. Specifies the user's email.

first_name

String. Specifies the user's first name.

last_name

String. Specifies the user's last name. 

organization

String. Specifies the name of the organization in which to place the user.

administrator

Boolean. Specifies whether the user is an administrator.

allow_password_login

Boolean. Specifies whether the user can login with password.

create_home_directory

Boolean. Specifies whether a default project is to be created for the user. The path is



ui_access

Boolean. Specifies whether the user has access to the UI. This value is set to false of service accounts.

email_notification

Boolean. Specifies whether the user receives a welcome email notification when an account is created.

utility

Boolean. Creates the user as a service account.

Example





Retrieve Users by Email

Fetches user data for the specified Email. 

API

Syntax

Parameters

Not applicable.

Examples

Retrieve Members List for an Organization

Retrieves a list of members within an Org segregated by group.

API

Syntax

Parameters

Not applicable.

Examples

Update a User

Updates data of the specified user.

API

Syntax

Parameters

Key

Description

Key

Description

first_name

String. Specifies the user's first name.

last_name

String. Specifies the user's last name.

allow_password_login

Boolean. Specifies whether the user can login with a password.

ui_access

Boolean. Specifies whether the user has access to the UI. This value is set to false of service accounts.

created_by

String. Specifies the user who originally created the service account. This parameter enables an Org admin to change the user who originally created the service account in cases where the password recovery email for that user needs to be reset. You cannot specify the current Service Account user with this parameter.

  • The user who calls this API must be Org admin (org_admin).

  • The target user must be a service account user.

  • The target user in the "created_by" value must be an Org admin of the updated user's Org.

For details, see Creating a User

Examples

Delete a User

Deletes a user from the database. To successfully perform this action, you need to be an admin on all of the user's orgs.





API

Syntax

Parameters

Not applicable.

Examples

Group API

  • Creating a group

  • Fetching a group's information

  • Fetching information of all groups in an Org

  • Updating members' list

  • Adding members in a group

  • Removing members from a group

  • Deleting a group

Create a Group

To create a group and add members to it, you must do two API calls. Use this API to create the group. To add members to the group, make this API call again using the Members parameter. 





API

Syntax



Parameters

Key

Description

Key

Description

organization

String. Specifies the name of the organization within which the group is to be created.

name

String. Specifies the name of the group. This value has to be unique within the Org.

members

List. Specifies a list of the user's email belonging to the group.

Examples

Retrieve Groups by Organization

Retrieve an Org’s groups.

API

Syntax

Parameters

Not applicable.

Examples

Retrieve Group by Name

Fetches all information for the specified group.

API

Syntax

Parameters

Not applicable.

Examples

Update Members List

Updates the members list of the specified group in the specified Org. Each time this call is executed, the members list is overwritten.

API

Syntax

Parameters

Key

Description

Key

Description

members

List. Members in the group, the existing members list is overwritten.

Examples

Add/Remove a Group

Add/remove group, and add or remove users from that group.

API

Syntax

Parameters

Key

Description

Key

Description

add_user

String. Specifies the email of the user to be added to the group.

remove_user

String. Specifies the email of the user to be removed from the group.



Examples



Delete Group

Deletes the specified group from the specified Org. 

API

Syntax

Parameters

Not applicable.

Examples

Using REST Snaps to Execute APIs

You can execute the following APIs using pipelines:

  • User API

    • Create User

    • Retrieve Members list for an Organization

    • Retrieve Users by email

    • Update a User

    • Delete a User

  • Group API

    • Create a Group

    • Retrieve Groups by Organization

    • Retrieve Group by Name

    • Update Members List

    • Add/Remove a User

    • Delete Group