[Koha-bugs] [Bug 33036] REST API: Merge biblio records

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 19 13:57:25 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33036

Jan Kissig <bibliothek at th-wildau.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--- Comment #10 from Jan Kissig <bibliothek at th-wildau.de> ---
When using Postman instead of curl to send HTTP-request (body:raw, type:xml)
with a body like this:

<?xml version="1.0" encoding="UTF-8"?>
<record
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
    xmlns="http://www.loc.gov/MARC21/slim">
  <leader>00224nam a22001097a 4500</leader>
  <controlfield tag="003">OSt</controlfield>
  <controlfield tag="005">20230412064312.0</controlfield>
  <controlfield tag="008">230412b        |||||||| |||| 00| 0 eng
d</controlfield>
  <datafield tag="040" ind1=" " ind2=" ">
    <subfield code="c">Ost</subfield>
  </datafield>
  <datafield tag="245" ind1=" " ind2=" ">
    <subfield code="a">NewTitle</subfield>
  </datafield>
</record>

f.e. PUT http://localhost:8081/api/v1/biblios/262/merge/6 I get the error

{
    "errors": [
        {
            "message": "Expected object - got string.",
            "path": "/body"
        }
    ],
    "status": 400
}

The proposed way just works fine:
 7) optionally a full MARCXML record may be sent as body of the API call
   curl  -s -u koha:koha -X PUT 
"http://127.0.0.1:8081/api/v1/biblios/262/merge/2" -d @marcfile.xml

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list