mysociety / alaveteli

Provide a Freedom of Information request system for your jurisdiction
https://alaveteli.org
Other
389 stars 196 forks source link

Allow actions on `/admin` to be carried out using API #7271

Open mdeuk opened 2 years ago

mdeuk commented 2 years ago

On WhatDoTheyKnow, we get a number of user-support and authority-support queries which require interaction with the Alaveteli admin interface.

It would be beneficial, in some cases, if we were able to carry out tasks using an API, as this would allow for automation of the task, or at least, reduce a touchpoint for the administrator.

As this would be done on a m2m basis, I'd assume an API key (or oauth2 token) would be required as a minimum - perhaps similar to the existing API endpoint used in the UK by some public bodies.

Some tasks this could encompass:

Why?

We administer WhatDoTheyKnow support using a Google inbox - it works well, but some queries have touchpoints that we could automate. We also use a variety of other tools (such as a Tracker, running on GSheets / Apps Script) to deal with certain user-related issues, such as GDPR.

These tools can interface with APIs, so it would be beneficial to be able to use an API to assist in the automation of tedious tasks which don't add direct value, but are essential in order to complete an activity.

I could envision the API responding to a query with a response in JSON, which can then be parsed.

WilliamWDTK commented 2 years ago

This is something that might be helpful for people like me, who know (enough of) a programming language to be able to write some sort of script to do useful things, but who don't know and can't be bothered to learn Ruby.

What I might want it to do:

Of course, one could just implement the entire interface as an API, though some things you might not want to allow complete automation of (at least without having more granular permissions, which would be an additional complication).