On Tue, Feb 19, 2019, at 1:56 AM, Henrik Rasmussen wrote:
Thank you.
However, I've been trying to understand how that line refers to the list in question and to interpret the command. When I use it, I get a 404 error, but if I skip the 1 and preferences parts, just looking up all members
response = mmapi('members') pprint(response.text) def mmapi(apicommand): response = requests.get('http://172.19.199.2:8001/%s/%s' %
(restapiversion, apicommand), auth=('restadmin', 'restpass'))
I get all members like this, but without a member id of 1.
{"address": ' '"http://172.19.199.2:8001/3.1/addresses/qqjokerz@gmail.com", ' '"delivery_mode": "regular", "email": "foo@example.com", "list_id": ' '"examplelist.listserver.ku.dk", "member_id": ' '"f1257245ba1149ee9e2d21507ed5530b", "role": "member", "self_link": ' '"http://172.19.199.2:8001/3.1/members/f1257245ba1149ee9e2d21507ed5530b", ' '"display_name": "", "user": ' '"http://172.19.199.2:8001/3.1/users/42991ae3e576415e8533c09a864f1547", ' '"http_etag": "\\"35cd857c98d4ed2e078c0ef3c1267842c2cba2fe\\""},
Can you give me an example of changing this particular member's subscription to examplelist.listserver.ku.dk using patch?
Sorry, I wrote half the reply.
So the URL should basically be:
http://examplelist.listserver.ku.dk/3.1/members/<member_id>/preferences
1 is basically the member-id and from your above example, I see that it is
"member_id": "f1257245ba1149ee9e2d21507ed5530b"
So,
http://examplelist.listserver.ku.dk/3.1/members/f1257245ba1149ee9e2d21507ed5530b/preferences
Should work for you.
P.S.: You could just append /preferences
to the self_link
of the member
resource you got above.
-- thanks, Abhilash Raj (maxking)