Subject: The mailing list for listmasters using Sympa
List archive
Re: [sympa-users] Results of API call as input for a data source?
- From: Dick Visser <address@concealed>
- To: "Stefan Hornburg (Racke)" <address@concealed>
- Cc: "address@concealed" <address@concealed>
- Subject: Re: [sympa-users] Results of API call as input for a data source?
- Date: Fri, 25 Oct 2019 16:29:06 +0200
On Thu, 17 Oct 2019 at 06:51, Stefan Hornburg (Racke) <address@concealed>
wrote:
>
> On 10/16/19 11:54 AM, Dick Visser wrote:
> > Hi
> >
> > I'm looking for a way to populate the subscribers of a list from one
> > of our Slack channels, but I'm not sure how to glue this together at
> > the Sympa site. The Data Source setup page lists a few options
> > (SQL/LDAP), but I think the "Remote file inclusion" is the closest to
> > what I would need.
> > The configuration options for that are:
> >
> > * data location URL
> > * remote user
> > * remote password
> >
> > Which leads me to believe that this only does an HTTP GET and then
> > expects the content to be one email address per line.
> > Any ideas how to make this work with an API that expect a POST
> > requests (and that returns JSON)?
>
> Hello Dick,
>
> Hack the source :-) => Sympa::DataSource::RemoteFile.
Ouch.
> Actually it would be nice to be able to specify a filter for the content
> retrieved from the API, that would solve the JSON problem.
>
> Why does the API needs a POST request for just pulling data and which
> parameters does it expect?
I assumed that, but you're probably right in that GET also works.
I had looked at the docs for the users.list method which would seem
the closest to what I need on the Slack side:
https://api.slack.com/methods/users.list
However, it's not as simple as a single API call and be done with it.
You'd have to script it a bit:
https://stackoverflow.com/questions/41564027/slack-api-retrieve-all-member-emails-from-a-slack-channel
Which is not difficult, but not suitable for the Sympa "single URL
request" option.
--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
-
[sympa-users] Results of API call as input for a data source?,
Dick Visser, 10/16/2019
-
Re: [sympa-users] Results of API call as input for a data source?,
Stefan Hornburg (Racke), 10/17/2019
- Re: [sympa-users] Results of API call as input for a data source?, Dick Visser, 10/25/2019
-
Re: [sympa-users] Results of API call as input for a data source?,
Stefan Hornburg (Racke), 10/17/2019
Archive powered by MHonArc 2.6.19+.