How to assign a role to a 'mail group' via the API?

32 views
Skip to first unread message

Paul Boon

unread,
Jan 24, 2024, 7:21:01 AM1/24/24
to Dataverse Dev
Hi all,
While experimenting with socalled mail groups (https://guides.dataverse.org/en/latest/admin/mail-groups.html) I struggle with adding roles to it via the API.
You can (and have to) create that group via the API, but I can only assign a role to if via the UI.

For example, on a 6.0 dev box with a 'dans' collection and &maildomain/exampleorg:


returns

{"status":"ERROR","message":"Can't find &maildomain/exampleorg in dataverse 2"}
I also tried the id (number) of the group, but that did not work either.

This is following the guide; https://guides.dataverse.org/en/latest/api/native-api.html#add-a-role-assignee-to-an-explicit-group
The name suggest it only works for explicit groups and not for mail domain groups, so how should it be done?

Maybe I am doing something wrong, or maybe the omission is intentional.

Any suggestions are welcome.

Philip Durbin

unread,
Jan 29, 2024, 2:13:20 PM1/29/24
to datave...@googlegroups.com
Hmm, it should be possible. Are you assigning the role at the collection level or the dataset level?




I hope this helps,

Phil

p.s. Let's continue here but no need to use the "dev" list for this next time.

--
You received this message because you are subscribed to the Google Groups "Dataverse Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-dev/6f3e9f4b-96f6-4c9a-9814-953acd54282cn%40googlegroups.com.


--

Paul Boon

unread,
Jan 30, 2024, 2:58:01 AM1/30/24
to datave...@googlegroups.com
Hi, Sorry for using the devs group for this.

The suggestion worked!

In my case I wanted to assign the role to a group on a collection. Because I was focused on the 'group' aspect, using a mail domain group, I followed the 'group' related stuff in the guide.
This is not the first time I get lost in those API guides.

Thanks,
Paul


From: datave...@googlegroups.com <datave...@googlegroups.com> on behalf of Philip Durbin <philip...@harvard.edu>
Sent: Monday, January 29, 2024 8:13 PM
To: datave...@googlegroups.com <datave...@googlegroups.com>
Subject: Re: [Dataverse-Dev] How to assign a role to a 'mail group' via the API?
 

Philip Durbin

unread,
Jan 30, 2024, 8:20:47 AM1/30/24
to datave...@googlegroups.com
Great! Yes, please help us fix them up! :)

Reply all
Reply to author
Forward
0 new messages