Users

Manage users.

See Manage Users and UserGroups to learn how user management works in GoodData.

Entity Methods

Declarative Methods

Example

List, create and delete users:

from gooddata_sdk import GoodDataSdk, CatalogUser

# GoodData base URL, e.g. "https://www.example.com"
host = "https://www.example.com"
# GoodData user token
token = "some_user_token"
sdk = GoodDataSdk.create(host, token)

# List users
users = sdk.catalog_user.list_users()

print(users)
# [
#   CatalogUser(
#       id='demo2',
#       attributes=CatalogUserAttributes(
#            firstname='John',
#            lastname='Doe',
#            email='john.doe@email.com',
#            authentication_id='abc'
#       ),
#       relationships=CatalogUserRelationships(
#           user_groups=CatalogUserGroupsData(
#               data=[
#                   CatalogUserGroup(
#                       id='demoGroup',
#                       relationships=None
#                   )
#               ]
#           )
#       )
#  ),
#   ...
# ]

# Define user
user = CatalogUser.init(user_id="abc", firstname="John", lastname="Doe", email="john.doe@email.com", authentication_id="xyz", user_group_ids=["demoGroup"])

# Create user
sdk.catalog_user.create_or_update_user(user=user)

# Delete user
sdk.catalog_user.delete_user(user_id=user.id)