Upstream quirks
Behavior of the live GLEIF API that shapes how the client works, with the
API documentation as the
reference. Where a quirk affects bibliofabric.gleif, the behavior of the
client is noted.
Documented routes that do not exist
The documentation describes /legal-entities, /registered-entities,
/filtering, and /lei-files, and parent routes named direct-parents,
indirect-parents, and headquarters. The live API serves none of them:
each answers with a bare 404. The live parent routes are
direct-parent, ultimate-parent, direct-children, and
ultimate-children, and the relationship routes end in
-relationship or -relationships. bibliofabric.gleif follows the live
routes.
No cursor paging
page[cursor] answers with HTTP 500. Paging is page[number] and
page[size] only, with page[size] between 1 and 200 and the default at
15. Deep result sets are reached with page numbers; the meta member carries
pagination.total and pagination.lastPage. bibliofabric.gleif stops a
page walk on lastPage or an empty page, never on a cursor.
Strict parameters
An unknown query parameter answers with HTTP 400, and an unknown filter key
answers with 400 and the message Filter should contain only allowed
values.. Only the keys that answered 200 live are wrapped in
LeiRecordFilters: lei, bic, isin, fulltext,
entity.legalName, entity.legalAddress.country, entity.category,
entity.jurisdiction, entity.expiration.date, registration.status,
registration.managingLou, owns, and ownedBy. The API rejects
entity.status, entity.legalForm.id, and
registration.nextRenewalDate as filter keys, so the client does not
offer them. /lei-records has no free-text query parameter; free text
travels in the fulltext filter, and passing query= raises
ConfigurationError before a request goes out.
Completion fields differ per route
/autocompletions rejects field=entity.legalName with HTTP 400 and the
message Unsupported Autocompletion Field; field=fulltext answers 200.
/fuzzycompletions accepts entity.legalName. Both routes share the
CompletionFilters model, so choose the field per route.
Rate limit and errors
The API allows 60 requests per minute; the client defaults to 0.95 requests
per second and 3 concurrent requests. A missing route answers with a bare
404, while a missing relation of an existing record answers with 404 and
the message Related resource not found; both raise NotFoundError.
The export service is a different host path
/export/v1/lei-records.{csv,xlsx,json} on the same host serves at most
5,000 records per request and applies its own rate limit: one request
during verification answered with 429 and an HTML body. The route takes
filter[...] and sort parameters like the API. export_lei_records()
asks for Accept: */* and returns the raw bytes.
The Golden Copy and delta files
The full corpus ships as daily Golden Copy files and delta files on
lei.info, not through the API. The per-record routes
are the scope of this client; there is no dump loader in
bibliofabric.gleif.
Field shapes the schema does not advertise
- The mapped-identifier attributes
bic,mic,ocid,qcc, andspglobalare a string for most records and a list of strings for some (spglobalobserved as a list live). The models accept both. DataField.enumis a label map for some fields and a plain list for others.- A registration agent that is not itself an LEI holder reports
leias the all-zero placeholder00000000000000000000, which failsbibliofabric.ids.is_lei(). TreatRegistrationAgent.leias absent when it is that value.