Summary: | Add API route for listing items | ||
---|---|---|---|
Product: | Koha | Reporter: | Stefan Kugler <kugler_stefan> |
Component: | REST API | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | joonas.kylmala, martin.renvoize, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
URL: | https://wiki.koha-community.org/wiki/Items_endpoint_RFC | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.11.00
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 33146 | ||
Attachments: |
Bug 23667: Add spec
Bug 23667: Add route to GET /items Bug 23667: (follow-up) Cleanup Bug 23667: Add route to GET /items Bug 23667: Add spec Bug 23667: Add route to GET /items Bug 23667: Add spec Bug 23667: Add route to GET /items |
Description
Stefan Kugler
2019-09-22 22:31:06 UTC
We really need to implement the GET /items route. Which would include filters on many of the item attributes. including barcode. It will, tough, return a list of matching items (probably only one if filtering by barcode). Created attachment 93129 [details] [review] Bug 23667: Add spec Created attachment 93130 [details] [review] Bug 23667: Add route to GET /items This patchset introduces a route to fetch items. It relies on the already implemented code/mappings to get a single item. To test: - Apply this patches - Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => SUCCESS: Tests pass! - Try the endpoint with your favourite API tool (Postman?) - Sign off :-D Note: to do exact searching on barcode, you need to build the query like this: GET /api/v1/items?external_id=<your_barcode>&_match=exact Created attachment 93131 [details] [review] Bug 23667: (follow-up) Cleanup (In reply to Tomás Cohen Arazi from comment #4) > Created attachment 93131 [details] [review] [review] > Bug 23667: (follow-up) Cleanup Since you are the author in both of these patches can you submit a new version of "Bug 23667: Add route to GET /items" instead of creating a follow-up? It would make it easier to review and read git history. See "follow-up patches must be squashed if not signed-off yet, and the history is not needed" in https://wiki.koha-community.org/wiki/Development_IRC_meeting_27_September_2017 Created attachment 93230 [details] [review] Bug 23667: Add route to GET /items This patchset introduces a route to fetch items. It relies on the already implemented code/mappings to get a single item. To test: - Apply this patches - Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => SUCCESS: Tests pass! - Try the endpoint with your favourite API tool (Postman?) - Sign off :-D Note: to do exact searching on barcode, you need to build the query like this: GET /api/v1/items?external_id=<your_barcode>&_match=exact (In reply to Joonas Kylmälä from comment #5) > (In reply to Tomás Cohen Arazi from comment #4) > > Created attachment 93131 [details] [review] [review] [review] > > Bug 23667: (follow-up) Cleanup > > Since you are the author in both of these patches can you submit a new > version of "Bug 23667: Add route to GET /items" instead of creating a > follow-up? It would make it easier to review and read git history. See > "follow-up patches must be squashed if not signed-off yet, and the history > is not needed" in > https://wiki.koha-community.org/wiki/ > Development_IRC_meeting_27_September_2017 Thanks, good catch. I didn't know/remember that rule. Created attachment 93404 [details] [review] Bug 23667: Add spec Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Created attachment 93405 [details] [review] Bug 23667: Add route to GET /items This patchset introduces a route to fetch items. It relies on the already implemented code/mappings to get a single item. To test: - Apply this patches - Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => SUCCESS: Tests pass! - Try the endpoint with your favourite API tool (Postman?) - Sign off :-D Note: to do exact searching on barcode, you need to build the query like this: GET /api/v1/items?external_id=<your_barcode>&_match=exact Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Created attachment 94829 [details] [review] Bug 23667: Add spec Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94830 [details] [review] Bug 23667: Add route to GET /items This patchset introduces a route to fetch items. It relies on the already implemented code/mappings to get a single item. To test: - Apply this patches - Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => SUCCESS: Tests pass! - Try the endpoint with your favourite API tool (Postman?) - Sign off :-D Note: to do exact searching on barcode, you need to build the query like this: GET /api/v1/items?external_id=<your_barcode>&_match=exact Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Works well, passes qa scripts.. Passing QA Nice work! Pushed to master for 19.11.00 |