Doing partial MARC updates could be interesting, although repeatable fields make it a bit difficult. I think that you’d have to do a complete replacement for all fields matching that tag number. Would need to document that endpoint very well.
What’s the use case for a partial MARC update? In my experience, bulk endpoints where you can update many records at once tend to be more practical/performant than narrowly scoped endpoints. So perhaps /api/v1/biblios/field/789 and then send an array of objects (each with a Koha biblionumber and the fields to update)? I suppose that’s not very RESTful but quite practical. David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 From: Koha-devel <koha-devel-boun...@lists.koha-community.org> On Behalf Of Tomas Cohen Arazi Sent: Saturday, 23 January 2021 12:45 AM To: Marcel de Rooy <m.de.r...@rijksmuseum.nl> Cc: koha-devel <koha-devel@lists.koha-community.org> Subject: Re: [Koha-devel] REST API / MARC fields El vie., 22 ene. 2021 10:09, Marcel de Rooy <m.de.r...@rijksmuseum.nl <mailto:m.de.r...@rijksmuseum.nl> > escribió: Thanks. Overlaying the whole marc record is interesting too. Overwriting specific fields might offer some more fine grained control however too. Something like: PUT /api/v1/biblios/123456/marc The fact you're passing MARC is just Content-Type, no need to make it part of the URL. PUT and POST are in the roadmap. I was mostly waiting for Koha::Biblio to have new_from_marc and set_from_marc methods. POST, PUT /api/v1/biblios/123456/marc/field/789 ? I think the MARC-in-JSON format is simple enough to just handle this using PATCH. Marcel <https://www.rijksmuseum.nl/nl/steun/vriendschappen> X X! <https://www.rijksmuseum.nl/> T/m 18 jaar gratis <https://www.rijksmuseum.nl/nl/tickets/artikelen> In verband met de coronamaatregelen is het boeken van een starttijd noodzakelijk. Kijk <https://youtu.be/OI_uT2o7bqc> hier de nieuwste aflevering van Rijksmuseum Unlocked x! <https://www.instagram.com/rijksmuseum/> x <https://www.facebook.com/rijksmuseum> x <https://www.linkedin.com/company/rijksmuseum/> x <https://twitter.com/rijksmuseum> Please think before you print _____ Van: Koha-devel <koha-devel-boun...@lists.koha-community.org <mailto:koha-devel-boun...@lists.koha-community.org> > namens Tomas Cohen Arazi <tomasco...@gmail.com <mailto:tomasco...@gmail.com> > Verzonden: vrijdag 22 januari 2021 13:38 Aan: Marcel de Rooy <rooy.d...@gmail.com <mailto:rooy.d...@gmail.com> > CC: koha-devel <koha-devel@lists.koha-community.org <mailto:koha-devel@lists.koha-community.org> > Onderwerp: Re: [Koha-devel] REST API / MARC fields We could have a route to overlay the MARC representation of a biblio (if acceptable). We could use PATCH /biblios/:biblio_id Content-Type: application/marc-in-json { ... El vie., 22 ene. 2021 6:20, Marcel de Rooy <rooy.d...@gmail.com <mailto:rooy.d...@gmail.com> > escribió: Hi all, Any thoughts here about how we should handle updating fields in MARC which have no specific corresponding database field. I am thinking about e.g. a persistent identifier in MARC21 field 024 or an OCLC number in field 035. Could we add REST API entries for such changes as well? They will only generate changes in the marcxml for now.. Thanks, Marcel _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.koha-community.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fkoha-devel&data=04%7C01%7Cm.de.rooy%40rijksmuseum.nl%7C8a43a8da6b554e41b3b108d8bed2ba1d%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C637469159561939658%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=stBfgoLskKrgvFhMGNVV16wPP%2B%2Fujj3cxlnNjZHx8P8%3D&reserved=0> website : https://www.koha-community.org/ <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.koha-community.org%2F&data=04%7C01%7Cm.de.rooy%40rijksmuseum.nl%7C8a43a8da6b554e41b3b108d8bed2ba1d%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C637469159561949653%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1cSgyDiK99%2Fts6gHaB2ykUq14RnsqLA7oYrMnQZ1Xho%3D&reserved=0> git : https://git.koha-community.org/ <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.koha-community.org%2F&data=04%7C01%7Cm.de.rooy%40rijksmuseum.nl%7C8a43a8da6b554e41b3b108d8bed2ba1d%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C637469159561949653%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=uY%2BCVgf8svk4GJqQQPNbZdOlxQo%2BWB4psGleHBf14zw%3D&reserved=0> bugs : https://bugs.koha-community.org/ <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.koha-community.org%2F&data=04%7C01%7Cm.de.rooy%40rijksmuseum.nl%7C8a43a8da6b554e41b3b108d8bed2ba1d%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C637469159561959648%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=I8u%2FDourFHEiGEEscgPFGcfPMzP3VtqgzVNky1NNoTY%3D&reserved=0>
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/