Index jsonschemaΒΆ

The JSON Schema for the index.json is listed here.

Note

The index.json file can contain fields not listed in the schema here. But the required fields (in the required arrays in the schema) and usually provided fields are listed in the schema.

Warning

This schema is work-in-progress and was only used once to manually verify some of the available index.json files. It is not yet used in any automated tests.

{
    "$comment": "This schema is work-in-progress and was only used once to manually verify some of the available index.json files. It is not yet used in any automated tests.",
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://ubuntu.com/simplestreams.index.schema.json",
    "title": "Simple Streams Index",
    "description": "The format of the Simple Streams index.json file",
    "type": "object",
    "required": ["format", "index"],
    "properties": {
        "updated": {
            "description": "a RFC 2822 timestamp indicating when the file was last updated",
            "type": "string"
        },
        "format": {
            "description": "the version of the Simple Streams index format",
            "const": "index:1.0"
        },
        "index": {
            "type": "object",
            "properties": {
                "content_id": {
                    "description": "formed similarly to an ISCSI qualified name (IQN), eg. 'com.ubuntu.cloud:released:aws'",
                    "type": "object",
                    "required": ["path"],
                    "properties": {
                        "path": {
                            "description": "the path to the product .json file. Must be relative to the top level of a mirror (eg. 'streams/v1/com.ubuntu.cloud:daily:aws.json')",
                            "type": "string"
                        },
                        "updated": {
                            "description": "a RFC 2822 timestamp indicating when the file was last updated",
                            "type": "string"
                        },
                        "datatype": {
                            "description": "the type of data in the index",
                            "$comment": "image-ids used in clouds (GCE, AWS, Azure, etc), image-downloads used for cloud-images.ubuntu.com and releases.ubuntu.com",
                            "enum": [
                                "image-ids",
                                "image-downloads"
                            ]
                        },
                        "format": {
                            "description": "the version of the Simple Streams products data format",
                            "const": "products:1.0"
                        },
                        "products": {
                            "description": "list of available products (eg. 'com.ubuntu.cloud.daily:server:22.04:amd64')",
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        }
   }
}