Skip to content

Farkitect is in early access. New features arrive most weeks, and these pages are updated with them. See What's New for the latest.

Metamodels

A model’s elements are of types defined by its metamodel (M2): element types, relationship types, the property types they carry, and the enumerations that some property types use. Before a program reads or reports on a model, it usually needs to know these.

Call Gives
GET /v1/projects/{projectId}/metamodels The project’s metamodels, standard and common
GET /v1/metamodels/{metamodelId} One metamodel, with its layers in the order the app shows them
GET /v1/metamodels/{metamodelId}/element-types Every element type, layer by layer, with its property types
GET /v1/metamodels/{metamodelId}/relationship-types Every relationship type, with its verbs and the element types it may join
GET /v1/metamodels/{metamodelId}/enumerations Every enumeration, with its values in order

Metamodels are read only in the API: they’re changed in the app, where the careful paths are (upgrades, value alignment, backups).

A metamodel can be included from another project of the organisation: defined once there, and a read-only copy here that takes new versions when an admin accepts them (see How to share a metamodel between projects). Such a metamodel has included:

  • sourceProjectId: the project it is included from; originProjectId: the project that defines it. They differ when it comes through another project’s copy.
  • version and label: the published version it holds.
  • state: upToDate; waiting (a newer version is published and not yet accepted); updating; failed (an update stopped part-way); or sourceGone (the project it came from no longer offers it).

included is null for the project’s own metamodels. Its types and values read as any other’s; their ids are this project’s.

A model can be included the same way. Its top-level package then has the same included field, every item in it has originUid (the original’s uid), and writes to it or to anything in it are refused with 403 forbidden. Relationships from the project’s own elements to its elements can be made as usual.

Each element and relationship type lists its property types, its own and those it inherits from its superclasses, in the order the app shows them. For each:

  • dataType: String, Integer, Real, Boolean, Date, DateTime, UnlimitedNatural, Enumeration (then enumeration names which one) or Element (a reference to an element of elementType).
  • format: how a value is shown or entered, such as multiline, url, email, richtext (Markdown), currency:NZD or percent. New formats may appear; treat one you don’t know as plain text.
  • multiplicity: lower 1 or more means a value is required; upper null means no limit.
  • defaultValue, and inheritedFrom: the superclass it comes from, or null when it’s the type’s own.

An element type’s attachment says what its elements may have attached: image (images only), file (any file), or null when they can’t have one. Check it before sending a file, rather than waiting for a 422.

Each value has a name, as people see it, and a storedValue, which is what’s stored and never changes when the value is renamed. Match on storedValue in your program; show name to people.

A type, property type or value can be retired by a metamodel upgrade: existing elements and values are kept, but nothing new should use it. retired then says since which metamodel version, and why if a reason was given; otherwise it’s null.

A relationship type’s validPairs lists the element types it may join, source to target. A null end means any type, and validPairs: null means any pair at all. A subtype is accepted wherever its superclass is: check against an element type and its superclasses.

Farkitect

Model anything.

“Welcome back — your diagrams have been plotting without you.”


Release 385 · 27 Nov 2026

Top packages: Inclusion and Sharing; Create New Version; Delete from Project

Release
385
Released
27 Nov 2026, 21:29 UTC
Built
27 Nov 2026, 21:30 UTC
Environment
Production
Surface
Docs
Commit
a5968f3
Branch
main