/api/v1/oai
GET /oai — OAI-PMH protocol entry point.
GET /oai — OAI-PMH protocol entry point.The behaviour depends on the verb query parameter. See the
OAI-PMH specification for the full request/response shape.
Access token in the Authorization header:
Authorization: Bearer <token>.
OAI-PMH verb.
OAI-PMH record identifier, e.g.
oai:<namespace_identifier>:<uuid>. The prefix is oai: plus
the configured fylr.oai_pmh.namespace_identifier (just oai:
when unset). Required for GetRecord; ignored by the other
verbs.
Metadata format prefix. Required by fylr for GetRecord and
ListRecords; per the OAI-PMH spec it is also expected for
ListIdentifiers, though fylr does not currently reject a
ListIdentifiers request that omits it. Built-in values:
oai_dc and easydb. Each XSLT sheet enabled for OAI-PMH in
the base config adds a xslt-<name> prefix. Call
verb=ListMetadataFormats to enumerate the prefixes available
on a given instance. An unknown prefix yields
<error code="cannotDisseminateFormat"> (HTTP 400).
Set spec (optional for ListIdentifiers, ListRecords).
UTC datestamp lower bound (UTC date or full datetime accepted, per the OAI-PMH spec).
UTC datestamp upper bound.
Resumption token issued by a previous ListIdentifiers,
ListRecords or ListSets response. Must not be combined with
from, until, limit, set or metadataPrefix, and must
match the verb of the request that issued it; an expired token
yields <error code="badArgument">.
fylr extension (not part of OAI-PMH). Maximum records per page
for ListRecords / ListIdentifiers. Defaults to the base
config fylr.oai_pmh.records_limit (else 100); values are
clamped to a maximum of 10000. Must not be combined with
resumptionToken.
fylr extension (not part of OAI-PMH). Starting offset into the
result list. Normally supplied via resumptionToken instead.
0fylr extension (not part of OAI-PMH). JSON object string
attached to the OBJECT_DOWNLOAD event logged for each record
harvested by a ListRecords or GetRecord request
(e.g. {"custom_info":"..."}).
Successful OAI-PMH response document. Protocol-level errors are
encoded inside the XML body as <error code="…"> and also set
the matching HTTP status (400 / 404 / 500), so this 200 applies
to successful harvests only.
Either OAI-PMH is disabled in the base config
(fylr.oai_pmh.enabled = false) — a JSON error envelope with
code: OAIpmhNotEnabled — or a protocol-level request error
(badArgument, badVerb, cannotDisseminateFormat,
badResumptionToken) returned as an OAI-PMH XML document with an
<error code="…"> element.
Protocol-level error idDoesNotExist (the GetRecord
identifier matched no readable object) returned as an OAI-PMH
XML document with an <error code="idDoesNotExist"> element.
Internal failure while building the response, returned as an
OAI-PMH XML document with <error code="internalServerError">.
HEAD /oai — HEAD on the OAI-PMH endpoint.
HEAD /oai — HEAD on the OAI-PMH endpoint.Runs the same logic as GET /oai (same handler) but the harvester
receives only the response headers and HTTP status — no body. A
malformed request still yields the matching status, e.g. an unknown
verb returns 400.
Access token in the Authorization header:
Authorization: Bearer <token>.
OAI-PMH service is available and the request succeeded; no body is returned.
OAI-PMH is disabled, or the request is malformed
(e.g. an unknown verb); no body is returned.
Protocol-level not-found error (idDoesNotExist); no body is
returned.
Internal failure while building the response; no body is returned.
No content
Last updated