Beta-Tester gesucht: Prüfpläne mit calScript schreiben und den Messplatz mit dem calServer Runner steuern.Bei der Beta mitmachen

For developers

The calServer V2 REST API.

Your systems read and write devices, calibrations, customers and orders through a versioned JSON interface. Authentication uses a token that is tied to a user and their permissions. On this page we explain the rules that apply to all endpoints.

What is available

REST API v2

Devices, calibrations, customers, locations, repairs, orders, documents, tickets and more. Consistent paths under /api/v2.

API tokens

An administrator issues tokens per user, with a name and an optional expiry date. Each token can be revoked individually.

Permissions from the role

A token may do exactly what its user may do. For request portals we include the role api_integration with the minimum needed.

AI connection via MCP

Under /api/v2/mcp, AI assistants read and maintain data. Sign-in via OAuth 2.1 or token, with the user's permissions.

Order integration

A documented flow for request portals: create a request, check the status, pick up documents.

Document channel for customers

A separate endpoint delivers only approved documents in their latest version. Internal drafts stay internal.

Your first call in three steps

How to set up an integration without handing out passwords.

  1. Create a service user

    A separate user for the integration. Its role contains the operation using_API and only the permissions it needs.

  2. Issue an API token

    In user management under API tokens. You see the plain text exactly once; calServer only stores a hash.

  3. Send your first request

    Send the token in the header Authorization: Bearer. GET /api/v2/auth/me shows who you are signed in as.

How the API works

These rules apply to all endpoints.

Address and version

Every calServer installation has its own address. The API sits under it at /api/v2/, so the major version is in the path. Every response also states the exact version in meta.api_version. Resources have plural names: /inventories, /calibrations, /customers, /locations, /repairs, /bookings, /documents, /tickets and more.

Only a few endpoints can be reached without signing in, for example GET /api/v2/health for your operations monitoring.

Signing in

Every request carries a bearer token in the Authorization header. A token always belongs to one user and has exactly that user's permissions. The user needs the operation using_API, otherwise the API responds with 403.

You get a token in one of two ways:

  • API token (recommended): An administrator issues it in user management. The other side only stores the token. It can be revoked individually and given an expiry date if you like.
  • Sign-in with API key: POST /api/v2/auth/token with email and password in the body and the user's API key in the X-REST-API-KEY header. The other side has to store all three values for this.

We recommend the API token, because then the other side doesn't know a password. A password is always also a sign-in to the interface. You see a token's plain text exactly once; calServer only stores a hash.

curl "https://your-instance.example.com/api/v2/auth/me" \
  -H "Authorization: Bearer <your token>" \
  -H "Accept: application/json"

Response format

Responses follow the JSON:API structure. Each record is in data with id, type and the fields in attributes. Lists also contain meta with the total count and page details, and links to the next and previous page.

{
  "data": [
    {
      "id": "ea79f4c2-1b3d-4c88-9f21-7c0a5d13e001",
      "type": "inventory",
      "attributes": { "I4201": "PM-100", "I4202": "FLUKE" }
    }
  ],
  "meta": { "total": 1240, "page": 1, "per_page": 25, "last_page": 50, "api_version": "2.0.0" },
  "links": { "first": "…", "last": "…", "next": "…", "prev": null }
}

Paging, filtering and sorting lists

  • Pages: page[size]=50&page[number]=2. Without this, the API returns 25 entries, at most 100 per page.
  • Filters: filter[field]=value for an exact match. With an operator in front: like:*Fluke*, ne:, gt:, gte:, lt:, lte:, in:a,b,c, between:2026-01-01,2026-12-31, empty: and nempty:. Several filters are combined.
  • Sorting: sort=field ascending, sort=-field descending, several fields separated by commas.
GET /api/v2/inventories?filter[I4202]=like:*Fluke*&sort=I4201&page[size]=50

Field names and keys

Each installation decides under which name a field appears in the API. The default is the field codes from calServer V1, such as I4206 for the serial number. That way existing integrations keep running without changes. In field management you can switch to readable names such as serial_number per table. The V1 codes remain valid in filters and sorting.

The existing keys keep their values: a device's MTAG is the id under /api/v2/inventories in V2, and the CTAG is the id of the calibration. References to other records are named after their target, such as inventory_id or customer_id.

Error messages

Errors always come as Problem Details per RFC 7807 with the content type application/problem+json: type, title, status and a readable explanation in detail. For validation errors (422), errors shows which field has which problem.

{
  "type": "https://httpstatuses.com/422",
  "title": "Validation Error",
  "status": 422,
  "detail": "…",
  "errors": { "<field>": ["…"] }
}

Status codes follow HTTP: 401 without a valid sign-in, 403 for a missing permission, 404 for unknown records, 409 for conflicts, 423 for a locked account and 429 for too many requests.

Rate limit

By default, 600 requests per minute are allowed per user; the operator of the installation can adjust this. The headers X-RateLimit-Limit and X-RateLimit-Remaining show the current state. If the limit is exceeded, the API responds with 429 and states in Retry-After when you can continue. Sign-in endpoints are also limited more tightly per address.

Switching from the V1 API

Existing V1 clients can send the header Accept: application/vnd.calserver.v1+json during the switch; the API then responds in the old format. This bridge is deprecated and will be removed with version 7.0. What changes in paths, sign-in and filters is described in the migration guide.

AI connection via MCP

Under /api/v2/mcp, calServer provides a connection based on the Model Context Protocol. AI assistants use it to read and maintain tables, calibrations and settings. Sign-in uses OAuth 2.1 with automatic client registration or an API token. Every tool checks the same permissions as the interface. The operator can switch the connection off or restrict it to reading.

Reference

All endpoints with parameters, requests and responses are described in the API reference as an OpenAPI 3.0 specification, plus an interactive view for looking things up.

Limits you should know beforehand

calServer does not send webhooks. If you want to react to changes, you poll the current state. For portals, an interval of about 15 minutes has proven itself. Notifications to third-party systems are planned but not available today. We would rather say that here than only in the project meeting.

Tokens have no partial permissions of their own. A token may always do everything its user may do. You draw the line through the service user's role. A token without an expiry date is valid until it is revoked; you decide on rotation in your own operations.

The reference keeps growing. New endpoints are added all the time. If something is missing from the documentation, ask us. You get a reliable answer instead of a guess.