Skip to main content

Data API Overview

The data branch (/data/{tenant}) is the primary API generated from the data model. It exposes every class as a REST resource — creating, reading, updating, deleting, querying, and exporting objects, plus file upload/download and a live event stream.

All paths in this branch are tenant-scoped: the first segment after /data is the tenant identifier.

/data/{tenant}/...

Qualified names and URLs​

Classes are identified in the model by their qualified name — namespace.name, for example commons.company. In the API, that identity is translated to URL segments by a fixed set of rules:

  • The namespace is dropped. Only the name part appears in the URL; the namespace is implicit in the tenant context. commons.company and my-project.company both address a resource named company.
  • Collections use the plural form. The plural is derived automatically from the singular name using English inflection rules (via the Evo inflector), so company → companies, person → persons, agreement → agreements. You never write the plural in the model — it is always computed.
  • The name is normalized to lower-first. EmploymentAgreement in the model is addressed as employmentAgreements in the URL.
ContextFormExample
Collection (list, create)pluralGET /data/{tenant}/companies
Single objectplural + idGET /data/{tenant}/companies/{id}
Related sub-resource (multi-valued / inverse)pluralGET /data/{tenant}/countries/{id}/companies
Single-valued relation field (inside object JSON)singular{ "country": "/data/{tenant}/countries/{id}" }

The class's internal id is a deterministic UUID derived from the full namespace.name, so the same qualified name always maps to the same UUID — but that UUID does not appear in data URLs; the plural REST name does.

TODO

Confirm and document how a plural REST name is resolved back to a specific class when two namespaces define the same name (e.g. both commons.company and my-project.company). Explain the disambiguation rule (or that collisions are disallowed) and what happens on an unknown or ambiguous class name.

Endpoint map​

The data branch is documented across the following pages. Every endpoint from the generated DataController is listed here; pages marked (stub) still need to be written.

Objects — Objects​

MethodPathPurpose
POST{typeName}Create an object.
POST{referenceTypeName}/{referenceId}/{typeName}Create an object related to an existing one.
GET{typeName}/{id}Get a single object.
GET{typeName}/ownGet the caller's own object of this type.
PATCH{typeName}/{id}Partially update an object.
DELETE{typeName}/{id}Delete an object.
GET{typeName}/{id}/capabilitiesWhether the caller may modify/delete this object.
GET{typeName}/capabilitiesWhether the caller may create a typeName with no parent.
GET{referenceTypeName}/{referenceId}/{typeName}/capabilitiesWhether the caller may create a typeName related to this object.

Querying — Querying objects (stub)​

MethodPathPurpose
GET{typeName}List/query objects of a type (filtered, paged, sorted).
GET{relatedTypeName}/{relatedId}/{typeName}List objects related to a given object.
GET{typeName}/distinctDistinct values for a field over a filtered set.
GET{relatedTypeName}/{relatedId}/{typeName}/distinctDistinct values within a related list.
GET{typeName}/values/{fieldName}Filtered values for a field of a type.

Aggregations — Aggregations ✅​

Sum/avg/count over a filtered set. Standalone and related variants.

Global search — Global search ✅​

Full-text search across a tenant.

Files — Files (stub)​

MethodPathPurpose
GETuploadObtain a signed upload URI.
GETdownload/{objectId}/{fileId}Obtain a signed download URI.

Exports — Reports & exports (stub)​

MethodPathPurpose
GET{typeName}/{id}/reports/{reportName}Generate a report document and get its URI.
GETexcel/{typeName}Export a filtered list to Excel.
GETexcel/{relatedTypeName}/{relatedId}/{typeName}Export a related list to Excel.

Operations & events — Operations (stub)​

MethodPathPurpose
POSTimportImport objects from an Excel file.
POSTloadDefaultDataLoad the model's default data.
GETeventStreamServer-sent event stream of data changes.

Tenant-wide administrative operations (rebuild, ACL rebuild, recalculate, sync, delete tenant data) are not part of this branch — see the Admin API.