From 46187b9d2596098d276d5df7b9e0a2f1a57197f8 Mon Sep 17 00:00:00 2001 From: Bowrna Date: Wed, 7 Aug 2024 17:52:16 +0530 Subject: [PATCH] Add public list API doc (#1976) --- docs/docs/content/apis/lists.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/docs/content/apis/lists.md b/docs/docs/content/apis/lists.md index eb3d825f..c5414ee6 100644 --- a/docs/docs/content/apis/lists.md +++ b/docs/docs/content/apis/lists.md @@ -3,6 +3,7 @@ | Method | Endpoint | Description | |:-------|:------------------------------------------------|:--------------------------| | GET | [/api/lists](#get-apilists) | Retrieve all lists. | +| GET | [/api/public/lists](#get-public-apilists) | Retrieve public lists.| | GET | [/api/lists/{list_id}](#get-apilistslist_id) | Retrieve a specific list. | | POST | [/api/lists](#post-apilists) | Create a new list. | | PUT | [/api/lists/{list_id}](#put-apilistslist_id) | Update a list. | @@ -72,6 +73,28 @@ curl -u "username:password" -X GET 'http://localhost:9000/api/lists?page=1&per_p ______________________________________________________________________ +#### GET /api/public/lists + +Retrieve public lists with name and uuid to submit a subscription. This is an unauthenticated call to enable scripting to subscription form. + +##### Example Request + +```shell +curl -X GET 'http://localhost:9000/api/public/lists' +``` + +##### Example Response + +```json +[ + { + "uuid": "55e243af-80c6-4169-8d7f-bc571e0269e9", + "name": "Opt-in list" + } +] +``` +______________________________________________________________________ + #### GET /api/lists/{list_id} Retrieve a specific list.