[Bug 32734] New: REST API: Add a list endpoint for Biblios
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Bug ID: 32734 Summary: REST API: Add a list endpoint for Biblios Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com CC: tomascohen@gmail.com In addition to being able to GET a specific biblio, we should be able to search and retrieve subsets of biblios -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31788 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31788 [Bug 31788] REST API: CRUD endpoints for Biblios [omnibus] -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |agustinmoyano@theke.io |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jan.kissig@th-wildau.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |new feature -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |31801 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31801 [Bug 31801] REST API: PUT endpoint for Biblios -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 --- Comment #1 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 146751 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146751&action=edit Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146751|0 |1 is obsolete| | --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 146804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146804&action=edit Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146804|0 |1 is obsolete| | --- Comment #3 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 146855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146855&action=edit Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 --- Comment #4 from Agustín Moyano <agustinmoyano@theke.io> --- RM found that the glue with which I joined 'txt' records was wrong... I thought it was a pretty print and didn't know there was already a standard for it, so he allowed me to do the change, and upload this patch as signed... it almost changes nothing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25870 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25870 [Bug 25870] Add a q_ccl query parameter to /biblios -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Agustin, nice work here. Could you please check this: - We need tests for the 'return_resultset' parameter. - Please make sure you have the EditorConfig plugin on your vscode, you seem to be using two spaces for indentation (at least on the tests). Running perltidy on those blocks you add/edit would be even better. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- *** Bug 30790 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com, | |hammat.wele@inlibro.com, | |maryse.simard@inlibro.com, | |olivier.hubert@inlibro.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27113 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27113 [Bug 27113] Elasticsearch: Autocomplete in search -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |33083, 33080 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33080 [Bug 33080] Add helpers that return result_set for further processing https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33083 [Bug 33083] Handle generic collection of records methods -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146855|0 |1 is obsolete| | --- Comment #7 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 147476 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147476&action=edit Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Signed Off |Patch doesn't apply --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Bug 32734 Depends on bug 31801 (Passed QA) Follow? [(y)es, (n)o] y Bug 31801 Depends on bug 31800 (Passed QA) Follow? [(y)es, (n)o] y Bug 31800 - REST API: POST endpoint for Biblios 147714 - Bug 31800: Add REST endpoint to add a biblio Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 31800: Add REST endpoint to add a biblio Using index info to reconstruct a base tree... M api/v1/swagger/swagger.yaml Falling back to patching base and 3-way merge... Auto-merging api/v1/swagger/swagger.yaml CONFLICT (content): Merge conflict in api/v1/swagger/swagger.yaml error: Failed to merge in the changes. Patch failed at 0001 Bug 31800: Add REST endpoint to add a biblio -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Kyle M Hall from comment #8)
Bug 32734 Depends on bug 31801 (Passed QA) Follow? [(y)es, (n)o] y
Bug 31801 Depends on bug 31800 (Passed QA) Follow? [(y)es, (n)o] y
Bug 31800 - REST API: POST endpoint for Biblios
147714 - Bug 31800: Add REST endpoint to add a biblio
Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 31800: Add REST endpoint to add a biblio Using index info to reconstruct a base tree... M api/v1/swagger/swagger.yaml Falling back to patching base and 3-way merge... Auto-merging api/v1/swagger/swagger.yaml CONFLICT (content): Merge conflict in api/v1/swagger/swagger.yaml error: Failed to merge in the changes. Patch failed at 0001 Bug 31800: Add REST endpoint to add a biblio
Maybe I just pushed that one? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 --- Comment #10 from Hammat wele <hammat.wele@inlibro.com> --- (In reply to Kyle M Hall from comment #8)
Bug 32734 Depends on bug 31801 (Passed QA) Follow? [(y)es, (n)o] y
Bug 31801 Depends on bug 31800 (Passed QA) Follow? [(y)es, (n)o] y
Bug 31800 - REST API: POST endpoint for Biblios
147714 - Bug 31800: Add REST endpoint to add a biblio
Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 31800: Add REST endpoint to add a biblio Using index info to reconstruct a base tree... M api/v1/swagger/swagger.yaml Falling back to patching base and 3-way merge... Auto-merging api/v1/swagger/swagger.yaml CONFLICT (content): Merge conflict in api/v1/swagger/swagger.yaml error: Failed to merge in the changes. Patch failed at 0001 Bug 31800: Add REST endpoint to add a biblio
I had the same problem before update to 22.12.00.011, after update it applies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147476|0 |1 is obsolete| | --- Comment #11 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 148086 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148086&action=edit Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Hammat Wele <hammat.wele@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148086|0 |1 is obsolete| | --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 148124 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148124&action=edit Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Hammat Wele <hammat.wele@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 148136 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148136&action=edit Bug 32734: (QA follow-up) Remove stray method On bug 33083 we introduce a better way to implement a reusable method for the same functionality. This patch just removes the one in `Koha::Biblios` and the result should be the same as the one inherited from `Koha::Objects::Record::Collections` will be picked instead. To test: 1. Run: $ prove t/db_dependent/Koha/Biblios.t \ t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 148137 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148137&action=edit Bug 32734: (QA follow-up) Make use of $c->objects->to_api This is using plain `$biblios->to_api` but as of bug 33080, the new helper should be used instead. This patch fixes that. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00 |23.05.00,22.11.04 released in| | Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 --- Comment #16 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Nice work, thanks everyone! Pushed to 22.11.x for the next release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33329 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33329 [Bug 33329] GET /biblios encoding wrong when UNIMARC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|new feature |enhancement CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Bug 32734 depends on bug 31801, which changed state. Bug 31801 Summary: REST API: PUT endpoint for Biblios https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31801 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to stable |RESOLVED CC| |lucas@bywatersolutions.com --- Comment #17 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be backported to 22.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Bug 32734 depends on bug 33083, which changed state. Bug 33083 Summary: Handle generic collection of records methods https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33083 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Bug 32734 depends on bug 33080, which changed state. Bug 33080 Summary: Add helpers that return result_set for further processing https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33080 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|REST API: Add a list |Add GET endpoint for |endpoint for Biblios |listing Biblios -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32734 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |new feature -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org