Skip to content

Choose an application interface

View as Markdown

Choose the application operation before choosing its caller. A generated table route, domain endpoint, report, and SQL query preserve different rules. A browser, typed client, CLI command, or agent is only a caller of one of those operations.

Start with the invariant that must survive the call. That choice determines where authorization, validation, and confirmation belong.

OutcomeOwning operationSuitable callersConfirmation
Inspect or edit an ordinary registered recordGenerated record screen or table APIBrowser, rows CLI command, or data-console agentRead the affected row through the same visible table surface
Answer an ad hoc total or one-column groupGenerated table countrows count, direct HTTP, or application server codeState the filter meaning, row boundary, grouping, and result bound
Apply a named business transitionApplication endpointTyped browser client, api CLI command, or data-console agentRead the declared domain result and the affected state
Reuse an aggregate or read modelProtected report route and screenBrowser, api CLI command, or data-console agentCheck the returned dataset or aggregate against its scoped base rows
Change repository behaviorSource code and testsCoding agent with the Sapporta skillReview the diff and focused verification
Perform exceptional administrationAbility-gated unrestricted SQL endpointExplicitly authorized operator using sqlBound the query or mutation and inspect the resulting state

A custom screen does not automatically require a custom data operation. It can call the generated table API when one registered table still owns the record. Conversely, putting a multi-table transition behind a custom button does not make a sequence of table updates atomic; that rule belongs in one application endpoint.

The generated count operation is narrower than a report. It counts visible rows from one table, optionally grouped by one column. Use a report when the application already owns the meaning, when the question combines tables, or when the result needs reusable measures and labels.

Authentication establishes the caller. Abilities decide whether that caller may perform the action. Row visibility limits which records the permitted action may reach. These checks remain server-side regardless of whether the caller is a generated screen, the CLI, or an agent.

A missing row and a row hidden from the caller may intentionally produce the same not-found result. Do not respond by changing workspace parameters, adding owner fields, or falling back to SQL. Client payloads also omit server-managed workspace, ownership, role, audit, and row-scope fields unless the owning contract explicitly accepts them.

The shared authentication boundary can reject a request before a generated or application operation runs. Endpoint discovery shows the operation’s HTTP contract; it does not prove the caller’s ability or row visibility.

Once the owner is clear:

  1. Inspect the live table metadata or mounted endpoint.
  2. Resolve names and record IDs from rows visible to the caller.
  3. Execute the narrowest operation that preserves the rule.
  4. Read back the intended consequence through an application surface.

An HTTP success proves transport and the declared response, not every intended side effect. Confirm the affected record, event, report, or other observable invariant. If the write result is uncertain after a transport failure, read before retrying.

sql query and sql execute call ability-gated unrestricted metadata endpoints. They bypass generated row helpers and the application operations above, so they are administrative fallbacks rather than alternate CRUD commands. Prefer a generated route, named domain endpoint, or scoped report whenever one owns the task.