Zum Inhalt springen
Zum Inhalt springen

REST-API

The internal REST API powers the Vue SPA and operator scripts automating diagnostics or cloning.

Base and versioning

  • Path: /custom/knotmigration/api/
  • No /v1/ prefix in the URL
  • Required header: Knot-Migration-API-Version: 2026-05-01

Authentication

  • Valid Dolibarr session cookie
  • CSRF token X-Dolibarr-CSRF on POST/PUT/PATCH/DELETE
  • Capabilities: knotmigration.use, knotmigration.clone, knotmigration.admin

Success envelope

{
"data": { },
"meta": { "request_id": "req_abc123", "generated_at": "2026-05-17T10:42:00Z" }
}

Error envelope

{
"error": "human-readable explanation",
"code": "KM_API_*",
"request_id": "req_abc123"
}

Sensitive endpoints go through api/_license_guard_bootstrap.php.

Next