Upstream quirks
This page lists the behavior of the BASE HTTP interface that shapes bibliofabric.base. The sources are the BASE developer page and the BASE Interface Guide (the PDF the page links as "BASE Interface Guide", version 1.27). The whole client is built from these documents: the interface answers only whitelisted IPs and apikey holders, so none of the shapes below were observed against the live API. Where the guide leaves room for doubt, the quirk says so.
Access and pace
- The interface answers only requests from a whitelisted IP or IP range, or
requests that carry an
apikeyparameter. Without either it answers withAccess denied for IP address xxx.xxx.xxx.xxx and user agent xyz.. - The pace limit is one request per second (1 QPS), and it is the pace the client defaults to. Raise it only if your registration says you may.
- The
apikeytravels as a query parameter, so it appears in URLs. The client redacts it from error messages and logs.
Search
hitsdefaults to 10 and accepts at most 125 records per answer.offsetdefaults to 0 and accepts at most 999. Combined with the page size ceiling, one query reaches roughly the first 1000 records of a result set; the client raisesConfigurationErrorfor an offset past 999 instead of sending a request the interface rejects. For complete lists, narrow the query or scope it to a collection.querytakes SOLR syntax and at most 1000 characters. Unquoted terms combine with AND,OR,NOT, phrases, wildcards (*,?), and ranges (dcyear:[1983 TO 2009]) are documented in the guide's query syntax section.sortbynames one field and one direction:dcyear desc. The sortable fields aredchdate,dccreator,dctitle,dcoa, anddcyear. Withoutsortbythe interface sorts by relevance.hits=0is a valid page size; the answer then carries the total and, if requested, facets, but no records.count()uses it.- Facet refinement (
f_<field>) searches for the exact term of a facet field, while the same term insidequeryalso matches records where the term appears as one keyword of the field's contents. The guide givesquery=unix+dcsubject:educationversusf_dcsubject=educationas the example. - The guide lists
No results found!among the error messages, and does not say whether an empty result arrives as an error body or as a normal answer withnumFound="0". The client treats anumFound="0"answer as an empty page.
Errors
- Error answers are XML:
<error>Collection 'xyz' not found!</error>, in the 400 and 500 status ranges. The client maps the status toAPIError,AuthError, orNotFoundErrorand quotes the body. - A non-XML body (the access-denied text is one) raises
APIErrorwith the first characters of the body in the message. A 401 or 403 status raisesAuthErrorbefore the body is parsed.
Repositories
ListRepositoriesanswers one unpaged XML list. The optionalcollparameter takes a pre-defined collection name: a continent (ceu), a country (de), or a state (denw); a name the interface does not know answersCollection 'xyz' not found!.ListProfileneeds thetargetinternal name aListRepositoriesentry carries.
Formats
- The default answer format is XML; the client reads it and sends no
formatparameter. The interface also offersformat=json, but the guide publishes no JSON example, so the client does not use it. Passingparams={"format": "json"}would change the wire format the client cannot parse, so don't. - Field values arrive with the types of the underlying index:
dcyearanddcoaas integers,dchdateas an ISO timestamp, everything else as strings, and multi-valued fields as lists. - The guide documents no rate-limit headers and no per-response quota
fields beyond the
responseHeaderrequest echo.