Bug 38050 - Add REST endpoints for working with "lists"/"virtual shelves"
Summary: Add REST endpoints for working with "lists"/"virtual shelves"
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Jacob O'Mara
QA Contact: Testopia
URL:
Keywords:
Depends on: 28965
Blocks: 20172
  Show dependency treegraph
 
Reported: 2024-10-01 10:17 UTC by Martin Renvoize (ashimema)
Modified: 2025-01-20 23:32 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 38050: create admin CRUD endpoint definitions (9.96 KB, patch)
2024-11-19 19:17 UTC, Jacob O'Mara
Details | Diff | Splinter Review
Bug 38050: create methods for admin CRUD list endpoints (3.83 KB, patch)
2024-11-19 19:17 UTC, Jacob O'Mara
Details | Diff | Splinter Review
Bug 38050: create public CRUD list endpoint definitions (10.47 KB, patch)
2024-11-19 19:17 UTC, Jacob O'Mara
Details | Diff | Splinter Review
Bug 38050: create methods for public CRUD list endpoints (4.49 KB, patch)
2024-11-19 19:17 UTC, Jacob O'Mara
Details | Diff | Splinter Review
Bug 38050: create admin CRUD endpoint definitions (9.56 KB, patch)
2025-01-13 17:50 UTC, Jacob O'Mara
Details | Diff | Splinter Review
Bug 38050: create methods for admin CRUD list endpoints (5.17 KB, patch)
2025-01-13 17:51 UTC, Jacob O'Mara
Details | Diff | Splinter Review
Bug 38050: create public CRUD list endpoint definitions (10.47 KB, patch)
2025-01-13 17:51 UTC, Jacob O'Mara
Details | Diff | Splinter Review
Bug 38050: create methods for public CRUD list endpoints (5.83 KB, patch)
2025-01-13 17:51 UTC, Jacob O'Mara
Details | Diff | Splinter Review
Bug 38050: create tests for admin CRUD list endpoints (19.15 KB, patch)
2025-01-13 17:51 UTC, Jacob O'Mara
Details | Diff | Splinter Review
Bug 38050: create tests for public CRUD list endpoints (18.41 KB, patch)
2025-01-13 17:51 UTC, Jacob O'Mara
Details | Diff | Splinter Review
Bug 38050: create admin CRUD endpoint definitions (9.63 KB, patch)
2025-01-20 08:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38050: create methods for admin CRUD list endpoints (5.23 KB, patch)
2025-01-20 08:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38050: create public CRUD list endpoint definitions (10.54 KB, patch)
2025-01-20 08:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38050: create methods for public CRUD list endpoints (5.90 KB, patch)
2025-01-20 08:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38050: create tests for admin CRUD list endpoints (19.22 KB, patch)
2025-01-20 08:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38050: create tests for public CRUD list endpoints (18.47 KB, patch)
2025-01-20 08:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2024-10-01 10:17:14 UTC
We don't yet expose the lists functionality over API's, this would be a beneficial enhancement both for internal use and thrid party integrations wishing to integrate with this functionality.
Comment 1 Jacob O'Mara 2024-11-19 19:17:51 UTC
Created attachment 174807 [details] [review]
Bug 38050: create admin CRUD endpoint definitions

this patch adds api endpoints for lists/virtualshelves.

Tests to follow
Comment 2 Jacob O'Mara 2024-11-19 19:17:53 UTC
Created attachment 174808 [details] [review]
Bug 38050: create methods for admin CRUD list endpoints

This patch implements the methods for the admin CRUD endpoints for lists/virtualshelves
Comment 3 Jacob O'Mara 2024-11-19 19:17:56 UTC
Created attachment 174809 [details] [review]
Bug 38050: create public CRUD list endpoint definitions

This patch creates the yaml definitions for the public CRUD enpoints for lists/virtualshelves
Comment 4 Jacob O'Mara 2024-11-19 19:17:58 UTC
Created attachment 174810 [details] [review]
Bug 38050: create methods for public CRUD list endpoints

