Skip to content

REST API

SkeinRank currently exposes two HTTP surfaces:

  1. the lightweight runtime/server package for local extraction and reranking experiments;
  2. the governance API used by the platform beta, console, bindings, jobs, snapshots, and runtime search.

For product-level application integration, start with the API integration guide.

The lightweight server package exposes a small HTTP surface for extraction and retrieval experiments:

MethodPathPurpose
GET/healthzBasic health check.
GET/diagnosticsDiagnostic information for the lightweight server.
POST/v1/attributes/extractExtract and canonicalize attributes from text.
POST/v1/rerank/esRun an Elasticsearch-oriented reranking flow.

Use this path when you want the smallest API surface around the core package.

The governance API includes health, readiness, metrics, and platform summary endpoints.

MethodPathPurpose
GET/livezLiveness check.
GET/healthzBasic API health check.
GET/readyzReadiness check for dependencies.
GET/metricsPrometheus-compatible metrics when enabled.
GET/v1/dashboard/summaryDashboard command-center summary used by the console.
GET/v1/snapshots/summaryRuntime snapshot audit summary used by the console.
MethodPathPurpose
POST/v1/auth/loginExchange username/password for a bearer token.
POST/v1/auth/logoutRevoke the current bearer token.
GET/v1/auth/meReturn the current user and role.
GET/v1/auth/api-tokensList masked personal API tokens for the current user.
POST/v1/auth/api-tokensCreate a copy-once personal API token.
GET/v1/auth/service-accountsList service accounts. Admin role required.
POST/v1/auth/service-accountsCreate a service account. Admin role required.
POST/v1/auth/service-accounts/{account_name}/tokensCreate a copy-once service account token. Admin role required.

These are the endpoints an external application is most likely to call.

MethodPathPurpose
POST/v1/text/canonicalizeCanonicalize text using a profile or binding context.
POST/v1/query/planPreview canonical query, matched aliases, and Elasticsearch DSL without executing search.
POST/v1/searchExecute binding-aware runtime search against Elasticsearch.
POST/v1/search/multiExecute search across multiple binding contexts and merge hits.

Recommended production request shape:

{
"binding_id": 42,
"query": "k8s pg timeout",
"size": 10,
"canonical_boost": 3.0
}

Use the API integration guide for examples and application patterns.

The governance API also exposes control-plane endpoints for console workflows. Common groups include:

GroupExample pathsPurpose
Profiles and terms/v1/governance/profiles, /v1/governance/profiles/{profile_name}/termsManage terminology profiles, canonical terms, and aliases.
Suggestions/v1/governance/profiles/{profile_name}/suggestionsCreate, review, approve, reject, and refresh evidence for suggestions.
Guardrails/v1/governance/global-stop-list, /v1/governance/profiles/{profile_name}/stop-listManage global and profile-scoped stop lists.
Elasticsearch bindings/v1/governance/elasticsearch/bindingsCreate bindings and list runtime search contexts.
Dry-runs and evidence/v1/governance/elasticsearch/bindings/{binding_id}/dry-run, /v1/governance/elasticsearch/bindings/{binding_id}/evidencePreview enrichment and collect evidence from indexed documents.
Enrichment jobs/v1/governance/elasticsearch/bindings/{binding_id}/jobsStart and operate enrichment jobs for a binding.

When the governance API is running locally, FastAPI exposes interactive schema docs:

http://127.0.0.1:8010/docs
http://127.0.0.1:8010/redoc

Use those local pages for exact schemas while the beta API is still evolving. This website keeps the public documentation focused on stable integration patterns and product concepts.