Network Wiz Pro
Network Wiz Pro · GPT 작업
Network Wiz Pro
This is an API for generating and returning network diagrams.
POST /generate-diagram/Generate Diagram
원본 API 스키마
{
"openapi": "3.1.0",
"info": {
"title": "Network Wiz Pro",
"description": "This is an API for generating and returning network diagrams.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://cybrix.ai/networkwiz",
"description": "Network Wiz Pro"
}
],
"paths": {
"/generate-diagram/": {
"post": {
"summary": "Generate Diagram",
"operationId": "generate_diagram_generate_diagram__post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowData"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "URL of the generated workflow diagram and any warnings",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"WorkflowConnection": {
"properties": {
"from_id": {
"type": "string",
"title": "From Id",
"description": "The ID of the starting step.",
"example": "web_server1"
},
"to_id": {
"type": "string",
"title": "To Id",
"description": "The ID of the ending step.",
"example": "app_server1"
},
"label": {
"type": "string",
"title": "Label",
"description": "Label for the connection.",
"example": "TCP 80"
},
"color": {
"type": "string",
"title": "Color",
"description": "Color of the connection.",
"default": "black",
"example": "blue"
},
"style": {
"type": "string",
"title": "Style",
"description": "Style of the connection (solid, dashed, dotted).",
"default": "solid",
"example": "solid"
},
"fontsize": {
"type": "integer",
"title": "Fontsize",
"description": "Font size of the connection label.",
"default": 10,
"example": 10
}
},
"type": "object",
"required": [
"from_id",
"to_id"
],
"title": "WorkflowConnection"
},
"WorkflowData": {
"properties": {
"steps": {
"items": {
"$ref": "#/components/schemas/WorkflowStep"
},
"type": "array",
"title": "Steps",
"description": "List of steps in the workflow.",
"example": [
{
"color": "white",
"fontcolor": "black",
"fontsize": 14,
"height": 1,
"id": "internet",
"label": "Internet\nSubnet: 0.0.0.0/0",
"shape": "cloud",
"width": 2
},
{
"color": "red",
"fontcolor": "black",
"fontsize": 14,
"height": 1,
"id": "firewall",
"label": "Firewall\nAllow: 80, 443",
"shape": "trapezium",
"width": 1.5
}
]
},
"connections": {
"items": {
"$ref": "#/components/schemas/WorkflowConnection"
},
"type": "array",
"title": "Connections",
"description": "List of connections between steps.",
"example": [
{
"color": "black",
"fontsize": 10,
"from_id": "internet",
"label": "TCP 80, 443",
"style": "solid",
"to_id": "firewall"
},
{
"color": "green",
"fontsize": 10,
"from_id": "firewall",
"label": "TCP 80, 443",
"style": "solid",
"to_id": "load_balancer"
}
]
},
"subgraphs": {
"items": {
"$ref": "#/components/schemas/WorkflowSubgraph"
},
"type": "array",
"title": "Subgraphs",
"description": "List of subgraphs in the workflow.",
"example": [
{
"color": "blue",
"fontcolor": "black",
"fontsize": 14,
"id": "Public_VPC",
"label": "Public VPC",
"nodes": [
"load_balancer",
"web_server1",
"web_server2"
],
"style": "dashed"
},
{
"color": "green",
"fontcolor": "black",
"fontsize": 14,
"id": "Private_VPC",
"label": "Private VPC",
"nodes": [
"app_server1",
"app_server2"
],
"style": "dashed"
},
{
"color": "purple",
"fontcolor": "black",
"fontsize": 14,
"id": "Database_VPC",
"label": "Database VPC",
"nodes": [
"db1",
"db2"
],
"style": "dashed"
}
]
}
},
"type": "object",
"required": [
"steps",
"connections",
"subgraphs"
],
"title": "WorkflowData"
},
"WorkflowStep": {
"properties": {
"id": {
"type": "string",
"title": "Id",
"description": "Unique identifier for the step.",
"example": "step1"
},
"label": {
"type": "string",
"title": "Label",
"description": "Label for the step.",
"example": "Web Server 1\nSubnet: 192.168.0.0/24"
},
"shape": {
"type": "string",
"title": "Shape",
"description": "Shape of the step node.",
"default": "ellipse",
"example": "box"
},
"color": {
"type": "string",
"title": "Color",
"description": "Color of the step node.",
"default": "black",
"example": "blue"
},
"fontcolor": {
"type": "string",
"title": "Fontcolor",
"description": "Font color of the step node.",
"default": "black",
"example": "white"
},
"fontsize": {
"type": "integer",
"title": "Fontsize",
"description": "Font size of the step label.",
"default": 12,
"example": 14
},
"width": {
"type": "number",
"title": "Width",
"description": "Width of the step node.",
"default": 1.5,
"example": 1.5
},
"height": {
"type": "number",
"title": "Height",
"description": "Height of the step node.",
"default": 1,
"example": 1
},
"group": {
"type": "string",
"title": "Group",
"description": "Group or cluster for the step.",
"example": "Public_VPC"
}
},
"type": "object",
"required": [
"id",
"label"
],
"title": "WorkflowStep"
},
"WorkflowSubgraph": {
"properties": {
"id": {
"type": "string",
"title": "Id",
"description": "Unique identifier for the subgraph.",
"example": "Public_VPC"
},
"label": {
"type": "string",
"title": "Label",
"description": "Label for the subgraph.",
"example": "Public VPC"
},
"color": {
"type": "string",
"title": "Color",
"description": "Color of the subgraph.",
"default": "black",
"example": "blue"
},
"style": {
"type": "string",
"title": "Style",
"description": "Style of the subgraph (dashed, dotted).",
"default": "dashed",
"example": "dashed"
},
"fontsize": {
"type": "integer",
"title": "Fontsize",
"description": "Font size of the subgraph label.",
"default": 12,
"example": 14
},
"fontcolor": {
"type": "string",
"title": "Fontcolor",
"description": "Font color of the subgraph.",
"default": "black",
"example": "black"
},
"nodes": {
"items": {
"type": "string"
},
"type": "array",
"title": "Nodes",
"description": "IDs of nodes within the subgraph.",
"example": [
"load_balancer",
"web_server1",
"web_server2"
]
}
},
"type": "object",
"required": [
"id",
"label",
"nodes"
],
"title": "WorkflowSubgraph"
}
}
}
}