[Mailman-Developers] Re: How to know the URLs for CURL while getting or modifying the data of mailman 3
Thank you Mark and Abhilash. Your guidance is much appreciated and helped me a lot. On Sat, Apr 25, 2020 at 9:42 PM Mark Sapiro wrote: > On 4/25/20 6:16 AM, Shashikanth Komandoor wrote: > > Thank you for your response Stephen. > > > > Thanks for giving the URL. I think you mean this one right > > > > https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html > > > > But that document contains the way to do through the python prompt (>>>) > > > Where you see something like, e.g., > > >>> dump_json('http://localhost:9001/3.0/lists') > > in the docs, translate that URL into > > http://:8001/3.0/lists > > for your curl command. > > -- > Mark Sapiro The highway is for gamblers, > San Francisco Bay Area, Californiabetter use your sense - B. Dylan > ___ > Mailman-Developers mailing list -- mailman-developers@python.org > To unsubscribe send an email to mailman-developers-le...@python.org > https://mail.python.org/mailman3/lists/mailman-developers.python.org/ > Mailman FAQ: https://wiki.list.org/x/AgA3 > > Security Policy: https://wiki.list.org/x/QIA9 > -- Thanks & Regards, Shashi Kanth.K 9052671936 ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9
[Mailman-Developers] Re: How to know the URLs for CURL while getting or modifying the data of mailman 3
On Sat, Apr 25, 2020, at 9:12 AM, Mark Sapiro wrote: > On 4/25/20 6:16 AM, Shashikanth Komandoor wrote: > > Thank you for your response Stephen. > > > > Thanks for giving the URL. I think you mean this one right > > > > https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html > > > > But that document contains the way to do through the python prompt (>>>) > > > Where you see something like, e.g., > > >>> dump_json('http://localhost:9001/3.0/lists') > > in the docs, translate that URL into > > http://:8001/3.0/lists > > for your curl command. This is also documented now at https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html#helpers Hopefully this will be more helpful. > > -- > Mark Sapiro The highway is for gamblers, > San Francisco Bay Area, Californiabetter use your sense - B. Dylan > ___ > Mailman-Developers mailing list -- mailman-developers@python.org > To unsubscribe send an email to mailman-developers-le...@python.org > https://mail.python.org/mailman3/lists/mailman-developers.python.org/ > Mailman FAQ: https://wiki.list.org/x/AgA3 > > Security Policy: https://wiki.list.org/x/QIA9 > -- thanks, Abhilash Raj (maxking) ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9
[Mailman-Developers] Re: How to know the URLs for CURL while getting or modifying the data of mailman 3
On 4/25/20 6:16 AM, Shashikanth Komandoor wrote: > Thank you for your response Stephen. > > Thanks for giving the URL. I think you mean this one right > > https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html > > But that document contains the way to do through the python prompt (>>>) Where you see something like, e.g., >>> dump_json('http://localhost:9001/3.0/lists') in the docs, translate that URL into http://:8001/3.0/lists for your curl command. -- Mark Sapiro The highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9
[Mailman-Developers] Re: How to know the URLs for CURL while getting or modifying the data of mailman 3
Stephen, Thank you for your response. I am sorry for getting confused between two lists mailman-users and mailman-developers. Developers may be busy and my question may be basic but still there is a space for more politeness at your end to advice me. Apart from that, you have given a lot much of useful information which is really and honestly helpful for me to the maximum extent. Now I shall take the help of members of mailman-users only. @mailman-us...@mailman3.org , Team, I have installed Mailman Version 3.3 and running in production. Our development team developed another application which requires the access of the REST API and do changes over the MM3 DB automatically without manual intervention. That application would be connecting to REST API over http or https protocol To achieve this I have enabled the REST API to run at all the IP addresses of my MM3 Server by editing the mailman/src/mailman/config/schema.cfg file. I was able to run few commands like creation of domains, lists, list configuration changes for testing using the CURL (GET, POST, PATCH, DELTE) and got succeeded. But for every operation I need to write a different URL for CURL command to work. Out of many operations I require, addition of members to a list and removal of members from a list are most important tasks. So, I request herewith, from the URL https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html, I could see many URLs but they are executed at python prompt (>>>) only. I require URLs usable at the CURL command. Is there any way I could generate the URLs or any where documented regarding the URLs usable with CURL for the addition and removal of subscribers ? On Sat, Apr 25, 2020 at 8:04 PM Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > Shashi, > > This whole thread is off-topic for the developers list. This list is > for development of Mailman, not for teaching people to use it. Read > the whole recommended documentation before you ask busy developers to > tutor you in very basic things. There's a mailman-us...@mailman3.org > list for users to help each other. All of the Mailman developers who > might be willing to answer your questions are there as well, but there > are also many experienced users, some of whom have experimented with > the REST API who will also help. Please reply there for further > help. (Reply-To is set.) > > That said, there are plenty of URLs in the API documentation. Here's > a hint: search for "dump_json". That function takes an URL. You may > want https: instead of http: in your URLs, and you may need to change > the port from 9001, depending on the configuration of your REST > server. Try it with simple GET requests for information first, such > as for domains or lists. You can also do these requests with an > ordinary web browser, though I don't know what it will do with the > JSON-formatted reply. > > If you don't have domains and lists configured, I suppose the > informational requests will come back as empty JSON objects. It > should be safe to make them. You can either use Postorius to > bootstrap a few example domains, lists, and users, or (the hard way) > figure out how to POST appropriate requests. I don't recommend trying > to update the backend DBMS by hand; the schema is quite complicated. > I don't know how to use curl to update Mailman's databases. That > requires a POST request which I have never done with curl. The POST > request needs to be valid JSON. > > The more I think about this, the less I think your idea of using curl > is worthwhile, because formatting JSON requests by hand is going to be > a real annoyance and a great way to mess up your database with > spurious information. You're really going to want programmatic > support for this. But that's already all available in Python in the > Mailman system. > > It's up to you, but I feel a responsibility to warn you that using > curl is not going to be simpler than learning enough Python to do > these things. > > Regards, > -- Thanks & Regards, Shashi Kanth.K 9052671936 ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9
[Mailman-Developers] Re: How to know the URLs for CURL while getting or modifying the data of mailman 3
Shashi, This whole thread is off-topic for the developers list. This list is for development of Mailman, not for teaching people to use it. Read the whole recommended documentation before you ask busy developers to tutor you in very basic things. There's a mailman-us...@mailman3.org list for users to help each other. All of the Mailman developers who might be willing to answer your questions are there as well, but there are also many experienced users, some of whom have experimented with the REST API who will also help. Please reply there for further help. (Reply-To is set.) That said, there are plenty of URLs in the API documentation. Here's a hint: search for "dump_json". That function takes an URL. You may want https: instead of http: in your URLs, and you may need to change the port from 9001, depending on the configuration of your REST server. Try it with simple GET requests for information first, such as for domains or lists. You can also do these requests with an ordinary web browser, though I don't know what it will do with the JSON-formatted reply. If you don't have domains and lists configured, I suppose the informational requests will come back as empty JSON objects. It should be safe to make them. You can either use Postorius to bootstrap a few example domains, lists, and users, or (the hard way) figure out how to POST appropriate requests. I don't recommend trying to update the backend DBMS by hand; the schema is quite complicated. I don't know how to use curl to update Mailman's databases. That requires a POST request which I have never done with curl. The POST request needs to be valid JSON. The more I think about this, the less I think your idea of using curl is worthwhile, because formatting JSON requests by hand is going to be a real annoyance and a great way to mess up your database with spurious information. You're really going to want programmatic support for this. But that's already all available in Python in the Mailman system. It's up to you, but I feel a responsibility to warn you that using curl is not going to be simpler than learning enough Python to do these things. Regards, ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9
[Mailman-Developers] Re: How to know the URLs for CURL while getting or modifying the data of mailman 3
Thank you for your response Stephen. Thanks for giving the URL. I think you mean this one right https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html But that document contains the way to do through the python prompt (>>>) I want through curl command. I tried from the time of your earlier mail but unable to generate the URLs usable with curl command for different purposes such as subscribing the member to a list or removing a member from a list. If you still say the above URL is the one which helps me I am unable to find out the logic to generate the URLs for curl from the content written for python prompt Please help with 2 or more examples with out feeling it as risk. On Sat, Apr 25, 2020 at 6:39 PM Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > Shashikanth Komandoor writes: > > > But I don't know the URLs to be used for the purpose I > want to > > do some thing like I want to add user to list or remove a user from the > > list. > > I gave you the URL to the relevant docs. RT Free M. > > Steve > -- Thanks & Regards, Shashi Kanth.K 9052671936 ___ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9