Skip to content

Authentication

All API requests require a Bearer token in the Authorization header.

Authorization: Bearer omx_sk_...

Get a demo key

GET /v1/auth/demo

Returns a demo session key with read-only access to sample data.

bash
curl https://api.onlymetrix.com/v1/auth/demo
json
{"session_key": "omx_sk_demo00000000000000000000000000000000", "demo": true}

Sign up

POST /v1/auth/signup
ParameterTypeRequiredDescription
emailstringyesAccount email
passwordstringyesMin 8 characters
namestringnoDisplay name

Log in

POST /v1/auth/login
ParameterTypeRequiredDescription
emailstringyes
passwordstringyes

Returns session_key for subsequent requests.

Current user

GET /v1/auth/me

Returns tenant, user info, and active scopes.

API key scopes

ScopePermissions
readQuery metrics, list tables, compiler status
writeCreate/delete metrics, resolve requests
queryExecute raw SQL
adminAll setup endpoints, key management
*Full access

Empty scopes = full access (legacy).

Generate API keys

POST /v1/setup/generate-key
ParameterTypeRequiredDescription
namestringnoKey label
scopesarraynoPermission scopes
json
{"key": "omx_sk_...", "key_prefix": "omx_sk_a1b2...", "scopes": ["read", "query"]}

WARNING

The full key is shown only once. Store it securely.

MIT Licensed (SDK) | Proprietary (Server)