2.2 Create an API Endpoint for Lists - dshaevel/actionList-apac GitHub Wiki
Implementation Task: Create an API Endpoint for Lists (/lists)
-
Create a new List
- POST /lists
- Request body:
{ listName: "My first list", listDescription: "This is my first ActionList" }
- Response:
{ result: { listId: 1, listName: "My first list", listDescription: "This is my first ActionList" } }
-
Retrieve all Items in the List
- GET /list/:id
- Response:
{ result: [ { itemId: 1, itemDescription: "first item description", itemProperty1: "...", itemProperty2: "..." }, { itemId: 2, itemDescription: "second item description", itemProperty1: "...", itemProperty2: "..." } ] }
-
Update List properties
- PUT /list/:id
- Request body:
{ listName: "My list's new name", listDescription: "My list's new description" }
-
Delete a List
- DELETE /list/:id