API Reference

REST and streaming reference for the MicroStax control plane: route inventory, auth model, response envelopes, and transport surfaces.

Live reference for the MicroStax REST API — generated directly from the OpenAPI spec. Use it for exact request and response schemas.

Loading API reference…


What This Page Adds

The generated reference above is the schema authority. This page adds the route inventory and transport model so developers and infrastructure teams can see the implemented surface quickly.

Base URL and auth

Base URL

The control plane is usually exposed from your hosted MicroStax API or local development endpoint.

Authentication

Most routes require:

Authorization: Bearer <token>

Some org-scoped clients also send:

X-Organization-ID: <org-id>

Public routes such as health checks, share links, and some portal or webhook endpoints handle auth differently.

Response style

Most JSON APIs use a standard envelope:

{
  "data": {},
  "meta": {
    "requestId": "req_..."
  }
}

Some legacy or infrastructure routes return raw JSON rather than the envelope. Use the generated reference for exact per-route behavior.

Route Inventory

Environment lifecycle

MethodPathPurpose
POST/environmentsCreate an environment from a Blueprint.
GET/environmentsList environments.
GET/environments/:idGet one environment.
PATCH/environments/:idUpdate environment settings such as name or auto-shutdown.
DELETE/environments/:idDelete an environment.
POST/environments/:id/stopStop an environment.
POST/environments/:id/resumeResume a stopped environment.
POST/environments/:id/retryRetry provisioning after failure.
GET/environments/:id/statusGet environment and per-service status.
PATCH/environments/:id/scaleScale a service inside an environment.
POST/environments/validateValidate a Blueprint.
POST/environments/importImport from Compose-like content.
POST/environments/discoverDiscover a Blueprint from a repository URL.

Logs, topology, telemetry, and runtime inspection

MethodPathPurpose
GET/environments/:id/logsFetch recent environment logs.
GET/environments/:id/metricsEnvironment metrics view.
GET/environments/:id/deviationsConfiguration drift report.
GET/environments/:id/store-statsEnvironment storage stats.
GET/environments/:id/topologyService topology graph.
GET/environments/:id/resolve/:serviceResolve the active provider for a service.
POST/api/v1/otel/v1/tracesOTEL trace ingest.
GET/api/v1/telemetry/:envId/recentRecent telemetry for an environment.
GET/api/v1/remediation/policiesCurrent remediation policy surface.

Sharing and public access

MethodPathPurpose
POST/environments/:id/shareGenerate share metadata and tokenized links.
GET/share/:tokenPublic JSON share view with optional PIN query.
GET/portal/:envIdPublic HTML environment portal view.

Baselines, overlays, and shadow environments

MethodPathPurpose
POST/baselinesPromote an environment to a baseline.
GET/baselinesList baselines.
POST/baselines/:id/overlaysCreate an overlay from a baseline.
GET/baselines/:id/overlaysList overlays for a baseline.
DELETE/overlays/:idDelete an overlay.
POST/baselines/:id/shadowsCreate a shadow environment for validation.
GET/baselines/:id/routing-metricsBaseline routing metrics.

Data, seeds, snapshots, and replay

MethodPathPurpose
POST/environments/:id/seedRun a one-off seed against an environment.
GET/environments/snapshotsGlobal snapshot listing surface.
POST/environments/:id/snapshotsCreate an environment snapshot.
GET/environments/:id/snapshotsList snapshots for an environment.
POST/environments/:id/replayReplay the execution graph, optionally from a snapshot.
POST/seeds/publishPublish a seed package.
POST/seeds/run/:name/:envIdRun a published seed package.
GET/seeds/searchSearch the seed registry.

Diagnostics, remediation, and behavior comparison

MethodPathPurpose
POST/environments/:id/diagnoseRun diagnosis for an environment.
POST/environments/:id/diagnose/applyApply a remediation suggestion.
GET/api/v1/environments/:id/remediationInspect remediation options.
POST/api/v1/environments/:id/apply-remediation/:actionApply a named remediation action.
POST/shadow-observeRecord mirrored shadow observations.
GET/diffs/:idRetrieve behavioral diffs for an environment.
POST/api/v1/observationsIngest structured behavior observations.
GET/api/v1/observations/:contextIdFetch observations for one context.
POST/api/v1/observations/compare/:contextIdCompare observations for a request context.
GET/api/v1/baselines/:id/diffsBaseline diff view.
GET/api/v1/baselines/:id/shadow-accuracyShadow accuracy metrics.

Templates, stubs, and registries

MethodPathPurpose
GET/templatesList bundled Blueprint templates.
GET/templates/:idFetch one template.
POST/stubs/generateGenerate service stubs.
GET/registry/resolveResolve registry endpoints for a service/environment pair.
POST/registry/registerRegister a service endpoint in the registry.

Organization, governance, and billing

MethodPathPurpose
GET/organization/usageCurrent org plan and usage summary.
PATCH/organization/ssoUpdate SSO configuration.
GET/organization/drift-policyGet drift/governance policy.
PATCH/organization/drift-policyUpdate drift/governance policy.
GET/organization/compliance-reportCurrent org compliance report.
POST/billing/checkoutStart plan checkout.
POST/billing/simulate-successLocal/dev billing simulation.
POST/billing/webhookBilling webhook endpoint.
GET/billing/usageUsage and cost records.
GET/billing/ratesRate cards.
GET/admin/metrics/summaryAdmin metrics summary.
GET/admin/metrics/historyAdmin metrics history.
GET/admin/orgs/healthAdmin organization health view.
GET/admin/costs/:orgIdAdmin cost report for one org.

Auth, health, federation, and platform infrastructure

MethodPathPurpose
GET/auth/sso/discoverDiscover SSO availability from email domain.
GET/auth/sso/loginBegin SSO login redirect flow.
GET/healthCluster/API health summary.
GET/health/liveLiveness.
GET/health/readyReadiness.
GET/health/detailsDetailed health view.
GET/readyAlternate readiness endpoint.
GET/metricsPrometheus metrics.
GET/status/statsStatus summary endpoint.
POST/federation/register-providerRegister a federated provider.
GET/federation/jwksLocal JWKS document.
GET/federation/providersList federated providers.
POST/federation/sync/:idTrigger federated sync.

Streaming and WebSocket surfaces

TransportPathPurpose
WebSocket/environments/:id/progressProvisioning progress stream.
WebSocketCLI log stream transportThe current CLI implementation uses a WebSocket log stream for env logs.

Consumption guidance

  • use the generated OpenAPI section above for exact request and response schemas
  • expect environment creation and replay to be asynchronous
  • poll /environments/:id/status or subscribe to progress events rather than assuming immediate readiness
  • use the CLI or MCP server when you want task-oriented behavior instead of direct route orchestration
GoalBest surface
low-level integration with exact schemasREST API
CI/CD orchestrationCLI with --json
agentic automationMCP server
API Reference | MicroStax Documentation