API guide

Work with the running application model.

Use JSON:API resources for predictable record operations, follow relationships, shape collection queries, and let tools inspect the server through discovery routes.

  • JSON:API
  • Relationships
  • Discovery

Resource requests

Create and read a record with its public ID.

curl -X POST http://localhost:6336/api/product \
  -H "Content-Type: application/vnd.api+json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"data":{"type":"product","attributes":{
    "name":"Desk lamp","price":39.00
  }}}'

The response uses the record's public UUID reference. Use that value for record and relationship URLs; the compact integer primary key remains an internal database concern.

Collection queries

Ask for the list the screen needs.

Filter

Pass a structured query expression rather than interpolating arbitrary SQL. Test every supported operator with representative data.

Sort and paginate

Choose supported columns and stable ordering, then preserve pagination controls in the client.

Aggregate

Use supported grouping and aggregation inputs for totals and summaries without creating a reporting endpoint for each screen.

Include relationships

Load related resources where the client needs them while retaining permission checks on the returned data.

Discovery

Let tools inspect what the server exposes.

/openapi.yaml

Retrieve the generated OpenAPI description for HTTP tooling and client exploration.

/meta

Inspect Daptin's running model and the structure available to administrative clients.

/jsmodel/{typename}

Load a generated JavaScript model for a specific application type.

Optional GraphQL

Enable the graph interface when a client needs selected connected fields in one request.

GraphQL guide →

Verification

Test access and malformed input, not only success.

  • Exercise collection, record, and relationship routes with the documented media type.
  • Confirm invalid attributes and unsupported query inputs are rejected.
  • Verify guest, user, owner, group, and administrator results differ as configured.
  • Test sorting and pagination together so records do not drift between pages.
  • Compare discovery output with the currently loaded application model.
  • Set Daptin traffic limits and enforce request-size limits at a trusted reverse proxy for public clients.
  • Cap REST page[size] at an API gateway for the latest release, then load-test includes and aggregates.

Protect the API with the application access model.