Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hello all !
I'm currently creating new users in Dataiku with a project and Python code. I use https://doc.dataiku.com/dss/latest/python-api/client.html#dataikuapi.DSSClient.create_user
My problem is that I can't find how to add the mailing information via API. The argument isn't described in the page I linked earlier. Does someone know how I can fix this ?
Thank you and have a nice day ! 😃
Hi Charly,
Once you have created your user via the API, the create_user() methods returns a handle on the instanciated dataikuapi.dss.admin.DSSUser object. You will need to use this handle to edit the settings in order to add the emailing information, here is a simplified example:
import dataiku
client = dataiku.api_client()
# Here we create the user and retrieve a handle on it. If the user
# is already created, use get_user(user_id) instead.
user = client.create_user(login="bob42",
password="bob42",
display_name="Bob",
source_type="LOCAL",
profile="DATA_SCIENTIST")
settings = user.get_settings()
settings.get_raw()["email"] = "bob42@gmail.com"
settings.save()
Once this code is run, the "Email" field in the user account properties will be filled accordingly.
Best,
Harizo
Hi Charly,
Once you have created your user via the API, the create_user() methods returns a handle on the instanciated dataikuapi.dss.admin.DSSUser object. You will need to use this handle to edit the settings in order to add the emailing information, here is a simplified example:
import dataiku
client = dataiku.api_client()
# Here we create the user and retrieve a handle on it. If the user
# is already created, use get_user(user_id) instead.
user = client.create_user(login="bob42",
password="bob42",
display_name="Bob",
source_type="LOCAL",
profile="DATA_SCIENTIST")
settings = user.get_settings()
settings.get_raw()["email"] = "bob42@gmail.com"
settings.save()
Once this code is run, the "Email" field in the user account properties will be filled accordingly.
Best,
Harizo
Thank you very much !