Skip to content

Types and properties

Core learns your data structure from your data. Types and properties appear as soon as they are used, and specifications add the information a user interface needs to present them.

Explore the structure

GET /v4/types?stage=RELEASED&withProperties=true&withIncomingLinks=true

This lists the types in the spaces you can read. Invitations don't extend the list.

Parameter Effect
space Only types in this space
withProperties Includes the properties and their specification
withIncomingLinks Includes links pointing to the type, with the types and spaces they come from
withOccurrenceCount Includes how often the type occurs. Enabled by default.

To look up specific types, post their names to POST /v4/typesByName.

Each type includes its identifier, name, occurrences, properties, its incoming links and a breakdown per space.

An embedded instance is reflected like a standalone instance: its properties belong to its own type, and the hosting property lists the embedded type as a target.

Type specification

Action Request
Read GET /v4/types/specification?type=...
Create or replace PUT /v4/types/specification?type=...
Remove DELETE /v4/types/specification?type=...
{
  "name": "Person",
  "description": "Someone who has contributed to a dataset",
  "color": "#00897b",
  "labelProperty": "https://example.org/properties/name",
  "searchableProperties": ["https://example.org/properties/email"],
  "embeddedOnly": false,
  "coordinates": { "x": 120.5, "y": 42.0 }
}
Field Purpose
name Human-readable label. Without it, the last segment of the type's identifier is used.
description Free text
color Color for user interfaces
labelProperty The property whose value is the instance's label
searchableProperties Properties included in label searches and shown as _additionalLabel
embeddedOnly The type is only used embedded in other instances
coordinates Position in a graph view. Needs both x and y.

All type and property specification endpoints need DEFINE_TYPES_AND_PROPERTIES, granted by the ADMIN role.

Removing a specification deletes it if the type is unused. Otherwise it is reset and flagged as no longer specified.

A type which has no instances anymore is removed unless something about it is specified: the type itself, one of its properties, its assignment to a space, a scope or a validation schema. This happens when its last instance is deleted or its specification is removed. A type which loses its last instance because a payload changed its @type is removed overnight.

Property specification

A property specification can be global or specific to a type. Values for a type take precedence.

Scope Endpoint Parameters
Global /v4/properties property
Per type /v4/propertiesForType property, type

Both support GET, PUT and DELETE.

{
  "name": "Author",
  "nameForReverseLink": "Author of",
  "targetTypes": ["https://example.org/types/Person"],
  "widget": "Autocomplete",
  "readOnly": false,
  "labelTooltip": "Who wrote this?",
  "required": true,
  "orderNumber": 10
}
Field Purpose
name Human-readable label
nameForReverseLink Label for the opposite direction of a link
targetTypes Which types the property may point to
widget Which input control a client should use
readOnly The client shouldn't allow editing
labelTooltip Help text
required The client should require a value
orderNumber Position within forms

These are hints for clients. To enforce rules, use validation schemas. Other keys are not stored.