Skip to content

Pantahub services

The Pantahub API (pantahub-base) is composed of small REST services, each mounted under its own path. These pages document every service the way you use it from the command line — what it is for, who authenticates to it, and the request flows that matter — complementing the endpoint-by-endpoint API Reference and the ideas explained in How the platform works.

All examples use https://api.pantahub.com; on a self-hosted Hub substitute your own API endpoint. Most calls need a JWT from auth:

sh
TOKEN=$(curl -s -X POST https://api.pantahub.com/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"username":"<nick>","password":"<password>"}' | jq -r .token)

The services

ServicePathWhat it does
auth/authAccounts, login, tokens, OAuth-style delegation
devices/devicesThe device registry: claiming, metadata, device tokens
trails/trailsPer-device revision history that drives updates
objects/objectsContent-addressed blob storage with signed URLs
logs/logsDevice log ingestion and querying
apps/appsThird-party OAuth applications and scopes
profiles/profilesPublic user profiles
subscriptions/subscriptionsPlans and quotas (admin-managed)
dash/dashPer-account summary: quotas, top devices
metrics/metricsPrometheus metrics of the service itself
healthz/healthzLiveness/readiness for operators
cron/cronRecurring maintenance endpoints
callbacks/callbacksChange-propagation hooks

Identities and PRNs

Everything in Pantahub is addressed by a PRN (Pantahub Resource Name) — prn:::devices:/<id>, prn:::accounts:/<id>, prn:pantahub.com:objects:/<id>, and so on. Three account classes authenticate against the same auth service:

  • USER — humans (and bots) with nick, email and password.
  • DEVICE — devices, logging in with their PRN as username and their creds.secret as password.
  • SERVICE — API services that can act on behalf of users via delegated tokens.

The last three services in the table (healthz, cron, callbacks) are operator endpoints: they use HTTP Basic auth as saadmin with the PANTAHUB_SA_ADMIN_SECRET configured on the server, not JWTs.