
I'm considering making two small incompatible changes to the JSON representation of list requests in the REST API. Here's what you currently get (from rest/docs/moderation.rst) for a held subscription request:
>>> dump_json('http://localhost:9001/3.0/lists/ant@example.com/requests/1')
address: anne@example.com
delivery_mode: regular
display_name: Anne Person
http_etag: "..."
language: en
password: password
request_id: 1
type: subscription
when: 2005-08-01T07:49:23
I want to change the 'address' key to 'email' and remove the 'password' key, e.g.:
>>> dump_json('http://localhost:9001/3.0/lists/ant@example.com/requests/1')
delivery_mode: regular
display_name: Anne Person
email: anne@example.com
http_etag: "..."
language: en
request_id: 1
type: subscription
when: 2005-08-01T07:49:23
Unsubscription requests would just rename 'address' to 'email' (there is no 'password' key). E.g. from:
>>> dump_json('http://localhost:9001/3.0/lists/ant@example.com/requests/2')
address: bart@example.com
http_etag: "..."
request_id: 2
type: unsubscription
to:
>>> dump_json('http://localhost:9001/3.0/lists/ant@example.com/requests/2')
email: bart@example.com
http_etag: "..."
request_id: 2
type: unsubscription
I could (mostly) keep backward compatibility by just adding the 'email' key and keeping the 'address' key for now. The 'password' key is trickier because a subscription request's password is internally and randomly generated anyway, and I am going to remove this. I could keep 'password' with either the empty string or some random garbage.
I'd like to just get rid of these and break compatibility, but if it would cause pain to Postorius or other tools, I can deprecate the old names and remove them in the future.
Let me know what you think.
Cheers, -Barry