Date   

Re: /login Changes

Eric Searcy
 

Token auth is working for me, but the "domain" POST parameter behavior changed in the last 3-5 days I believe... it used to be that regardless of what vanity domain you used (lists.example.com/api/v1), you still had to pas a domain= POST parameter that changed both the cookie domain and the "d" value of the JWT token (depending which auth was used); now the "d" value is always 1 in the token, regardless of what URL is used. (I haven't re-checked the cookie domain behavior...)

-Eric

On Mon, Jun 15, 2020 at 5:13 PM Jordan Evans <jevans@...> wrote:
Hello,

I noticed that the domain parameter for the login endpoint was removed
(https://groups.io/api#login). I don't recall when that happened, but
it seemed the parameter worked until fairly recently. I have a couple
of related questions:

1. Are we expected to auth against the actual domain now? (for
example, https://lists.onap.org/api/v1/login instead of
https://groups.io/api/v1/login?domain=lists.onap.org&...) We
previously used the domain parameter to determine if
an enterprise setup was already deployed for a given domain.
2. Does the token parameter for login currently work? It seems I still
get a cookie and the response appears unchanged.




/login Changes

Jordan Evans
 

Hello,

I noticed that the domain parameter for the login endpoint was removed
(https://groups.io/api#login). I don't recall when that happened, but
it seemed the parameter worked until fairly recently. I have a couple
of related questions:

1. Are we expected to auth against the actual domain now? (for
example, https://lists.onap.org/api/v1/login instead of
https://groups.io/api/v1/login?domain=lists.onap.org&...) We
previously used the domain parameter to determine if
an enterprise setup was already deployed for a given domain.
2. Does the token parameter for login currently work? It seems I still
get a cookie and the response appears unchanged.


Re: OpenAPI spec

 

Hi Jordan,

On Mon, Apr 27, 2020 at 10:41 AM Jordan Evans <jevans@...> wrote:

Does groups.io publish a OpenAPI/Swagger file for the groups.io API? I
didn't see anything in the API documentation.

We don't have that, sorry. The docs are generated via a custom program that parses the source code and comments.

Mark 


OpenAPI spec

Jordan Evans
 

Hello,

Does groups.io publish a OpenAPI/Swagger file for the groups.io API? I
didn't see anything in the API documentation.

We are looking at creating mock endpoints for testing purposes, and
this is easily done using off-the-shelf tooling with OpenAPI/Swagger
spec files.

Alternatively, has anyone else created mock endpoints for Groups.io,
or have a suggestion for doing it without this tooling?

Thanks,
Jordan Evans


Re: Sample code to integrate with .NET #api #important

Christopher Warrington
 

On 2020-04-08 at 9:02:55 AM, Nadeem Shehzad <nshehzad1@...> wrote:

Does anyone have a sample .NET code to call basic API endpoints such as
authentication, creating group etc.
I've just uploaded a simple app that sets a user's location using the API
from C# at https://github.com/chwarr/gio-api-example.

.NET's HttpClient will automatically handle the auth cookies that Groups.io
uses, so it's pretty simple to use the API. Typically you just POST to the
right URI with null for the content.

QueryHelpers.AddQueryString from the Microsoft.AspNetCore.WebUtilities is
helpful to build these URIs.

I've been able to use System.Text.Json to parse the responses that I've
needed so far. I had to write a little snake_case naming policy to convert
between C#'s prevailing UpperCamelCase style and the lower_snake_case used
by Groups.io.

Here's an example that calls login:

var parameters = new Dictionary<string, string>()
{
["email"] = email,
["password"] = password,
// 2FA is shown in the full example, linked above
};

string loginUri = QueryHelpers.AddQueryString(
"https://groups.io/api/v1/login",
parameters);

HttpResponseMessage response = await _httpClient.PostAsync(
loginUri,
content: null);

[1]: https://www.nuget.org/packages/Microsoft.AspNetCore.WebUtilities/

--
Christopher W. <lists@...>


Sample code to integrate with .NET #api #important

Nadeem Shehzad
 

Does anyone have a sample .NET code to call basic API endpoints such as authentication, creating group etc.

Greatly appreciate if someone can share the code sample


Re: #api #api

Matt Dorn
 

Thanks Mark -- what I'd like to accomplish is to allow a user to request access to my group through my website without having to go to Groups.io to do so, but then to have that user go through the normal invitation workflow where an administrator approves them in Groups.io before they have access to the Group.

Not urgent, I can think of some ways to work around it on the side of my website, but it would be nice to be able to accomplish this with a single API call to Groups.io.


Re: #api #api

 

On Wed, Feb 26, 2020 at 9:45 PM Matt Dorn <matt.dorn@...> wrote:
Hi, I'd like to add a user to my group via the /directadd API, but have their status be set to "sub_status_pending" so that an administrator has to approve them from the pending state.  Is this possible?  Any workarounds if not?
_._,_._,_

It's not currently possible, and I can't think of any workarounds off-hand. Can you give me some more information on what you're trying to accomplish?

Thanks,
Mark


#api #api

Matt Dorn
 

Hi, I'd like to add a user to my group via the /directadd API, but have their status be set to "sub_status_pending" so that an administrator has to approve them from the pending state.  Is this possible?  Any workarounds if not?


Re: Is there an API endpoint for muting a topic?

Hugh Brown VA7UNX <va7unx@...>
 

Mark Fletcher disturbed my sleep to write:
Hello,

On Tue, Feb 11, 2020 at 8:52 AM Hugh Brown VA7UNX <va7unx@...>
wrote:

Hi there -- Is there an API endpoint for muting a topic? I can't seem to
find one on the API reference page -- only for muting a hashtag -- and I
haven't been able to find any discussion in this group. If there's not one
now, are there plans to add one?
That endpoint doesn't yet exist, but it's on the TODO list.
Awesome -- thanks so much!

--
Hugh Brown VA7UNX
https://saintaardvarkthecarpeted.com


Re: Is there an API endpoint for muting a topic?

 

Hello,

On Tue, Feb 11, 2020 at 8:52 AM Hugh Brown VA7UNX <va7unx@...> wrote:
Hi there -- Is there an API endpoint for muting a topic?  I can't seem to find one on the API reference page -- only for muting a hashtag -- and I haven't been able to find any discussion in this group.  If there's not one now, are there plans to add one?

That endpoint doesn't yet exist, but it's on the TODO list.

Thanks,
Mark 


Is there an API endpoint for muting a topic?

Hugh Brown VA7UNX <va7unx@...>
 

Hi there -- Is there an API endpoint for muting a topic?  I can't seem to find one on the API reference page -- only for muting a hashtag -- and I haven't been able to find any discussion in this group.  If there's not one now, are there plans to add one?

My use case is: when an email comes in from a group I'm subscribed to, and I want to mute that particular topic, I want to pass off the email to a script that can do this (rather than click on the "Mute this topic" link).

Thanks, and please let me know if you need any further information.


Re: [feature request] Add start_msg_date param to endpoint /downloadarchives

valcos
 

Thank you Mark for adding the start_time param for https://groups.io/api#download-archives


Re: [feature request] Add start_msg_date param to endpoint /downloadarchives

 

On Tue, Jan 21, 2020 at 4:02 AM valcos <valcos@...> wrote:
Thank you Mark for answering.

I don't see the X-Groupsio-MsgNum in the response headers (see them below) or as part of the messages, I'm using the group onap+onap-zoom-hosts to test it. Please let me know if I'm missing something, or if you can point me to a group that uses the X-Groupsio-MsgNum header line. 

That line appears in the email headers of every email message downloaded. Look for the largest, which should be in the last message downloaded, and use that next time.

I may be able to add start_msg_date, but I'm not sure when.

Thanks,
Mark 


Re: [feature request] Add start_msg_date param to endpoint /downloadarchives

valcos
 

Thank you Mark for answering.

I don't see the X-Groupsio-MsgNum in the response headers (see them below) or as part of the messages, I'm using the group onap+onap-zoom-hosts to test it. Please let me know if I'm missing something, or if you can point me to a group that uses the X-Groupsio-MsgNum header line. 

{
    "Connection": "keep-alive",
    "Content-Disposition": "attachment; filename=\"messages.zip\"",
    "Content-Type": "application/octet-stream",
    "Date": "Tue, 21 Jan 2020 11:30:39 GMT",
    "Server": "nginx/1.17.6",
    "Set-Cookie": "groupsio=MTU3O...aClXhs=; Path=/; Domain=groups.io; Expires=Thu, 20 Feb 2020 11:30:39 GMT; Max-Age=2592000; HttpOnly; Secure",
    "Transfer-Encoding": "chunked",
    "X-Frame-Options": "DENY"

}

The main reason to ask for a start_msg_date is because the way I collect mailing list data is time-based (it leverages on the field `Date` of the emails). Since the information is already included in each email, it isn't needed to add any extra information (e.g., response headers or additional headers in the original emails) to perform incremental fetching.

I would say that start_msg_date and start_msg_num are equivalent in terms of guaranteeing to fetch all messages, however I understand that the offset-based solution performs better for corner cases when there are N messages sent out at the same date for a given group. From a user point of view, I think it makes more sense to get all messages after a given date, since the user doesn't probably know the start_msg_num.


In any case, it would be great if you can include the start_msg_date. If this isn't possible, I'll figure out how to use the start_msg_num in my scenario.

Best,
Valerio


Re: [feature request] Add start_msg_date param to endpoint /downloadarchives

 

On Mon, Jan 20, 2020 at 7:11 AM valcos <valcos@...> wrote:

It would be great if the endpoint /downloadarchives could have an optional parameter to download messages after a given date. The param (e.g., start_msg_date) would be similar to start_msg_num and would return the messages
sent after a given date (in isoformat, UTC).

It would be more reliable for you to use the start_msg_num parameter in coordination with the X-Groupsio-MsgNum header line. That way you are guaranteed to fetch all messages, with no overlap. Is there any reason you can't use that? I am going to start more aggressively ratelimiting /downloadarchives access, as it puts a load on our system.

Thanks,
Mark


[feature request] Add start_msg_date param to endpoint /downloadarchives

valcos
 

Hi Mark,

It would be great if the endpoint /downloadarchives could have an optional parameter to download messages after a given date. The param (e.g., start_msg_date) would be similar to start_msg_num and would return the messages
sent after a given date (in isoformat, UTC).

Do you think it's possible to implement this feature?

Best,
Valerio


Re: getfiledirectory

Samuel Murrayy
 

On Sun, Jan 19, 2020 at 12:00 PM, Samuel Murray wrote:
Do I understand correctly that getfiledirectory does not get a list of files but only a list of folders...
No, wait, I just forgot to set the limit high enough, which is why I only got a list of folders (there were more than 10 folders in my test folder).

, *and* that it gets only a list of folder within the specified path (not folders within those folders)?
See, when I ask for a list of files in "/", and there are only two subfolders (no files) in "/", then the response tells me only the names of those two folders, regardless of the limit setting.  I don't get the subfolders and all the files in them.

Samuel


getfiledirectory

Samuel Murrayy
 

Hello

Do I understand correctly that getfiledirectory does not get a list of files but only a list of folders, *and* that it gets only a list of folder within the specified path (not folders within those folders)?

I'm trying to see if there is a way to get a list of all files (for a specific group), so getfiledirectory seemed a first obvious choice, but it doesn't seem to give me a list of files, and it appears to show only the children folders, not grandchildren folders etc.

Thanks
Samuel
(not a programmer)


addfiles API still in development?

Christopher Warrington
 

I'm trying to automate uploading files from a now-defunct Yahoo Group. The
/api/v1/addfiles API looks like it will work for this, but it's
documentation says "IN DEVELOPMENT. DO NOT USE YET."

Is this still the case (I'll admit, I haven't tried it yet.)?
Any sense for when it will be ready to use?

--
Christopher W. <lists@...>