Snapshot Index Format

The snapshot index, structured as a JSON document, is delivered over HTTP with the content type application/json. All linked pages within the index must contain absolute URLs.

JSON Schema

{
    "$id": "https://www.datareplication.io/spec/snapshot/index.schema.json",
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "Snapshot index",
    "description": "The index page of a snapshot with all the corresponding links to the pages of the snapshot.",
    "type": "object",
    "additionalProperties": true,
    "required": [
        "id",
        "createdAt",
        "pages"
    ],
    "properties": {        
        "id": {
            "type": "string",
            "description": "Unique identifier of the snapshot.",
            "examples": [
                "12345678",
                "1695841775",
                "341f9312-f27c-22d5-e712-223454980097"
            ]
        },
        "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time of the snapshot in ISO 8601 format.",
            "examples": [
                "2023-11-27T20:52:17.000Z"
            ]
        },
        "pages": {
            "type": "array",
            "description": "List of absolute page URLs.",
            "examples": [
                "https://example.datareplication.io/snapshot/12345678/page/0",
                "https://example.datareplication.io/snapshot/12345678/page/1",
                "https://example.datareplication.io/snapshot/12345678/page/2"
            ],
            "items": {
                "type": "string"
            }
        }
    }
}

It is allowed to include additional properties.

Example of the snapshot index format

{
    "id": "12345678",
    "createdAt": "2023-09-27T20:52:17.000Z",
    "pages": [
      "https://example.datareplication.io/12345678/page/1",
      "https://example.datareplication.io/12345678/page/2",
      "https://example.datareplication.io/12345678/page/3"
    ]
  }