Skip to main content
Question

Using Python , how i can Create Authorization just like we create User or Group?

  • January 24, 2020
  • 2 replies
  • 2 views

Hello Community, Using Python API , how to create Authorizations ? Example of Create User user = User.create_new(Username, FirstName, LastName, foo@bar.com, Password123) How to Create Authorization with similar approach ? , documentation for that seems missing. Regards Vivek Oza

2 replies

  • Level 0
  • November 22, 2021

Hi Vivek,

 

this seems like an topic I recommend approaching our ServiceDesk with. They will route you to the correct resources internally.

 

Best

Kevin


gabriel.okaba11
Celonaut
Forum|alt.badge.img+2

Hi VIvek,

 

Please find below the details

# Create Users & Groups

  user = User.create_new("Username", "FirstName", "LastName", "foo@bar.com", "Password123")

  group = Group.create_new("Foo")

  group.add_user(user)

  group.remove_user(user)

  sub = Group.create_new("SubFoo")

  group.add_subgroup(sub)

  group.remove_subgroup(sub)

 

  # Permission Management

  analysis.folder.set_permissions(group, Analysis, Permission.VIEW | Permission.EDIT)

 

Please find attached the used apis in the past referring to your example.

 

Best,

Gabriel