|
62 | 62 | "mailing:api_subscribe": "/api/subscriptions/subscribe", |
63 | 63 | "mailing:api_unsubscribe": "/api/subscriptions/unsubscribe", |
64 | 64 | "mailing:api_recipient_list": "/api/recipient-lists/{list_key}", |
| 65 | + "mailing:api_recipient_list_members": "/api/recipient-lists/{list_key}/members", |
65 | 66 | "mailing:api_recipient_list_member": "/api/recipient-lists/{list_key}/members/{source_object_key}", |
66 | 67 | "mailing:api_recipient_list_bulk_upsert": "/api/recipient-lists/{list_key}/members/bulk-upsert", |
67 | 68 | "mailing:api_recipient_list_reconcile": "/api/recipient-lists/{list_key}/members/reconcile", |
@@ -797,6 +798,7 @@ def endpoint_groups(): |
797 | 798 | "endpoints": [ |
798 | 799 | ("PUT", "/api/recipient-lists/{list_key}", "Create or update a client-scoped recipient list."), |
799 | 800 | ("GET", "/api/recipient-lists/{list_key}", "Get recipient list metadata and counts."), |
| 801 | + ("GET", "/api/recipient-lists/{list_key}/members", "List recipient-list members for audit."), |
800 | 802 | ( |
801 | 803 | "PUT", |
802 | 804 | "/api/recipient-lists/{list_key}/members/{source_object_key}", |
@@ -895,6 +897,10 @@ def route_path_map(): |
895 | 897 | "mailing:api_recipient_list", |
896 | 898 | args=["ml-zoomcamp-2026"], |
897 | 899 | ), |
| 900 | + API_DOC_PATHS["mailing:api_recipient_list_members"]: reverse( |
| 901 | + "mailing:api_recipient_list_members", |
| 902 | + args=["ml-zoomcamp-2026"], |
| 903 | + ), |
898 | 904 | API_DOC_PATHS["mailing:api_recipient_list_member"]: reverse( |
899 | 905 | "mailing:api_recipient_list_member", |
900 | 906 | args=["ml-zoomcamp-2026:@e:@homework:homework-1", "homework-submission:42"], |
@@ -1354,6 +1360,24 @@ def bearer_responses(success, *, accepted=False): |
1354 | 1360 | ), |
1355 | 1361 | }, |
1356 | 1362 | }, |
| 1363 | + "/api/recipient-lists/{list_key}/members": { |
| 1364 | + "get": { |
| 1365 | + "tags": ["Recipient Lists"], |
| 1366 | + "summary": "List recipient list members", |
| 1367 | + "description": "Returns client-scoped list members for audit and drift checks. Active members are returned by default.", |
| 1368 | + "security": [{"BearerAuth": []}], |
| 1369 | + "parameters": [ |
| 1370 | + LIST_KEY_PARAM, |
| 1371 | + {"name": "audience", "in": "query", "required": True, "schema": {"type": "string"}}, |
| 1372 | + {"name": "client", "in": "query", "required": True, "schema": {"type": "string"}}, |
| 1373 | + {"name": "include_removed", "in": "query", "required": False, "schema": {"type": "boolean", "default": False}}, |
| 1374 | + {"name": "limit", "in": "query", "required": False, "schema": {"type": "integer", "minimum": 1, "maximum": 10000, "default": 1000}}, |
| 1375 | + ], |
| 1376 | + "responses": bearer_responses( |
| 1377 | + json_response("Recipient list members", "#/components/schemas/RecipientListMembersResponse") |
| 1378 | + ), |
| 1379 | + }, |
| 1380 | + }, |
1357 | 1381 | "/api/recipient-lists/{list_key}/members/{source_object_key}": { |
1358 | 1382 | "put": { |
1359 | 1383 | "tags": ["Recipient Lists"], |
@@ -2323,6 +2347,18 @@ def bearer_responses(success, *, accepted=False): |
2323 | 2347 | "type": "object", |
2324 | 2348 | "properties": {"recipient_list": {"$ref": "#/components/schemas/RecipientList"}}, |
2325 | 2349 | }, |
| 2350 | + "RecipientListMembersResponse": { |
| 2351 | + "type": "object", |
| 2352 | + "properties": { |
| 2353 | + "recipient_list": {"$ref": "#/components/schemas/RecipientList"}, |
| 2354 | + "members": { |
| 2355 | + "type": "array", |
| 2356 | + "items": {"$ref": "#/components/schemas/RecipientListMember"}, |
| 2357 | + }, |
| 2358 | + "count": {"type": "integer"}, |
| 2359 | + "has_more": {"type": "boolean"}, |
| 2360 | + }, |
| 2361 | + }, |
2326 | 2362 | "RecipientListUpsertResponse": { |
2327 | 2363 | "type": "object", |
2328 | 2364 | "properties": { |
|
0 commit comments