How can I automate interactions with the Janitor?

There is an JSON API that can be used to retrieve information about packages, to reschedule runs and trigger creation of merge proposals.