Skip to content
LACE
  • v0.1 Current
  • Python
  • TypeScript Soon

API & Platform

REST API, SDKs & integration surfaces

Every capability the platform offers is reachable three ways: the /v1 REST API, the lace-app-sdk (Python), and the event/hook surfaces the platform operates.

The REST API — /v1

Base URL: https://api.laceplatform.com (or http://localhost:8000 in dev). Auth: Authorization: Bearer <api_key> (API key scoped to a tenant; see authentication). All routes are tenant-scoped — the tenant is derived from the principal, not from a request parameter you can spoof.

terminalbash
curl https://api.laceplatform.com/v1/enterprise-search \
  -H "Authorization: Bearer $LACE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"Q3 warranty reserves","limit":10,"rerank":true}' | jq
GroupExample routesWhat it owns
AuthPOST /v1/auth/login, GET /v1/auth/whoamiSession + principal
AppsPOST /v1/apps, GET /v1/apps/{id}, GET /v1/apps/{id}/git-credentialLifecycle, releases, sidecar
App dataGET /v1/apps/{id}/collections/{coll}/recordsTyped collections + blobs
DatasetsPOST /v1/datasets, POST /v1/datasets/{id}/syncConnectors, sync, permissions snapshots
SearchPOST /v1/enterprise-search, POST /v1/searchEnterprise search & RAG retrieval
Knowledge graphPOST /v1/kg/query, POST /v1/kg/assertionsEntities, assertions, evidence
PipelinesPOST /v1/pipelines/{id}/runsWorkflow execution
AgentsPOST /v1/agents/{id}/sessionsSessions, tasks, control plane
BuilderPOST /v1/builder/sessionsApp Builder architect sessions

Conventions: JSON everywhere, paginated lists with limit/offset (or cursor where noted), stable error shape {"detail": "...", "code": "..."}, and OpenAPI at /openapi.json in dev. Read src/lace/api/routes/ (159 files, ~713 paths) for the full inventory.

SDKs we ship

SDKPackageForImport / install
lace-app-sdk (Python)lace-app-sdk on PyPIApp authors — the only supported surface for appspip install lace-app-sdkfrom lace_app_sdk.data import AppDataService
lace-runtime (Python)internal (src/lace_runtime)Sidecar server — you don't install this, the platform runs itfrom lace_runtime.tool_host import ... (inside sidecar only)
lace CLIentry point lace-app in the SDK wheelLocal dev, CI, operator taskslace-app --help — see CLI reference
Frontend SDKJS/TS in frontend/Internal app shell + generated runtime UIModule Federation remote — apps expose ./RuntimeView
OpenAPI clientgenerated from /openapi.jsonAny languagenpx openapi-generator-cli ... against dev spec
pythonAppData query via SDK vs raw REST
from lace_app_sdk.data import AppDataService, AppDataQueryRequest

svc = AppDataService(app_state=state)
page = svc.list_records("acme.field_intake", "tickets",
                         AppDataQueryRequest(search="warranty", limit=20))

Other integration surfaces

SurfaceWhat it is
WebhooksOutbound HTTP on dataset sync, pipeline run, agent task, and release events. HMAC-signed.
Event bus (NATS)Internal pub/sub for ingest and KG events — not a public contract today; webhooks are the stable outbound surface.
MCPBuilder and assistant expose Model Context Protocol tools for workspace and platform operations.
Sidecar HTTPYour app's own routes at /apps/<app_id>/api/* + /ui/manifest.json — see routes & UI.

Versioning & pagination

  • API is versioned by path prefix (/v1). Breaking changes bump the prefix; additive changes don't.
  • SDK is semver — breaking a published lace_app_sdk symbol is a major bump with a deprecation window.
  • Lists paginate with limit (default 20) + offset or cursor; responses include total where stable.

Errors

Errors are JSON: {"detail": "human message", "code": "app_data_unique_constraint_failed"}. Constraint violations (unique, foreign) surface as HTTP 409; permission failures as 403 — not 404 — so callers can distinguish "not found" from "not allowed."

Next: authentication & tenancy or CLI reference.