Upstream quirks
These are behaviors of the Identifiers.org APIs, with the API documentation as the reference. Where a quirk affects bibliofabric.identifiersdotorg, the behavior of the client is noted.
Two hosts, one client
The resolution API lives at resolver.api.identifiers.org and the registry
API at registry.api.identifiers.org. The client's base_url is the
resolver host; every registry route is an absolute URL. The registry also
answers on undocumented subpaths, such as
/restApi/namespaces/{id}/resources, which the HAL _links blocks
advertise; the client wraps only the documented browse and search routes.
A curie is a path segment, and the colon matters
A compact identifier travels in the path (/taxonomy:9606). A relative
path with a colon is ambiguous for URL parsers, so the client builds the
absolute resolver URL itself. An unresolvable curie answers HTTP 400, not
404, with the envelope
{"apiVersion": "1.0", "errorMessage": "...", "payload": {"resolvedResources": null, "parsedCompactIdentifier": null}}.
The client turns that answer into NotFoundError and keeps the upstream
errorMessage text. An unknown path on the resolver, such as
/resolver-nope, answers the same 400 envelope.
The resolver sorts by recommendation
resolvedResources arrives sorted by
recommendation.recommendationIndex, highest first. Entries with an empty
providerCode are resources without a provider code, which is common for
official sites. compactIdentifierResolvedUrl is null for resources
whose link is currently down.
Reverse resolution answers 204 on no match
POST /reverse/byPrefix answers 204 No Content with an empty body when
no namespace claims the URL, and one match object otherwise.
POST /reverse/bySimilarity answers a ranked list in the same envelope.
The client maps the 204 to None for reverse() and to an empty list for
similar(). The accession payload field is optional; without it the
resolver guesses the local identifier from the URL components. The match
payload alone uses snake_case keys (possible_idorg_url,
similarity_score); every other payload of both APIs uses camelCase. The
ReverseMatch model accepts both spellings.
Registry pages are HAL
Collection answers carry {"_embedded": {"namespaces": [...]}, "_links":
{...}, "page": {"size", "totalElements", "totalPages", "number"}}. Some
search routes answer without the page block (findAllByNamespaceId,
findByNamespaceIdAndProviderCode), returning everything at once, and
Spring omits _embedded entirely when a result set is empty. Paging uses
page starting at 0 and size; page=-1 is silently ignored and
delivers the first page. The client sends size=1000 when it collects a
full search route, which covers every collection except resources (1,041
records, two pages).
Sorting uses the Spring spelling
sort reads field,asc or field,desc and repeats for multiple fields.
The client accepts the shared bibliofabric spelling (name:asc) and
converts it; a sort sequence raises ConfigurationError, because the
single-parameter dialect cannot express repeated sort keys.
Search routes disagree on single and paged answers
findByPrefix and findByName answer one record, and answer 404 with the
registry envelope {"apiVersion": "1.0", "errorMessage": "EntityRepresentationModel not found", "payload": null}
when nothing matches. findByName requires the exact full name: EBI
answers 404, European Bioinformatics Institute answers the record. The
containing and starts-with routes answer paged lists.
Records differ by route
Namespace and resource records of the browse and search routes carry no
numeric id and no institution or location; those fields appear only
in the resolver dataset copy and in resolver answers. Location records
carry countryName and created only; the countryCode that identifies
them appears only in nested copies. providerCode is "" for resources
without a provider code. Nested institution fields may hold the
placeholder string "CURATOR_REVIEW".
The statistics route is a trial feature
GET /statistics/namespace/{prefix} answers usage counts and may
disappear; a prefix without data answers 404 with an empty body, and the
restApi/profile routes (HAL ALPS metadata) answer 401, so the client
wraps neither.
The dataset is the practical bulk export
GET /resolutionApi/getResolverDataset answers the whole registry as one
JSON document of about 2 MB (869 namespaces, 1,041 nested resources at the
time of writing), and the same data is mirrored in the
identifiers-org/registry-data
GitHub repository. The client wraps the download and reads the file with
iter_resolver_dataset(). The rewriteForEmbeddedPrefixes=true query
flag, currently in testing, rewrites URL patterns for namespaces with the
prefix embedded in their local identifiers; the client downloads the plain
dataset.
Registration is a separate write workflow
POST /prefixRegistrationApi/registerPrefix creates a prefix registration
request, and the validate* routes of the same prefix check single fields
of such a request. They are registration tooling, not registry reads, so
the client wraps none of them. Upstream asks not to use the live
registration endpoint for testing.
Rate limits are undocumented
No page documents a numeric rate limit for either service. The client defaults to one request per second and two concurrent requests.