Expert Guide

Advanced configuration for AI optimizers and complex systems.

API Keys

API keys give applications, scripts, and edge integrations programmatic access to Fentrica without a human login. A key is a long-lived credential you present on every request instead of signing in — ideal for server-to-server automation.

What an API key is

  • Organization-wide. Each key belongs to one organization. You grant it access per resource, either across the whole organization or scoped to specific sites.
  • Presented as a header. Send it as X-Api-Key: lrv_… on each request.
  • Shown once. The secret is displayed only when you create the key. Copy it immediately and store it securely — Fentrica keeps only a hash and cannot show it again.

Unlike a user session, an API key has no interactive login and does not expire when a person logs out. Treat it like a password.

Permission model

A key carries one or more grants. Each grant combines:

  • a resource — what the key can touch,
  • an access levelread or read & write, and
  • a scope — the whole organization, or one or more specific sites.

Resources available today:

ResourceLevelsWhat it allows
Edge devicesread & writeConnect to and send commands to the edge devices (controllers) at your sites through the broker — for example creating connections and controlling equipment. (Read-only is not offered yet.)
Maintenance requestsread · read & writeRead lists and views maintenance requests; read & write also creates new ones.

Under the hood each grant is a string [{siteId}:]{resource}:{level} — for example edge-device:read_write (organization-wide) or d4e5f6…:edge-device:read_write (one site). You normally never type these; the UI builds them for you.

Creating a key

  1. Open your organization and go to Managers.
  2. Select the API Keys tab.
  3. Click New API Key.
  4. Give the key a descriptive name (e.g. Edge commander (prod)).
  5. For each resource, pick an access level. Leave it on None to grant nothing for that resource.
  6. For any resource you grant, add site rules: leave the default Entire organization, or choose specific sites to limit the key.
  7. Click Create.
  8. Copy the key now. It is shown only once (lrv_…). Store it in your secret manager before closing the dialog.

Using a key

Send the key on every request in the X-Api-Key header:

curl -H 'X-Api-Key: lrv_…' https://…

For a complete, working example — sending a command to an edge device — see Edge Device REST API.

Managing keys

  • The API Keys list shows each key's grants and when it was last used (or Never used).
  • Revoke a key at any time from the list; revocation is immediate and permanent.
  • Keys cannot be edited or re-displayed. To rotate, create a new key, switch your integration to it, then revoke the old one.

Security best practices

  • Least privilege. Grant only the resources and levels the integration needs, and prefer site-scoped grants over organization-wide ones.
  • One key per integration. Separate keys make it safe to revoke one without breaking the others, and make last-used activity meaningful.
  • Keep the secret server-side. Never embed a key in a browser app, mobile app, or public repository.
  • Rotate on suspicion. If a key may have leaked, create a replacement and revoke the old one.

See also