[Koha] HTTP 406 response from biblios API

Lari Taskula lari.taskula at hypernova.fi
Fri Dec 1 11:05:40 NZDT 2023


Hi,

> I **AM** including a valid content-type header
You want the "Accept" header instead. Content-type request header 
specifies the content type of the request. Accept header in the request 
tells which response content type you are expecting from the server.

This works for me:

$ curl -H 'Accept: application/marcxml+xml' 
https://catalog.york.edu/api/v1/public/biblios/3555 -v
...
 > Accept: application/marcxml+xml
< HTTP/1.1 200 OK
< Content-Length: 6003
< Content-Type: application/marcxml+xml
<
* TLSv1.2 (IN), TLS header, Supplemental data (23):
<?xml version="1.0" encoding="UTF-8"?>
<record>
....
</record>

or -H 'Accept: application/marc'
or -H 'Accept: application/marc-in-json'
or -H 'Accept: text/plain'

Lari Taskula
CEO, Hypernova Oy
PL 16
80101 Joensuu, Finland

On 30.11.2023 20.37, Coehoorn, Joel wrote:
> I'm trying to use the Koha API, and no matter what I get an HTTP 406.
>
> Specifically, I'm trying to setup catalog harvesting for EBSCO. I look for
> this sample biblio:
> https://catalog.york.edu/api/vi/public/biblios/3555
>
> I **AM** including a valid content-type header. I tried ALL of the allowed
> content types, but no matter what I see 406 response. I tried with curl,
> postman, chrome's network tool, powershell, and they all give the same
> result.
>
> It works if I'm logged in and using the regular (non-public) route, but the
> public API seems broken here.
>
> What am I missing?
>
> *Joel Coehoorn*
> Director of Information Technology
> *York University*
> Office: 402-363-5603 | jcoehoorn at york.edu | york.edu
>
> *Please contact helpdesk at york.edu <helpdesk at york.edu> for technical
> assistance.*
>
>
> The mission of York University is to transform lives through
> Christ-centered education and to equip students for lifelong service to
> God, family, and society
> _______________________________________________
>
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.katipo.co.nz/pipermail/koha/attachments/20231201/12d74b0c/attachment.sig>


More information about the Koha mailing list