Arke
ReferenceSchemas

Folder

Reference for the arke/folder@v1 profile -- hierarchical containers within collections.

Profile

arke/folder@v1

Required Properties

PropertyTypeDescription
labelstringDisplay name (non-empty)

Optional Properties

PropertyTypeDescription
descriptionstringShort description
rich_descriptionstringRich content description (markdown, Wikipedia-style)
metadataobjectFlexible metadata (author, title, date, etc.)

Relationships

Folder hierarchy uses bidirectional relationships:

PredicatePeer TypeDirectionDescription
containsfile, folderOutwardChildren this folder contains
infolder, collectionOutwardParent containers this folder is in
collectioncollectionOutwardOwning collection (for permissions)

Hierarchy Model

Folders use contains/in bidirectional pairs:

  • Parent folder stores contains pointing to child
  • Child folder stores in pointing to parent

Both relationships are created/removed atomically by folder operations.

Example

A folder organizing chapters of Moby Dick:

{
  "schema": "arke/eidos@v1",
  "id": "01JCHAPTERS...",
  "type": "folder",
  "properties": {
    "label": "Chapters",
    "description": "All 135 chapters of Moby Dick",
    "metadata": {
      "chapter_count": 135
    }
  },
  "relationships": [
    { "predicate": "in", "peer": "01KFNR0H0Q791Y1SMZWEQ09FGV", "peer_type": "collection", "peer_label": "Moby Dick" },
    { "predicate": "collection", "peer": "01KFNR0H0Q791Y1SMZWEQ09FGV", "peer_type": "collection" },
    { "predicate": "contains", "peer": "01KFNR0Z394A878Y5AQ63MQEM2", "peer_type": "file", "peer_label": "chapter-001.txt" }
  ],
  "ver": 1,
  "created_at": "2025-01-15T10:00:00Z",
  "ts": 1736935200000,
  "edited_by": { "user_id": "01JUSER...", "method": "manual" }
}

Nesting

Folders can be nested to any depth. The hierarchy is maintained through bidirectional contains/in relationship pairs.

Both folders and collections can act as containers (parents). To create a folder hierarchy:

  1. Create the folder via POST /entities with an in relationship pointing to the parent
  2. Update the parent via PUT /entities/{id} with a contains relationship pointing to the new folder

See Folders for detailed hierarchy management patterns.

Validation Rules

  • Must have a non-empty label string
  • Parent (if specified via in relationship) must be a folder or collection

On this page