Hello Mark, hello Stephen, sorry for bothering again...but the amount of documentation is overwhelming... Some info about my setup: I run mailman3 in an virtual environment with postgresql-Server (all in recent versions) - operating system Ubuntu 24.04-LTS.
My aim is to provide one high-level script for the daily task of list creation. - list creation via command-line script with two/three parameters like: ./create-list --listname [email protected] --admin-email [email protected] [--admin-name "Peter Rabbit"] The create-list script itself should be a bash- or perl-script (I am not very familiar with python - SORRY ;-) ) I would like the scripts to trigger some curl-calls on the mailman server (from outside the mailman shell and even from outside the virtual environment) Reading the RestAPI documentation here: https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/users.html several questions arise: 1) Can I succeed with this plan? (Are curl-calls sufficient? Is it possible from outside the virtual environment?) 2) Is this a viable curl-call to create a user?: curl -X POST -u 'admin-user:<password>' -H "Content-Type: application/json" -d '{ "email": "[email protected]", "display_name": "Peter Rabbit", "password": "secret" }' http://localhost:8001/3.1/users 3) and in a second step can I assign this user to a list as owner with a curl-call like this?: curl -X POST -u 'admin-user:<password>' -H "Content-Type: application/json" -d '{ "list_id": "newsletter.lists.example.org", "subscriber": "[email protected]", "role": "owner" }' http://localhost:8001/3.1/members 4) What about the commits that are used while operating in mailman shell? (Do I have to trigger commits while operating via curl-calls? And how can I trigger commits via curl?) 5) In the unlikely event that I change from the dark side to the good side i.e. "python programming" ;-) is there a "to-the-point" reference for IListManager, IUserManager etc. giving available functions (with parameters) in a kind of list way? (the example kind of documentation referenced above is good, but where can I find a list of all functions?) 6) I think the starting point for managing lists with python is here: https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/commands/docs/shell.html right? 7) Going the python way will require to enter the virtual environment, right? (otherwise the libraries, environment variables etc. are not available...I think) Thank you for some guidance here... :-) Kind regards Chris _______________________________________________ Mailman-users mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/[email protected]/message/6QJILAQYAD3LP5A4H4JEIQIM4YNMAFEE/ This message sent to [email protected]
