Skip to content

Runtime API

Looking for the public API?

This page covers the generated CRUD API that the runtime creates from manifests. For the public contract intelligence API (schema discovery, validation, guidance), see Contract Intelligence API.

The API runtime reads entities from a compiled manifest and generates REST API endpoints. Each entity in the manifest becomes a set of CRUD routes.

What it generates

Given an entity definition, the API runtime creates five standard endpoints per resource:

MethodPathAction
GET/resourceList records with filtering and pagination
GET/resource/:idFetch a single record
POST/resourceCreate a record
PATCH/resource/:idUpdate a record
DELETE/resource/:idDelete a record

Role-scoped access control applies to each endpoint based on the roles section of the manifest. A viewer role with actions: [read] on an entity gets access to the GET endpoints only.

Routes follow the API Conventions defined in this project.

Example

Given this entity in the manifest:

yaml
entities:
  - key: customer
    name: Customer
    pluralName: Customers
    fields:
      - key: name
        type: string
        name: Full Name
      - key: email
        type: string
        name: Email

The API runtime generates routes under /customers. The list endpoint returns a paginated response with metadata. The detail endpoint returns a single record. Create and update endpoints validate the request body against the field definitions.

Current status

The runtime API is currently exposed by the @ikary/cell-runtime-api app in this repository. A standalone API generation package is not published yet.

  • API Conventions: full route structure, request and response shapes, error taxonomy, and pagination contract
  • Entity Definition: fields, relations, lifecycle states, and access policies
  • Manifest Format: how entities, roles, and pages relate in the manifest