Technical Deep Dives

Building Integrations with the ERMLib API

View as Markdown
Building Integrations with the ERMLib API
On this page

One of the most requested capabilities in ERMLib v3.0 was a robust, well-documented API that makes it straightforward to connect library systems with campus infrastructure, third-party tools, and custom applications. Today we are walking through the fundamentals of building on the ERMLib API.

Authentication

All API requests require authentication via OAuth 2.0 bearer tokens. You can generate API credentials from the Admin Console under Settings, then API Access. We support both client credentials flow for server-to-server integrations and authorization code flow for applications that act on behalf of individual users.

Tokens expire after one hour by default, and refresh tokens are valid for 30 days. We recommend storing tokens securely and implementing automatic refresh logic in your integration.

REST and GraphQL

The ERMLib API offers both REST and GraphQL endpoints. REST is available at api.ermlib.com/v3/ and follows standard conventions: resource-oriented URLs, standard HTTP methods, and JSON request and response bodies.

GraphQL is available at api.ermlib.com/v3/graphql and is particularly useful when you need to fetch related data in a single request. For example, retrieving a patron record along with their active holds, current checkouts, and fine balance can be done in one query rather than four separate REST calls.

Common Integration Patterns

Campus Authentication. Most academic libraries need ERMLib to work with their institution's single sign-on system. Our SAML 2.0 and OpenID Connect support handles this, but the API also exposes user provisioning endpoints for automated account creation and role assignment.

Learning Management Systems. Course reserve workflows benefit from direct integration between ERMLib and platforms like Canvas or Moodle. The reserves API allows LMS plugins to check availability, place holds, and surface reading lists directly within course pages.

Discovery Layers. If your institution uses a separate discovery layer, the search API provides raw access to ERMLib's index with support for fielded queries, faceting, and relevance tuning parameters.

Webhooks for Real-Time Events

Polling is inefficient for workflows that need to respond to events as they happen. ERMLib v3 supports webhooks for over 40 event types, including item checked out, hold placed, patron created, and record updated.

Configure webhook endpoints in the Admin Console and select the events you want to receive. Each webhook delivery includes a signature header that your endpoint should validate to confirm the request originated from ERMLib.

Rate Limits and Best Practices

API requests are rate-limited to 1,000 requests per minute per API key. For bulk operations, use our batch endpoints, which accept up to 100 operations in a single request.

Cache aggressively where it makes sense. Bibliographic records change infrequently, so caching catalog responses with a reasonable TTL reduces unnecessary calls. Patron-specific data should not be cached for extended periods due to privacy considerations.

Getting Started

The developer documentation at docs.ermlib.com includes interactive examples, code samples in Python, JavaScript, and Java, and a sandbox environment where you can experiment without affecting production data. We also maintain client libraries for the most common languages to simplify integration work.

Build something interesting and let us know. We love seeing what our community creates.

ERMLib Team

Product, engineering and library specialists

Related Posts