This patch creates the methods for the public CRUD enpoints for lists/virtualshelves
Comment 5 Martin Renvoize (ashimema) 2024-12-04 11:49:37 UTC
You're going to need to add unit tests for all these for QA Jacob.
Comment 6 Jacob O'Mara 2025-01-13 17:50:58 UTC
Created attachment 176462 [details] [review]
Bug 38050: create admin CRUD endpoint definitions

This patch creates the yaml definitions for the CRUD enpoints for virtualshelves/lists
Comment 7 Jacob O'Mara 2025-01-13 17:51:00 UTC
Created attachment 176463 [details] [review]
Bug 38050: create methods for admin CRUD list endpoints

This patch implements the methods for the admin CRUD endpoints for lists/virtualshelves
Comment 8 Jacob O'Mara 2025-01-13 17:51:02 UTC
Created attachment 176464 [details] [review]
Bug 38050: create public CRUD list endpoint definitions

This patch creates the yaml definitions for the public CRUD enpoints for lists/virtualshelves
Comment 9 Jacob O'Mara 2025-01-13 17:51:04 UTC
Created attachment 176465 [details] [review]
Bug 38050: create methods for public CRUD list endpoints

This patch creates the methods for the public CRUD enpoints for lists/virtualshelves
Comment 10 Jacob O'Mara 2025-01-13 17:51:07 UTC
Created attachment 176466 [details] [review]
Bug 38050: create tests for admin CRUD list endpoints
Comment 11 Jacob O'Mara 2025-01-13 17:51:09 UTC
Created attachment 176467 [details] [review]
Bug 38050: create tests for public CRUD list endpoints
Comment 12 Jacob O'Mara 2025-01-13 18:02:14 UTC
This patch adds API endpoints for lists, both public and admin.

To Test:
prove /t/db_dependent/api/v1/lists.t
prove /t/db_dependent/api/v1/public/lists.t

These currently respect "allow_changes_from_others" and "allow_changes_from_staff" as to whether you can modify a given list with the admin endpoints. The public endpoints can only modify lists owned by the authenticated user.

As a consequence, to allow you to be able to always edit any lists you create with the admin endpoints (even with another user as the owner) unless changed, any created lists will be created with "allow_changes_from_staff=1"

Additionally, passing ->filter_by_readable also means that private lists are not displayed, even with the admin endpoints. Is this intended functionality here or should the admin endpoints (which require administer lists permissions) allow you to edit/view all lists regardless?
Comment 13 Martin Renvoize (ashimema) 2025-01-20 08:19:35 UTC
Created attachment 176769 [details] [review]
Bug 38050: create admin CRUD endpoint definitions

This patch creates the yaml definitions for the CRUD enpoints for virtualshelves/lists

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 14 Martin Renvoize (ashimema) 2025-01-20 08:19:38 UTC
Created attachment 176770 [details] [review]
Bug 38050: create methods for admin CRUD list endpoints

This patch implements the methods for the admin CRUD endpoints for lists/virtualshelves

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Martin Renvoize (ashimema) 2025-01-20 08:19:41 UTC
Created attachment 176771 [details] [review]
Bug 38050: create public CRUD list endpoint definitions

This patch creates the yaml definitions for the public CRUD enpoints for lists/virtualshelves

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Martin Renvoize (ashimema) 2025-01-20 08:19:43 UTC
Created attachment 176772 [details] [review]
Bug 38050: create methods for public CRUD list endpoints

This patch creates the methods for the public CRUD enpoints for lists/virtualshelves

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 17 Martin Renvoize (ashimema) 2025-01-20 08:19:46 UTC
Created attachment 176773 [details] [review]
Bug 38050: create tests for admin CRUD list endpoints

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 18 Martin Renvoize (ashimema) 2025-01-20 08:19:49 UTC
Created attachment 176774 [details] [review]
Bug 38050: create tests for public CRUD list endpoints

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>