Elements
Elements are the nodes and relations of the graph. Every element has an , a type (the node label or relation type) and data, its properties. Relations additionally have a start and an end node. An element can have one , which can be uploaded at once or in chunks with a resumable . The of its type validates the properties of an element, and the access decides who can read and write it.
The properties are stored in several databases internally, see . This is invisible when using the element , but matters when writing search steps which target one of the databases directly, e.g. a Cypher path .
Special fields
A handful of fields are managed by the API and always written the same way:
| Field | Neo4j | MongoDB | Elasticsearch |
|---|---|---|---|
id | property | _id (document identifier) | _id (document identifier) |
type | label / relation type | collection name | index name |
name | property | property | field |
createdAt | native DateTime | UTCDateTime | date (sent as an RFC 3339 string) |
createdBy | property (id of the user) | property (id of the user) | field (id of the user) |
updatedAt | native DateTime | UTCDateTime | date (sent as an RFC 3339 string) |
updatedBy | property (id of the user) | property (id of the user) | field (id of the user) |
hasFile | boolean | boolean | boolean |
The type of nodes (their label) and relations has to start with a letter, followed by up to 127 letters, digits or underscores (^[A-Za-z][A-Za-z0-9_]{0,127}$); other values are rejected with 400 Bad Request. New types additionally follow a casing rule: node labels are written in UpperCamelCase (SavedSearch) and relation types in SCREAMING_SNAKE_CASE (HAS_FILE). Types which exist already keep their names, see .
createdAt and updatedAt are timestamps maintained automatically by the server. createdBy and updatedBy are the ids of the users who created or last changed the element, also maintained by the server. In responses, these four properties are located together at the end of data, in the order createdAt, createdBy, updatedAt, updatedBy. hasFile is a cheap boolean mirror of whether an element currently has a file attached, kept alongside the element data itself so collection and search listings can show it without the more expensive file lookup. For the full list of properties which the API reserves from direct writes, see reserved .
Null values
Setting a property to null does not store a null value, it deletes the property. This also applies when replacing an , where any existing property not mentioned in the request body is treated as if it had been set to null. See also .
Empty objects and lists
The values of properties keep their JSON shape on every level: an empty object is returned as {} and an empty list as [], they are never converted into each other. A property written as {"a": {}, "b": [], "c": {"d": {}}} is read back exactly like that, also in collections, in search results with element hydration, in backups and in the properties of the schema of a type, which are {} if the schema defines no properties. Where an empty object is valid, e.g. for an property, [] is accepted as well and stays a list.
Geo values
Properties which the schema defines as one of the geo are returned as by default, or as WKT if the request sends Prefer: geometry=wkt, see response .