Change delivery_status of a member by using the rest api
Hello,
I would like to set or change the delivery_status of a list member by using the rest api. The curl request looks like
curl
-X PATCH
-H "Content-Type: application/json“
-H "Accept: application/json“
-u restadmin:secret_password
-d "@./foo_patch.json“
"http://127.0.0.1:8001/3.1/members/ebcdd09bb8d84758a135c3449023701e“
With the json-file:
{ „delivery_status“: „by_user“ }
I get an error message:
{"title": "400 Bad Request", "description": "Unexpected parameters: delivery_status“}
Is there a way to change the attribute delivery_status
of an existing
member by using the rest api?
Cheers,
Michael Schaarschmidt
Mailman's content filtering has removed the following MIME parts from this message.
Replaced multipart/alternative part with first alternative.
On 5/4/23 12:30, Michael Schaarschmidt wrote:
Hello,
I would like to set or change the delivery_status of a list member by using the rest api. The curl request looks like
curl
-X PATCH
-H "Content-Type: application/json“
-H "Accept: application/json“
-u restadmin:secret_password
-d "@./foo_patch.json“
"http://127.0.0.1:8001/3.1/members/ebcdd09bb8d84758a135c3449023701e“With the json-file:
{ „delivery_status“: „by_user“ }
I assume those fancy quotes are an artifact of your mail client.
I get an error message:
{"title": "400 Bad Request", "description": "Unexpected parameters: delivery_status“}
Is there a way to change the attribute
delivery_status
of an existing member by using the rest api?
You can't set a memnber's delivery status directly. It is an attribute of the member's preferences. The correct endpoint is "http://127.0.0.1:8001/3.1/members/ebcdd09bb8d84758a135c3449023701e/preferenc..."
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Michael Schaarschmidt