[Bug 30799] New: Add REST API route to update biblio metadata
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 Bug ID: 30799 Summary: Add REST API route to update biblio metadata Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: REST API Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com CC: tomascohen@gmail.com Blocks: 17371 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17371 [Bug 17371] Add routes for biblios [OMNIBUS] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 135102 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135102&action=edit Bug 30799: Add REST API route to update biblio metadata Example: PUT /api/v1/biblios/{biblio_id}/metadata <record> ... </record> Calling this endpoint will replace the current MARC record with the one given in the request body, by calling C4::Biblio::ModBiblio Test plan: 1. Try requesting this endpoint with your favorite API tool 2. Run `prove t/db_dependent/api/v1/biblios/metadata/put.t` -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=30799 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135102|0 |1 is obsolete| | --- Comment #2 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 135197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135197&action=edit Bug 30799: Add REST API route to update biblio metadata Example: PUT /api/v1/biblios/{biblio_id}/metadata <record> ... </record> Calling this endpoint will replace the current MARC record with the one given in the request body, by calling C4::Biblio::ModBiblio Test plan: 1. Try requesting this endpoint with your favorite API tool 2. Run `prove t/db_dependent/api/v1/biblios/metadata/put.t` Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> --- Works as advertised. Passes provided test. Current status: Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de 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=30799 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Good to see this one. Just a dumb question: Would it be useful to allow for partial MARC record updates too instead of replacing the complete MARC record? Suppose I just want to add one new field somewhere, and not want to risk overwriting the complete MARC record somehow with an older version or so? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Marcel de Rooy from comment #3)
Good to see this one. Just a dumb question: Would it be useful to allow for partial MARC record updates too instead of replacing the complete MARC record? Suppose I just want to add one new field somewhere, and not want to risk overwriting the complete MARC record somehow with an older version or so?
That'd be routes that implement the overlay stuff. We should have a call to talk about possible endpoints design. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I still have doubts on thie report. It seems that we are skipping quite some validations that the interface normally does for us via the frameworks etc. Can we get more consensus about that first ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Marcel de Rooy from comment #5)
I still have doubts on thie report. It seems that we are skipping quite some validations that the interface normally does for us via the frameworks etc.
Do you mean things like mandatory fields ? Does this validation happen outside of the editor, for instance when using the import tool ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Julian Maurice from comment #6)
(In reply to Marcel de Rooy from comment #5)
I still have doubts on thie report. It seems that we are skipping quite some validations that the interface normally does for us via the frameworks etc.
Do you mean things like mandatory fields ? Does this validation happen outside of the editor, for instance when using the import tool ?
Ha good point. Import will skip them too. When we import and overwrite, we are doing the same.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Marcel de Rooy from comment #3)
Good to see this one. Just a dumb question: Would it be useful to allow for partial MARC record updates too instead of replacing the complete MARC record? Suppose I just want to add one new field somewhere, and not want to risk overwriting the complete MARC record somehow with an older version or so?
If we wanted to add a PATCH route, we need to think of it in terms of the MARC overlay rules. Not because it needs to use that particularly (it could) but because we need a way to express the possible behaviors as we did on that dev. In that case there's a form for setting rules, for a PATCH route we would either need to add some payload representing the same, or just pointing to some overlay rule. This would be really interesting, but certainly a bigger dev and another report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think a 'full' overwrite if described as such would be a good first step. If we could make it follow overlay rules, maybe by adding a new filter 'REST API' that would be great. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30799 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31801 CC| |bibliothek@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=30799 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|In Discussion |RESOLVED --- Comment #10 from Julian Maurice <julian.maurice@biblibre.com> --- *** This bug has been marked as a duplicate of bug 31801 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org