Creating users and groups¶
Like other objects in the SDK, you can create users and groups using the builder pattern.
Create a group¶
For example, to create a group:
Create a group | |
---|---|
1 2 3 |
|
- When creating a group, you must specify at least its name.
- Like other builder patterns, you build the object to make it ready for creation.
- To actually create the group in Atlan, call the
create()
method on the built object. Note that it will return the GUID of the group that was created when successful.
Create a group | |
---|---|
1 2 3 4 5 6 |
|
- When creating a group, you must specify at least its name.
- To actually create the group in Atlan, call the
group.create()
method with the built object. Note that it will return a minimal object that includes the GUID of the group that was created in thegroup
property.
Create a group | |
---|---|
1 2 3 |
|
- When creating a group, you must specify at least its name.
- Like other builder patterns, you build the object to make it ready for creation.
- To actually create the group in Atlan, call the
create()
method on the built object. Note that it will return the GUID of the group that was created when successful.
POST /api/service/groups | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
- All the details for the group must be wrapped in a
group
object. - The details of the group are further nested within an
attributes
object. - Provide an alias for the group, which will be the name that appears in the UI. Note that it must be specified as an array, even though there is only a single value.
- Specify whether the group should be applied to all new users (true) or not (false). Note that this must be specified as a string within an array.
-
Provide an internal name for the group.
Must follow certain constraints
The internal name for the group must be unique, all lowercase, and include only alphanumeric characters and the
_
(no spaces or special characters).
Create a user¶
To create a user, what you're really doing is inviting them. The users will need to verify their email address to activate their account, and will be able to specify their own password as part of that process.
To invite a user:
Invite a user | |
---|---|
1 2 3 4 5 |
|
- When inviting a user, you must specify at least their email address...
- ...and the workspace role you want to give that user (one of
$guest
,$member
, or$admin
). - Like other builder patterns, you build the object to make it ready for creation.
- To actually invite the user to Atlan, call the
create()
method on the built object. Note that this does not return any information.
Invite a user | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
- When inviting a user, you must specify at least their email address...
- ...and the workspace role you want to give that user (one of
$guest
,$member
, or$admin
). - To invite the user to Atlan, simply call the
user.create()
method with the built object. Note that ifreturn_info
is set toTrue
, this will return a list containing details of the created users; otherwise, it will returnNone
.
Invite a user | |
---|---|
1 2 3 4 5 |
|
- When inviting a user, you must specify at least their email address...
- ...and the workspace role you want to give that user (one of
\$guest
,\$member
, or\$admin
). - Like other builder patterns, you build the object to make it ready for creation.
- To actually invite the user to Atlan, call the
create()
method on the built object. Note that this does not return any information.
POST /api/service/users | |
---|---|
1 2 3 4 5 6 7 8 9 |
|
- All user details must be wrapped in a
users
array, where each object in the array defines a single user. - You must provide a valid email address for each user. Atlan will send an invitation to this email address.
- You must specify the role for the user, one of:
$admin
,$member
, or$guest
. -
You must also provide the unique ID (GUID) of the role.
You probably need to look this up first
When using the raw API, you will need to lookup the role GUID yourself. You can
GET /api/service/roles
, and the GUID will be theid
field in the response for each role.