On Feb 25, 2015, at 10:04 AM, Andrew Stuart wrote: >I want to inject some test messages into Mailman to test moderation functions >via the REST API. > >Any ideas on a simple way to do that?
I think you found the command line interface for injecting messages, but you can also do it via the REST API. Do a POST to <api>/queues/<queuename> providing a list_id for the mailing list the message is targeting, and the text of the message you want to inject. >Ideally I need to be able to clear them out somehow too. Do a GET on <api>/queues/<queuename> to get a list of all files in that particular queue. The `files` key will contain a list of "filebases" and you can delete that file from the queue by DELETEing <api>/queues/<queuename>/<filebase>. You also get the filebase back in the Location header of the POST response. Currently you cannot get the text or other information for a queue file through the REST API. I would welcome contributions for a GET on <api>/queues/<queuename>/<filebase>. Cheers, -Barry _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org https://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9