Skip to main content
Back to Documentation

Api Reference

Secure, tenant-scoped REST API for your own integrations. Versioned endpoints with API key authentication and rate limiting.

Key Capabilities

API key authentication with tenant-scoped read and write scopes
Endpoints for assets, inspections, failure modes, RBI assessments, risks, actions, decisions and the audit trail
JSON requests and responses; errors as RFC 9457 problem details with a stable code
Rate limiting per tenant
Versioned API (v1), described in full at /api/openapi.yaml

Authentication

All API requests require an API key passed in the Authorization header. API keys are created and managed in the portal under Settings > API Keys. Each key belongs to a single tenant and cannot read or change data of another tenant; this is enforced in the database through Row Level Security. Every endpoint needs either the read scope (GET requests) or the write scope (the POST and PATCH requests listed below); a key without the needed scope receives 403. The header format is: Authorization: Bearer rl_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx. Keys can be revoked at any time, and revocation takes effect immediately. Organisations can create several keys and rotate them on their own schedule. A missing, invalid or revoked key receives 401 with code UNAUTHORIZED; a key without the needed scope receives 403 with code FORBIDDEN and requiredScope.

Core Endpoints

All endpoints live under /api/v1. Assets: GET /api/v1/assets lists assets (filters: status, criticality). GET /api/v1/assets/:id returns one asset. POST /api/v1/assets creates an asset (required: tag, name; optional: type, criticality, status, location). Inspections: GET /api/v1/inspections lists inspections (filters: asset_id, status, type). Failure modes: GET /api/v1/failure-modes lists FMEA failure modes (filters: asset_id, severity_min). GET /api/v1/failure-modes/:id returns one. RBI assessments: GET /api/v1/rbi-assessments lists RBI assessments (filters: asset_id, risk_ranking). GET /api/v1/rbi-assessments/:id returns one. Risks: GET /api/v1/risks lists risks (filters: status, min_score). GET /api/v1/risks/:id returns one. Actions: PATCH /api/v1/actions/:id/status moves an action to a new status, subject to the allowed transitions. POST /api/v1/actions/:id/deferrals requests a deferral. GET /api/v1/actions/:id/escalation-history returns its escalation events. Decisions: GET /api/v1/decisions lists decisions; POST /api/v1/decisions records one. Audit: GET /api/v1/audit/verify-chain verifies the tamper-evident audit chain; POST /api/v1/audit/generate-package builds an audit package. List endpoints take page (default 1) and limit (default 50, max 100). POST /api/v1/assets, POST /api/v1/decisions and POST /api/v1/actions/:id/deferrals accept an Idempotency-Key header: a retry with the same key and body returns the first answer instead of writing twice. Field-level request and response schemas are in the OpenAPI specification at /api/openapi.yaml.

Request and Response Format

All requests and responses use JSON (Content-Type: application/json). A successful response is {"ok": true, "data": ...}. A single resource comes under a named key, for example {"ok": true, "data": {"asset": {...}}}. A list comes as {"ok": true, "data": {"items": [...], "pagination": {"page": 1, "limit": 50, "total": 142, "totalPages": 3}}}. An error is RFC 9457 problem details (Content-Type: application/problem+json): {"type": "https://www.reliatic.com/docs/api#error-not-found", "title": "Not found", "status": 404, "detail": "Asset not found.", "instance": "urn:uuid:...", "code": "NOT_FOUND", "correlationId": "..."}; quote the correlationId when you contact support. An invalid input lists each field in errors[] (pointer for body fields, parameter for query and path parameters); unknown body fields and unknown query parameters are refused, not ignored. Request bodies are at most 1 MiB (413 PAYLOAD_TOO_LARGE). Codes include VALIDATION_ERROR (400), UNAUTHORIZED (401), FORBIDDEN and PLAN_REQUIRED (403), NOT_FOUND (404), CONFLICT and INVALID_STATE_TRANSITION (409), PAYLOAD_TOO_LARGE (413), IDEMPOTENCY_KEY_REUSED (422), RATE_LIMITED (429), INTERNAL_ERROR (500) and SERVICE_UNAVAILABLE (503, retry after the Retry-After header); the full table is on /docs/api. The older members ok, error and message stay in the body for existing integrations. Dates are ISO 8601 in UTC.

Rate Limiting

API requests are rate-limited to protect platform stability and ensure fair usage across tenants. Requests are rate limited per tenant: 600 requests per minute, shared by all API keys of the tenant. When the limit is exceeded, the API returns a 429 Too Many Requests response with a Retry-After header (seconds to wait before retrying) and X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (the Unix time when the window resets). Every authenticated response also carries the X-RateLimit-* values, so a client can slow down before it reaches the limit. If the rate limiter is briefly unavailable, the API returns 503 with Retry-After; treat it like a 429. Best practices for staying within rate limits: use pagination to retrieve large datasets in batches rather than requesting all records at once, implement exponential backoff on 429 responses, and poll at a modest interval.