Add public list API doc (#1976)

This commit is contained in:
Bowrna 2024-08-07 17:52:16 +05:30 committed by GitHub
parent 41f01d5a18
commit 46187b9d25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.