Topics

New endpoint: /creategroup


 

Hi All,

I've added a new endpoint, /creategroup, to create a new group. In addition, I've added some options to /createsubgroup to determine what kind of subscription is automatically generated for you. Please see the changelog, at https://groups.io/apichangelog, for a full list of changes.

Cheers, Mark


Isaac Whitfield <iw@...>
 

Hi Mark,

I've been trying out the new /creategroup API but I get an error back with the code "group_not_found"; any ideas if I'm doing something wrong?

Thanks,
IW


 

Hi Isaac,

On Tue, Oct 31, 2017 at 8:23 AM, Isaac Whitfield <iw@...> wrote:

I've been trying out the new /creategroup API but I get an error back with the code "group_not_found"; any ideas if I'm doing something wrong?

Sorry about that bug. It should be fixed now.

Thanks,
Mark 


Isaac Whitfield <iw@...>
 

Hey Mark,

Yep, got past that error. Unfortunately now seeing "bad_request" and the extra just says "privacy". I tried setting "group_privacy_none" and "group_privacy_unlisted". Any idea what I might be doing wrong?

Thanks!
IW


 

HI Isaac,

Looks like you were submitted GET requests. That endpoint (and any endpoint that modifies things) requires a POST. I will look into adding a custom error message for that.

Also, it appears you wanted to use the group name 'foobar.com', which is an invalid name (we don't allow periods).

Hope this helps.
Mark

On Tue, Oct 31, 2017 at 7:08 PM, Isaac Whitfield <iw@...> wrote:
Hey Mark,

Yep, got past that error. Unfortunately now seeing "bad_request" and the extra just says "privacy". I tried setting "group_privacy_none" and "group_privacy_unlisted". Any idea what I might be doing wrong?

Thanks!
IW



Isaac Whitfield <iw@...>
 

Hi Mark,

Ok, will use POST (doh!).

I'm a little confused on the limitation with the dots; I'm trying to create top level enterprise groups (for the LF projects). They will have a custom domain, so I figured I'd have to do that using the group name? 

Maybe I'm misunderstanding how it works; is there some other way I should specify the domain for the group? 

Thanks in advance (and for your patience),
IW


 

Hi Isaac,

On Wed, Nov 1, 2017 at 9:12 AM, Isaac Whitfield <iw@...> wrote:

Ok, will use POST (doh!).

Hey, that one's on me as well. The docs need to be more clear and I need to return a specific error for that.

 
I'm a little confused on the limitation with the dots; I'm trying to create top level enterprise groups (for the LF projects). They will have a custom domain, so I figured I'd have to do that using the group name? 

Maybe I'm misunderstanding how it works; is there some other way I should specify the domain for the group? 

Ok, so this is a little confusing, and is a result of how Groups.io developed.

The create group and create sub group endpoints are for creating normal groups on the groups.io domain. An enterprise group is just a normal group(with subgroups) with a few extra bits set (that's a part that I still have to do by hand). So for example, the odpi groups started as a group named odpi along with a bunch of subgroups. When the lists were transferred over, I had to set some flags and specify that odpi was now an enterprise group with the lists.odpi.org domain. But in every other way, it's still a normal group and all the API calls work with it. For your purposes, the name of the group you create doesn't really matter.

(More info than you want to know: the system is designed this way because of a typical lifecycle of a group, and I wanted email addresses to be backwards compatible. That is, you start with a normal list, then later you add a subdomain and subgroups, then later on you decide you want to turn it into an enterprise group.)

The process of turning a normal group into an enterprise group also includes some other things, like setting up DNS records, getting a certificate, and telling Facebook and Google to allow oauth login callbacks from those domains. I hope to automate all that at some point, but have not yet.

Hope this makes sense. Please let me know if you have any questions.

Thanks,
Mark


Isaac Whitfield <iw@...>
 

Hi Mark,

Yes that does make sense - I'll make sure that we're all aware of that (maybe we already are). I've modified my client code to work correctly with the POST calls, and it appears to work now that I've changed the domain name too.

I'm getting an interesting issue though; my calls to create groups are returning the maintenance page rather than an actual result - I verified that it's not actually down for maintenance as I still see errors if I use a period in the domain name. Maybe just a bad flag somewhere making that page return?

Thanks!
IW


 

Hi Isaac,

On Wed, Nov 1, 2017 at 11:11 PM, Isaac Whitfield <iw@...> wrote:

I'm getting an interesting issue though; my calls to create groups are returning the maintenance page rather than an actual result - I verified that it's not actually down for maintenance as I still see errors if I use a period in the domain name. Maybe just a bad flag somewhere making that page return?

Doh! Sorry about that. Fixed now.

Mark 


Isaac Whitfield <iw@...>
 

Hi Mark,

Ok all is good; I can create a group fine. I'm having issues deleting it after creation though (in tests); it says invalid permissions but I can see that I do have the delete_group permission for the group I'm trying to remove. Is this an API issue?

Thanks,
IW


 

Hi Isaac,

On Fri, Nov 3, 2017 at 6:13 PM, Isaac Whitfield <iw@...> wrote:

Ok all is good; I can create a group fine. I'm having issues deleting it after creation though (in tests); it says invalid permissions but I can see that I do have the delete_group permission for the group I'm trying to remove. Is this an API issue?

I think, but am not positive, it's because you're using DELETE instead of POST. Can you try again with POST? I did not test with DELETE, and looking at the code, I don't think it supports that (but I suppose it should).

Thanks,
Mark


Isaac Whitfield <iw@...>
 

Hi Mark,

I've created a separate thread over in https://beta.groups.io/g/api/topic/permissions_issues_working/6294330 to avoid bloating this one.

Thanks!
IW