{ "type": "object", "additionalProperties": false, "required": [ "project_id", "type", "revision", "version", "name", "topology" ], "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "type": { "enum": [ "topology" ], "description": "Type of file. It's always topology" }, "name": { "type": "string", "description": "Name of the project" }, "revision": { "type": "integer", "description": "Version of the .gns3 specification." }, "topology": { "type": "object", "properties": { "drawings": { "type": "array", "description": "Drawings elements", "items": { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "x": { "type": "integer", "description": "X property" }, "z": { "type": "integer", "description": "Z property" }, "svg": { "type": "string", "description": "SVG content of the drawing" }, "drawing_id": { "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", "description": "Drawing UUID", "maxLength": 36, "minLength": 36 }, "project_id": { "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", "description": "Project UUID", "maxLength": 36, "minLength": 36 }, "y": { "type": "integer", "description": "Y property" }, "rotation": { "type": "integer", "maximum": 360, "description": "Rotation of the element", "minimum": 0 } }, "description": "An drawing object", "additionalProperties": false } }, "nodes": { "type": "array", "description": "Nodes elements", "items": { "type": "object", "additionalProperties": false, "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "name": { "type": "string", "description": "Node name", "minLength": 1 }, "console_type": { "enum": [ "serial", "vnc", "telnet", null ], "description": "Console type" }, "node_type": { "enum": [ "cloud", "ethernet_hub", "ethernet_switch", "frame_relay_switch", "atm_switch", "docker", "dynamips", "vpcs", "virtualbox", "vmware", "iou", "qemu" ], "description": "Type of node" }, "x": { "type": "integer", "description": "X position of the node" }, "z": { "type": "integer", "description": "Z position of the node" }, "node_id": { "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", "description": "Node UUID", "maxLength": 36, "minLength": 36 }, "width": { "type": "integer", "description": "Width of the node" }, "y": { "type": "integer", "description": "Y position of the node" }, "command_line": { "type": [ "null", "string" ], "description": "Command line use to start the node" }, "symbol": { "type": "string", "description": "Symbol of the node", "minLength": 1 }, "console": { "type": [ "integer", "null" ], "maximum": 65535, "description": "Console TCP port", "minimum": 1 }, "console_host": { "type": "string", "description": "Console host", "minLength": 1 }, "project_id": { "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", "description": "Project UUID", "maxLength": 36, "minLength": 36 }, "label": { "type": "object", "properties": { "y": { "type": "integer", "description": "Relative Y position of the label" }, "text": { "type": "string" }, "x": { "type": "integer", "description": "Relative X position of the label" }, "style": { "type": "string", "description": "SVG style attribute" }, "rotation": { "type": "integer", "description": "Rotation of the label" } }, "additionalProperties": false, "required": [ "text", "x", "y" ] }, "height": { "type": "integer", "description": "Height of the node" }, "properties": { "type": "object", "description": "Properties specific to an emulator" }, "status": { "enum": [ "stopped", "started", "suspended" ], "description": "Status of the node" }, "node_directory": { "type": [ "null", "string" ], "description": "Working directory of the node. Read only" }, "compute_id": { "type": "string", "description": "Compute identifier" } }, "description": "A node object" } }, "links": { "type": "array", "description": "Link elements", "items": { "type": "object", "additionalProperties": false, "required": [ "nodes" ], "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "capture_file_path": { "type": [ "string", "null" ], "description": "Read only property. The full path of the capture file if capture is running" }, "capturing": { "type": "boolean", "description": "Read only property. True if a capture running on the link" }, "nodes": { "type": "array", "description": "List of the VMS", "items": { "type": "object", "properties": { "label": { "type": "object", "properties": { "y": { "type": "integer", "description": "Relative Y position of the label" }, "text": { "type": "string" }, "x": { "type": "integer", "description": "Relative X position of the label" }, "style": { "type": "string", "description": "SVG style attribute" }, "rotation": { "type": "integer", "description": "Rotation of the label" } }, "additionalProperties": false, "required": [ "text", "x", "y" ] }, "node_id": { "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", "description": "Node UUID", "maxLength": 36, "minLength": 36 }, "port_number": { "type": "integer", "description": "Port number" }, "adapter_number": { "type": "integer", "description": "Adapter number" } }, "additionalProperties": false, "required": [ "node_id", "adapter_number", "port_number" ] } }, "project_id": { "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", "description": "Project UUID", "maxLength": 36, "minLength": 36 }, "capture_file_name": { "type": [ "string", "null" ], "description": "Read only property. The name of the capture file if capture is running" }, "link_id": { "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", "description": "Link UUID", "maxLength": 36, "minLength": 36 } }, "description": "A link object" } }, "computes": { "type": "array", "description": "Computes servers", "items": { "type": "object", "additionalProperties": false, "required": [ "compute_id", "protocol", "host", "port", "name" ], "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "name": { "type": "string", "description": "Server name" }, "cpu_usage_percent": { "type": [ "number", "null" ], "maximum": 100, "description": "CPU usage of the compute. Read only", "minimum": 0 }, "port": { "type": "integer", "description": "Server port" }, "protocol": { "enum": [ "http", "https" ], "description": "Server protocol" }, "memory_usage_percent": { "type": [ "number", "null" ], "maximum": 100, "description": "RAM usage of the compute. Read only", "minimum": 0 }, "connected": { "type": "boolean", "description": "Whether the controller is connected to the compute server or not" }, "host": { "type": "string", "description": "Server host" }, "user": { "type": [ "string", "null" ], "description": "User for authentication" }, "version": { "type": [ "string", "null" ], "description": "Version of the GNS3 remote compute server" }, "compute_id": { "type": "string", "description": "Server identifier" } }, "description": "Request validation to a GNS3 compute object instance" } } }, "description": "The topology content", "required": [ "nodes", "links", "drawings", "computes" ], "additionalProperties": false }, "project_id": { "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", "description": "Project UUID", "maxLength": 36, "minLength": 36 }, "auto_start": { "type": "boolean", "description": "Start the topology when opened" }, "version": { "type": "string", "description": "Version of the GNS3 software which have update the file for the last time" } }, "description": "The topology" }