Reference Omeka Classic plugin

Snapshot Format

Every version stores one JSON snapshot of its record. The format is stable: format 1 is described here, and a later format will change the format number.

An item

{
    "format": 1,
    "record_type": "Item",
    "id": 1045,
    "public": false,
    "featured": false,
    "item_type_id": 15,
    "collection_id": 1,
    "owner_id": 4,
    "tags": ["Fish", "Honorable Mention", "Lanterns"],
    "files": [
        {"id": 212, "order": 1},
        {"id": 211, "order": 2}
    ],
    "element_texts": {
        "Dublin Core": {
            "Title": [{"text": "Paper Lantern Fish", "html": false}],
            "Subject": [
                {"text": "Fish", "html": false},
                {"text": "Lanterns", "html": false}
            ],
            "Description": [
                {"text": "<p>A fish made from tissue paper over a wire frame. When you put a flashlight inside, it glows orange, like a <em>goldfish</em>.</p>", "html": true},
                {"text": "Award: Honorable Mention, ages 8–10.", "html": false}
            ],
            "Creator": [{"text": "Mateo, age 9", "html": false}],
            "Medium": [{"text": "Tissue paper, glue and wire", "html": false}]
        },
        "Item Type Metadata": {
            "Physical Dimensions": [{"text": "14 in long", "html": false}]
        }
    },
    "element_ids": {
        "Dublin Core": {"Title": 50, "Subject": 49, "Description": 41, "Creator": 39, "Medium": 79},
        "Item Type Metadata": {"Physical Dimensions": 10}
    },
    "labels": {
        "item_type": "Physical Object",
        "collection": "Make Your Mark 2026: The Artwork",
        "owner": "Ada Collins",
        "files": {"211": "lantern-fish.jpg", "212": "lantern-fish-lit.jpg"}
    }
}

The keys

Key Records Value
format all 1
record_type all Item, Collection or File (Omeka's model names)
id all The record's number
public, featured items, collections true or false
item_type_id items The item type's id, or null
collection_id items The collection's id, or null
owner_id items, collections The owner's user id, or null
tags items Tag names, sorted
files items The item's files in their order: id, and order as stored (null when unset)
item_id files The file's item
original_filename files The name the file was uploaded or imported with
alt_text files The file's alt text, or null (Omeka 3.2 and later)
element_texts all Element set name → element name → list of texts, each {"text": …, "html": true/false}, in the order Omeka stores them. Elements are listed in their set's order. Empty: {}.
element_ids all Element set name → element name → element id, so a restore finds an element that has been renamed
labels all Names of what the snapshot refers to, as they were: item_type, collection, owner (items), owner (collections), item (a file's item title), files (file id → original filename)
members collections, deletions only The ids of the items in the collection when it was deleted

element_texts has the shape Omeka's own Item::addElementTextsByArray() and insert_item() take, so a snapshot's texts can be given back to Omeka as they are.

The hash

Two states are told apart by the SHA-256 of the snapshot without labels and members, with object keys sorted and lists kept in order (the order of an element's texts, and of an item's files, means something). A save whose hash matches the newest version's is not recorded. Renaming an item type or a collection does not change the hash of the items that refer to it.

Collections and files

A collection has public, featured, owner_id, element_texts, element_ids and labels. A file has item_id, original_filename, alt_text, element_texts, element_ids and labels. A deleted collection's last snapshot also has members.

Log in for Support