{ "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "project_id": { "minLength": 36, "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}$", "maxLength": 36, "description": "Project UUID" }, "revision": { "type": "integer", "description": "Version of the .gns3 specification." }, "auto_close": { "type": "boolean", "description": "Close the topology when no client is connected" }, "version": { "type": "string", "description": "Version of the GNS3 software which have update the file for the last time" }, "scene_width": { "type": "integer", "description": "Width of the drawing area" }, "name": { "type": "string", "description": "Name of the project" }, "scene_height": { "type": "integer", "description": "Height of the drawing area" }, "auto_open": { "type": "boolean", "description": "Open the topology with GNS3" }, "type": { "enum": [ "topology" ], "description": "Type of file. It's always topology" }, "topology": { "required": [ "nodes", "links", "drawings", "computes" ], "additionalProperties": false, "type": "object", "properties": { "drawings": { "items": { "additionalProperties": false, "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "project_id": { "minLength": 36, "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}$", "maxLength": 36, "description": "Project UUID" }, "rotation": { "minimum": -359, "type": "integer", "maximum": 360, "description": "Rotation of the element" }, "svg": { "type": "string", "description": "SVG content of the drawing" }, "x": { "type": "integer", "description": "X property" }, "z": { "type": "integer", "description": "Z property" }, "y": { "type": "integer", "description": "Y property" }, "drawing_id": { "minLength": 36, "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}$", "maxLength": 36, "description": "Drawing UUID" } }, "description": "An drawing object" }, "type": "array", "description": "Drawings elements" }, "links": { "items": { "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "project_id": { "minLength": 36, "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}$", "maxLength": 36, "description": "Project UUID" }, "capture_file_name": { "type": [ "string", "null" ], "description": "Read only property. The name of the capture file if capture is running" }, "capture_file_path": { "type": [ "string", "null" ], "description": "Read only property. The full path of the capture file if capture is running" }, "nodes": { "items": { "required": [ "node_id", "adapter_number", "port_number" ], "additionalProperties": false, "type": "object", "properties": { "adapter_number": { "type": "integer", "description": "Adapter number" }, "label": { "required": [ "text", "x", "y" ], "additionalProperties": false, "type": "object", "properties": { "y": { "type": "integer", "description": "Relative Y position of the label" }, "x": { "type": [ "integer", "null" ], "description": "Relative X position of the label. If null center it" }, "text": { "type": "string" }, "rotation": { "minimum": -359, "type": "integer", "maximum": 360, "description": "Rotation of the label" }, "style": { "type": "string", "description": "SVG style attribute" } } }, "port_number": { "type": "integer", "description": "Port number" }, "node_id": { "minLength": 36, "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}$", "maxLength": 36, "description": "Node UUID" } } }, "type": "array", "description": "List of the VMS" }, "capturing": { "type": "boolean", "description": "Read only property. True if a capture running on the link" }, "link_id": { "minLength": 36, "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}$", "maxLength": 36, "description": "Link UUID" }, "link_type": { "enum": [ "ethernet", "serial" ], "description": "Type of link" } }, "required": [ "nodes" ], "additionalProperties": false, "type": "object", "description": "A link object" }, "type": "array", "description": "Link elements" }, "computes": { "items": { "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "capabilities": { "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "node_types": { "type": "array", "items": { "enum": [ "cloud", "nat", "ethernet_hub", "ethernet_switch", "frame_relay_switch", "atm_switch", "docker", "dynamips", "vpcs", "virtualbox", "vmware", "iou", "qemu" ], "description": "Type of node" } }, "version": { "type": [ "string", "null" ], "description": "Version number" } }, "required": [ "version", "node_types" ], "additionalProperties": false, "type": "object", "description": "Get what a server support" }, "cpu_usage_percent": { "maximum": 100, "type": [ "number", "null" ], "minimum": 0, "description": "CPU usage of the compute. Read only" }, "host": { "type": "string", "description": "Server host" }, "port": { "type": "integer", "description": "Server port" }, "protocol": { "enum": [ "http", "https" ], "description": "Server protocol" }, "name": { "type": "string", "description": "Server name" }, "user": { "type": [ "string", "null" ], "description": "User for authentication" }, "memory_usage_percent": { "maximum": 100, "type": [ "number", "null" ], "minimum": 0, "description": "RAM usage of the compute. Read only" }, "compute_id": { "type": "string", "description": "Server identifier" }, "connected": { "type": "boolean", "description": "Whether the controller is connected to the compute server or not" } }, "required": [ "compute_id", "protocol", "host", "port", "name" ], "additionalProperties": false, "type": "object", "description": "Request validation to a GNS3 compute object instance" }, "type": "array", "description": "Computes servers" }, "nodes": { "items": { "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "ports": { "items": { "additionalProperties": false, "type": "object", "properties": { "adapter_number": { "type": "integer", "description": "Adapter slot" }, "port_number": { "type": "integer", "description": "Port slot" }, "short_name": { "type": "string", "description": "Short version of port name" }, "data_link_types": { "type": "object", "properties": {}, "description": "Available PCAP type for capture" }, "link_type": { "enum": [ "ethernet", "serial" ], "description": "Type of link" }, "name": { "type": "string", "description": "Port name" } }, "description": "A node port" }, "type": "array", "description": "List of node ports READ only" }, "console": { "minimum": 1, "maximum": 65535, "type": [ "integer", "null" ], "description": "Console TCP port" }, "node_id": { "minLength": 36, "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}$", "maxLength": 36, "description": "Node UUID" }, "first_port_name": { "type": [ "string", "null" ], "description": "Name of the first port" }, "compute_id": { "type": "string", "description": "Compute identifier" }, "node_type": { "enum": [ "cloud", "nat", "ethernet_hub", "ethernet_switch", "frame_relay_switch", "atm_switch", "docker", "dynamips", "vpcs", "virtualbox", "vmware", "iou", "qemu" ], "description": "Type of node" }, "status": { "enum": [ "stopped", "started", "suspended" ], "description": "Status of the node" }, "port_segment_size": { "minimum": 0, "type": "integer", "description": "Size of the port segment" }, "console_type": { "enum": [ "serial", "vnc", "telnet", null ], "description": "Console type" }, "symbol": { "minLength": 1, "type": "string", "description": "Symbol of the node" }, "project_id": { "minLength": 36, "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}$", "maxLength": 36, "description": "Project UUID" }, "label": { "required": [ "text", "x", "y" ], "additionalProperties": false, "type": "object", "properties": { "y": { "type": "integer", "description": "Relative Y position of the label" }, "x": { "type": [ "integer", "null" ], "description": "Relative X position of the label. If null center it" }, "text": { "type": "string" }, "rotation": { "minimum": -359, "type": "integer", "maximum": 360, "description": "Rotation of the label" }, "style": { "type": "string", "description": "SVG style attribute" } } }, "node_directory": { "type": [ "null", "string" ], "description": "Working directory of the node. Read only" }, "x": { "type": "integer", "description": "X position of the node" }, "console_host": { "minLength": 1, "type": "string", "description": "Console host" }, "y": { "type": "integer", "description": "Y position of the node" }, "width": { "type": "integer", "description": "Width of the node (Read only)" }, "port_name_format": { "type": "string", "description": "Formating for port name {0} will be replace by port number" }, "command_line": { "type": [ "null", "string" ], "description": "Command line use to start the node" }, "properties": { "type": "object", "description": "Properties specific to an emulator" }, "z": { "type": "integer", "description": "Z position of the node" }, "name": { "minLength": 1, "type": "string", "description": "Node name" }, "height": { "type": "integer", "description": "Height of the node (Read only)" } }, "additionalProperties": false, "type": "object", "description": "A node object" }, "type": "array", "description": "Nodes elements" } }, "description": "The topology content" }, "auto_start": { "type": "boolean", "description": "Start the topology when opened" } }, "required": [ "project_id", "type", "revision", "version", "name", "topology" ], "additionalProperties": false, "type": "object", "description": "The topology" }