---
title: Nodes, versions and the tree
summary: Why models live in a tree of nodes, what a version is, and what an upload actually creates.
order: 20
see-also: [explanation/identifiers, explanation/accounts-and-organisations, how-to/models, how-to/models/list-the-tree, how-to/models/upload-a-model]
terms: [node, folder, model, version, vid, transaction, derivative, api-token, organisation, workspace]
---

# Nodes, versions and the tree

Everything in BIM.works hangs off one tree per instance. This page explains what its entries are, why "a model" is a node but "the model you query" is a version, and what happens under the surface when a file is uploaded. It is background for the tree and upload how-tos; the identifiers themselves are explained in [[page:explanation/identifiers]].

## The tree

A [[term:node]] is an entry in the tree: a name, a parent, a UUID. Nodes exist so that models can be organised, shared and secured the way files are — by putting them in folders and giving someone access to a folder. Every [[term:account]] has a root node named after its username, every [[term:organisation]] has a node at the top of the tree that all its members share, and every [[term:workspace]] has a root of its own. Access is granted by subtree: an [[term:api-token]] is bound to one node and sees only what is below it, and the issued tokens a backend hands to a browser name nodes or versions explicitly.

Nodes carry a type as well as a name, and the type is what the UI reacts to: an organisation node is drawn differently from a folder, a Demo folder is not something you can rename, a workspace root is not listed under the account. The API does not care; it lists, creates, moves and deletes nodes by UUID and checks rights per node. Children are sorted folders first, then by name.

## Folders and models

A node is either a [[term:folder]] or a [[term:model]], decided when it is created. Folders hold nodes and nothing else. Models hold [[term:version|versions]] and no children. The distinction is deliberate: a model is one logical thing — this building, this discipline, this drawing — and its revisions belong together, ordered, under one name. Uploading a newer file of the same model should add a version, not a sibling node, and the UI's upload dialog and the SDKs' upload calls do exactly that when you upload onto an existing model node.

An upload of a `.zip` is the exception that follows from the rule: the archive's folders become folders, every recognised file in it becomes a model, and the whole structure lands in one go, when the instance allows zip uploads. An `.ifczip` is not an archive of models but one compressed model, so it becomes one model node.

## Versions

A [[term:version]] is one revision of a model: numbered 1, 2, 3 … within its node, with its own UUID, the [[term:vid]]. The newest version is the node's head. Versions are what the rest of the system works on. A query runs on versions, the viewers load versions, checks are cached per set of versions, a geo reference and an alignment are stored per version. This is why the SDKs' methods say `versionUuid` where you might expect "model": a model node is a container, and only a version has content.

A version knows how it came into existence. An *upload* version is backed by the file that was uploaded; a *transaction* version is backed by a [[term:transaction]] — a set of BUL statements and recorded edits — applied to a source version. Both are read through the same derivative set and both are ordinary versions to every consumer; the difference matters only for what is stored (the bytes, or the payload that replays onto the source) and for what is rebuilt when the instance is updated. Deleting a version marks it deleted rather than removing it, so a node's history stays intact. Only the newest version can be deleted, because an older one may be the source of a transaction version, and unlike a deleted node ([[page:how-to/models/delete-and-restore-a-node]]) a deleted version cannot be restored through the API.

## What an upload creates

An upload is more than storing a file. The client first hashes the file and asks the server whether a file with that hash already exists; if it does, nothing is transferred and the new version points at the existing content. Otherwise the bytes stream to the server, which for IFC starts parsing while they arrive, and the processing pipeline runs: parse, build the feature index that [[term:bql]] queries, generate 3D geometry and per-storey 2D geometry, compute footprints, exterior detection and bounding volumes, extract a geo reference according to the token's BIM context, and render preview images. The output is the version's [[term:derivative|derivative set]], stored under an identifier of its own (the Mid), and its summary (bounds, units, quantisation, geo data) is attached to the version as `im_metadata`.

The original bytes are the only durable input. Everything derived is a cache that the instance regenerates whenever the software that produced it is out of date — the version and its UUID stay, the derivative set is replaced. This is also why two versions uploaded with identical content, even under different nodes, share one derivative set: content is deduplicated by hash below the version level.

Progress is visible on the node while processing runs, and a version is not complete until its `im_metadata` exists; the viewers refuse a version without it. The SDKs' upload calls return when processing has finished; see [[page:how-to/models/upload-a-model]] and the file-type specifics on [[page:reference/file-types]].

## Where the tree ends

The tree is the unit of access, not the unit of collaboration. An organisation's node is shared with every member, a workspace bundles a subtree with actions and features for a group of people, and a share link publishes one version to anyone with the URL. Actions — stored queries, visualisations, checks and reports — live in a tree of their own, the [[term:actions-tree]], because an action is written once and run against whatever models are loaded, not stored next to a particular model. [[page:explanation/accounts-and-organisations]] takes it from here.
