API Reference¶
calServer provides two independent REST APIs:
| Version | Technology | Authentication | Format | Status |
|---|---|---|---|---|
| API v1 (Production) | Yii 1.1, PHP 7.4 | Header-based (X_REST_USERNAME/PASSWORD/API_KEY) | Custom JSON format | Stable |
| API v2 (calServer 6.0) | Laravel 11, PHP 8.2+ | Bearer Token (Sanctum) | JSON:API compatible | Beta / In Development |
API v1 (Production)¶
The production API v1 uses coded field names (I4201, C2301, ...) and header-based authentication.
Endpoints¶
| Endpoint | Description |
|---|---|
/api/inventory |
Retrieve, create, update and delete inventory items |
/api/calibrations |
Manage calibration processes |
/api/customers |
Edit customer master data |
/api/standards |
Calibration standards and reference values |
/api/reports |
Generate and download reports |
/api/documents |
Upload and retrieve documents |
/api/users |
Manage user accounts |
/api/roles |
Roles and permissions |
/api/groups |
User groups |
/api/locations |
Locations |
/api/repairs |
Maintenance and repairs |
/api/results |
Calibration results |
/api/version |
Current software version |
API v2 (Beta — calServer 6.0)¶
In Development
API v2 is under active development for calServer 6.0 and is not yet production-ready. Endpoints, response formats and authentication may still change.
The new API v2 uses descriptive field names, Bearer token authentication and a JSON:API compatible response format.
Endpoints (Selection)¶
| Endpoint | Description |
|---|---|
POST /api/v2/auth/token |
Generate Bearer token |
GET /api/v2/inventories |
Inventory list (paginated, filterable) |
POST /api/v2/inventories |
Create inventory |
GET /api/v2/categories |
Retrieve categories (inventory, calibration, repair, booking) |
POST /api/v2/categories |
Create category (with hierarchy) |
GET /api/v2/fields |
Available tables with field overview |
GET /api/v2/fields/{table} |
Field configurations for a table (with category/status overrides) |
GET /api/v2/additional-fields |
Field overrides per category/status |
GET /api/v2/customers |
Customer master data |
GET /api/v2/calibrations |
Calibrations |
GET /api/v2/statuses |
Status management |
Authentication¶
Details on authentication for both API versions can be found under Authentication.
Code Examples¶
Practical examples for both API versions are available on the Code Examples page.
Downloads¶
| File | Description |
|---|---|
| openapi-v2.yaml | OpenAPI 3.0 Specification — API v2 (Laravel) |
| openapi.yaml | OpenAPI 3.0 Specification — API v1 (Legacy) |
| postman-collection.json | Postman Collection with examples and test scripts |