DCImanager 6 API
{ "openapi": "3.0.0", "info": { "title": "DCImanager 6 API", "description": "DCImanager 6 API", "version": "3.0.0" }, "servers": [ { "url": "https://127.0.0.1/api/dci/v3" } ], "tags": [ { "name": "common", "description": "General" }, { "name": "ip", "description": "IP addresses" }, { "name": "ipmgr", "description": "IPmgr6" }, { "name": "ipmi", "description": "IPMI" }, { "name": "iso", "description": "ISO image" }, { "name": "license", "description": "Licensing" }, { "name": "location", "description": "Locations" }, { "name": "operation", "description": "Operations" }, { "name": "repository", "description": "Repository of OS templates" }, { "name": "os_template", "description": "OS templates" }, { "name": "pdu", "description": "PDU" }, { "name": "pdu_connection", "description": "PDU connections" }, { "name": "rack", "description": "Racks" }, { "name": "server", "description": "Servers" }, { "name": "switch", "description": "Switches" }, { "name": "power", "description": "Server power management" }, { "name": "switch_connection", "description": "Switch connections" }, { "name": "user", "description": "Users" }, { "name": "ups", "description": "UPS" }, { "name": "platform", "description": "Platforms" }, { "name": "cpu_socket", "description": "CPU socket" }, { "name": "update", "description": "Panel updates" }, { "name": "chassis", "description": "Blade Server Chassis" }, { "name": "vlan", "description": "VLAN" }, { "name": "recipe", "description": "Recipe" }, { "name": "journal", "description": "Journal" }, { "name": "user_vlans_module", "description": "User VLANs module" }, { "name": "warehouse", "description": "Warehouse module" }, { "name": "cpu_type", "description": "CPU types" }, { "name": "storage_type", "description": "Storage types" }, { "name": "ram_type", "description": "RAM types" }, { "name": "pci_type", "description": "PCI types" }, { "name": "other_spare_type", "description": "Other spare part types" }, { "name": "cpu", "description": "CPU" }, { "name": "storage", "description": "Storage" }, { "name": "ram", "description": "RAM" }, { "name": "pci", "description": "PCI devices" }, { "name": "server_component", "description": "Server components" }, { "name": "server_profile", "description": "Server profile params" }, { "name": "server_profile_operation", "description": "Server profile operation params" }, { "name": "server_error", "description": "Server error operations" }, { "name": "spare_part", "description": "All spare parts" }, { "name": "other_spare_part", "description": "Other spare parts" }, { "name": "vpu_module", "description": "VPU module" }, { "name": "custom_field", "description": "Module for custom field" }, { "name": "internal", "description": "Internal auth only" } ], "components": { "securitySchemes": { "cookieAuth": { "type": "apiKey", "in": "cookie", "name": "ses6" }, "headerHost": { "type": "apiKey", "in": "header", "name": "host" } } }, "security": [ { "cookieAuth": [], "headerHost": [] } ], "paths": { "/rack/{rack_id}/chassis": { "post": { "operationId": "rack_id_chassis_post", "parameters": [ { "description": "Rack unique identifier", "in": "path", "name": "rack_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "required": [ "name", "size", "server_slot_count", "unit" ], "type": "object", "properties": { "name": { "description": "Chassis name", "type": "string", "minLength": 1, "maxLength": 255, "example": "Multix4DE5" }, "size": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "server_slot_count": { "description": "Number of slots in chassis for blade servers", "type": "integer", "minimum": 1, "maximum": 1000, "example": 16 }, "note": { "description": "Comment", "type": "string", "example": "Cisco chassis" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "responses": { "200": { "description": "Chassis has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error creating chassis", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create chassis", "tags": [ "chassis" ] } }, "/rack/{rack_id}/chassis/{chassis_id}": { "delete": { "operationId": "rack_id_chassis_id_delete", "parameters": [ { "description": "Rack unique identifier", "in": "path", "name": "rack_id", "required": true, "schema": { "type": "integer" } }, { "description": "Chassis unique identifier", "in": "path", "name": "chassis_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Chassis has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting chassis", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete chassis", "tags": [ "chassis" ] } }, "/chassis": { "get": { "operationId": "chassis_get", "responses": { "200": { "description": "Chassis list has been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "id": { "type": "integer", "description": "Chassis identifier" }, "name": { "description": "Chassis name", "type": "string" }, "rack": { "description": "Rack", "type": "integer" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "server_slot_count": { "description": "Number of slots in chassis for blade servers", "type": "integer" }, "note": { "description": "Comment", "type": "string" }, "unit": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "used": { "description": "Number of slots in use", "type": "integer" }, "free": { "description": "Number of free slots", "type": "integer" }, "rack_info": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "device_server": { "description": "Servers installed into the chassis", "items": { "properties": { "id": { "description": "Server identifier", "type": "integer" }, "name": { "description": "Server name", "type": "string" }, "slot": { "description": "Slot number", "type": "integer" }, "size": { "description": "Server size", "type": "number" } }, "type": "object" }, "type": "array" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving list of chassis", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive chassis list", "tags": [ "chassis" ] } }, "/chassis/{chassis_id}": { "get": { "operationId": "chassis_id_get", "parameters": [ { "description": "Chassis unique identifier", "in": "path", "name": "chassis_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Chassis has received", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "description": "Chassis identifier" }, "name": { "description": "Chassis name", "type": "string" }, "rack": { "description": "Rack", "type": "integer" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "server_slot_count": { "description": "Number of slots in chassis for blade servers", "type": "integer" }, "note": { "description": "Comment", "type": "string" }, "unit": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "used": { "description": "Number of slots in use", "type": "integer" }, "free": { "description": "Number of free slots", "type": "integer" }, "rack_info": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "device_server": { "description": "Servers installed into the chassis", "items": { "properties": { "id": { "description": "Server identifier", "type": "integer" }, "name": { "description": "Server name", "type": "string" }, "slot": { "description": "Slot number", "type": "integer" }, "size": { "description": "Server size", "type": "number" } }, "type": "object" }, "type": "array" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" } } } }, "default": { "description": "Chassis not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive chassis", "tags": [ "chassis" ] }, "post": { "operationId": "chassis_id_post", "parameters": [ { "description": "Chassis unique identifier", "in": "path", "name": "chassis_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "name": { "description": "Chassis name", "type": "string", "minLength": 1, "maxLength": 255, "example": "Multix4DE5" }, "rack": { "description": "Rack unique identifier", "example": 1, "type": "integer" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "server_slot_count": { "description": "Number of slots for servers in chassis for blade servers", "type": "integer" }, "note": { "description": "Comment", "type": "string" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "responses": { "200": { "description": "Chassis has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving chassis", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit chassis", "tags": [ "chassis" ] }, "delete": { "operationId": "chassis_id_delete", "parameters": [ { "description": "Chassis unique identifier", "in": "path", "name": "chassis_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Chassis has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting chassis", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete chassis", "tags": [ "chassis" ] } }, "/chassis/{chassis_id}/slot": { "get": { "operationId": "chassis_id_get_slots", "parameters": [ { "description": "Chassis unique identifier", "in": "path", "name": "chassis_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of chassis slots has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "list": { "type": "array", "description": "List of chassis slots with devices and sizes", "items": { "type": "object", "properties": { "slot": { "type": "integer", "description": "Slot number" }, "devices": { "type": "array", "nullable": true, "items": { "type": "object", "description": "Device that occupies the slot", "properties": { "id": { "type": "integer", "description": "Server id that occupies the slot" }, "name": { "type": "string", "description": "Server name", "example": "Server 2568" }, "size": { "type": "integer", "description": "Server size", "example": 1 }, "slot": { "type": "integer", "description": "Slot where Server is located" } } } } } } } } } } } }, "default": { "description": "Error receiving a list of chassis slots", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive a list of chassis slots", "tags": [ "chassis" ] } }, "/location/{location_id}/firmware": { "post": { "operationId": "location_location_id_firmware_post", "summary": "Create firmware file record", "parameters": [ { "description": "Location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "description": "Firmware file name", "type": "string" }, "type": { "description": "Firmware file type", "type": "string", "enum": [ "bios", "bmc" ] } }, "required": [ "type" ] } } } }, "responses": { "200": { "description": "Firmware file record has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error creating firmware file record", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "tags": [ "firmware" ] } }, "/location/{location_id}/firmware/{firmware_id}": { "post": { "operationId": "location_location_id_firmware_firmare_id_post", "summary": "Edit firmware file record", "parameters": [ { "description": "Location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } }, { "description": "Firmware unique identifier", "in": "path", "name": "firmware_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "description": "Firmware file name", "type": "string" }, "path": { "description": "Firmware file path", "type": "string" }, "status": { "description": "Firmware file status", "type": "string" }, "status_info": { "description": "Firmware file status", "oneOf": [ { "type": "object" }, { "type": "string" } ] } } } } } }, "responses": { "200": { "description": "Firmware file entry edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error editing firmware file record", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "tags": [ "firmware" ] } }, "/location/{location_id}/firmware/{firmware_id}/cancel": { "post": { "operationId": "location_location_id_firmware_firmare_id_cancel_post", "summary": "\u0421anceling the firmware update", "parameters": [ { "description": "Location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } }, { "description": "Firmware unique identifier", "in": "path", "name": "firmware_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "200": { "description": "Successfully cancellation of firmware update", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error when canceling the firmware update", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "tags": [ "firmware" ] } }, "/server/{server_id}/firmware/{firmware_id}/update": { "post": { "operationId": "server_server_id_firmware_firmware_id_update_post", "summary": "Create record to update firmware of server", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } }, { "description": "Firmware unique identifier", "in": "path", "name": "firmware_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "bmc_id": { "description": "Bmc unique identifier", "type": "integer" }, "type": { "description": "Firmware file type", "type": "string", "enum": [ "bios", "bmc" ] } } } } } }, "responses": { "200": { "description": "Update firmware entry created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error creating of update firmware entry", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "tags": [ "firmware" ] } }, "/firmware": { "get": { "operationId": "firmware_get", "summary": "Receive information about firmware files", "responses": { "200": { "description": "Firmware files records have been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "list": { "items": { "type": "object", "properties": { "created_at": { "description": "Firmware file create datatime", "type": "string" }, "id": { "description": "Firmware file ID", "type": "integer" }, "location_id": { "description": "Firmware file location ID", "type": "integer" }, "name": { "description": "Firmware file name", "type": "string" }, "path": { "description": "Firmware file path", "type": "string" }, "status": { "description": "Firmware file current status", "type": "string" }, "status_info": { "description": "Firmware file current status", "oneOf": [ { "type": "object" }, { "type": "string" } ] }, "type": { "description": "Firmware file type", "type": "string", "enum": [ "bios", "bmc" ] } } }, "type": "array" }, "size": { "description": "Element count", "type": "integer" } } } } } }, "default": { "description": "Error receiving firmware files list", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "tags": [ "firmware" ] } }, "/intel_amt": { "get": { "operationId": "intel_amt_get", "responses": { "200": { "description": "List of IntelAMT connections has been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "hostname": { "type": "string" }, "port": { "type": "integer" }, "id": { "type": "integer" }, "password": { "type": "string" }, "server": { "type": "string" }, "server_id": { "type": "integer" }, "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" }, "last_update": { "description": "Date of the last device poll", "type": "string" }, "last_success_update": { "description": "Date of the last successful device poll", "type": "string" }, "status_info": { "type": "object" }, "protocol": { "enum": [ "http", "https" ], "type": "string" }, "username": { "type": "string" }, "location_info": { "description": "Location info(Internal only)", "properties": { "id": { "type": "integer", "description": "The location unique identifier" }, "ssh_address": { "description": "SSH access IP address", "type": "string" }, "ssh_port": { "description": "SSH access port", "type": "integer" }, "ssh_user": { "description": "SSH access username", "type": "string" } }, "type": "object" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of IntelAMT connections", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receiving list of IntelAMT connections", "tags": [ "intel_amt" ] } }, "/intel_amt/{intel_amt_id}": { "delete": { "operationId": "intel_amt_id_delete", "parameters": [ { "description": "IntelAMT connection unique identifier", "in": "path", "name": "intel_amt_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "IntelAMT connection has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting IntelAMT connections", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Deleting IntelAMT connections", "tags": [ "intel_amt" ] }, "get": { "operationId": "intel_amt_id_get", "parameters": [ { "description": "IntelAMT unique identifier", "in": "path", "name": "intel_amt_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Information about IntelAMT connection has been received", "content": { "application/json": { "schema": { "properties": { "hostname": { "type": "string" }, "port": { "type": "integer" }, "id": { "type": "integer" }, "password": { "type": "string" }, "server": { "type": "string" }, "server_id": { "type": "integer" }, "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" }, "last_update": { "description": "Date of the last device poll", "type": "string" }, "last_success_update": { "description": "Date of the last successful device poll", "type": "string" }, "status_info": { "type": "object" }, "protocol": { "enum": [ "http", "https" ], "type": "string" }, "username": { "type": "string" }, "location_info": { "description": "Location info(Internal only)", "properties": { "id": { "type": "integer", "description": "The location unique identifier" }, "ssh_address": { "description": "SSH access IP address", "type": "string" }, "ssh_port": { "description": "SSH access port", "type": "integer" }, "ssh_user": { "description": "SSH access username", "type": "string" } }, "type": "object" } }, "type": "object" } } } }, "default": { "description": "IntelAMT connection not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Getting information about IntelAMT connection", "tags": [ "intel_amt" ] }, "post": { "operationId": "intel_amt_id_post", "parameters": [ { "description": "IntelAMT connection unique identifier", "in": "path", "name": "intel_amt_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "hostname": { "description": "IntelAMT IPv4 address", "type": "string" }, "password": { "description": "Password", "type": "string" }, "protocol": { "description": "IntelAMT connection protocol", "enum": [ "http", "https" ], "type": "string" }, "username": { "description": "Username", "maxLength": 15, "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "IntelAMT connection has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving IntelAMT connection", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Editing IntelAMT connection", "tags": [ "intel_amt" ] } }, "/server/{server_id}/intel_amt": { "post": { "operationId": "server_id_intel_amt_post", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "hostname": { "description": "IntelAMT IPv4 address", "type": "string", "format": "ipv4" }, "password": { "description": "Password", "type": "string" }, "protocol": { "description": "IntelAMT connection protocol", "enum": [ "http", "https" ], "type": "string" }, "username": { "description": "Username", "maxLength": 15, "type": "string" } }, "required": [ "hostname", "username", "password", "protocol" ], "type": "object" } } } }, "responses": { "200": { "description": "IntelAMT has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving IntelAMT", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Creating IntelAMT", "tags": [ "intel_amt" ] } }, "/intel_amt/{intel_amt_id}/status": { "post": { "operationId": "intel_amt_id_status_post", "parameters": [ { "description": "IntelAMT connection unique identifier", "in": "path", "name": "intel_amt_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "IntelAMT status has been received successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error receiving IntelAMT status", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receiving IntelAMT status", "tags": [ "intel_amt" ] } }, "/intel_amt/{intel_amt_id}/power_on": { "post": { "operationId": "intel_amt_id_power_on", "summary": "Turn IntelAMT on", "tags": [ "intel_amt" ], "parameters": [ { "description": "The IntelAMT unique identifier", "in": "path", "name": "intel_amt_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "IntelAMT power has been successfully turned on", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error turning IntelAMT on", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/intel_amt/{intel_amt_id}/power_off": { "post": { "operationId": "intel_amt_id_power_off", "summary": "Turn IntelAMT off", "tags": [ "intel_amt" ], "parameters": [ { "description": "The IntelAMT unique identifier", "in": "path", "name": "intel_amt_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "IntelAMT power has been successfully turned off", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error turning IntelAMT off", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/intel_amt/{intel_amt_id}/power_reset": { "post": { "operationId": "intel_amt_id_power_reset", "summary": "Reset IntelAMT power", "tags": [ "intel_amt" ], "parameters": [ { "description": "The IntelAMT unique identifier", "in": "path", "name": "intel_amt_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "IntelAMT power has been successfully reseted", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error resetting IntelAMT power", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/intel_amt/{intel_amt_id}/pxe_boot": { "post": { "operationId": "intel_amt_id_pxe_boot", "summary": "Change IntelAMT boot order", "tags": [ "intel_amt" ], "parameters": [ { "description": "The IntelAMT unique identifier", "in": "path", "name": "intel_amt_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "IntelAMT boot order has been successfully changed", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error changing IntelAMT boot order", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/intel_amt/{intel_amt_id}/info": { "post": { "operationId": "intel_amt_id_info_post", "parameters": [ { "description": "The Intel AMT unique identifier", "in": "path", "name": "intel_amt_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "intel_amt_info": { "type": "object", "description": "New Intel AMT data", "properties": { "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" } } }, "intel_amt_error": { "type": "object", "description": "The Intel AMT error description", "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } } } }, "type": "object" } } } }, "responses": { "200": { "description": "Intel AMT data have been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving Intel AMT data", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit Intel AMT information (internal only)", "tags": [ "intel_amt" ] } }, "/cpu_socket": { "post": { "operationId": "cpu_socket_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "description": "CPU socket name", "example": "Socket SP3", "minLength": 1, "maxLength": 255, "type": "string" }, "note": { "description": "Comment", "type": "string" } }, "required": [ "name" ], "type": "object" } } } }, "responses": { "200": { "description": "CPU socket has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error creating CPU socket", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Creating CPU socket", "tags": [ "cpu_socket", "warehouse" ] }, "get": { "operationId": "cpu_socket_get", "responses": { "200": { "description": "CPU sockets have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "note": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving CPU sockets", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receiving all CPU sockets", "tags": [ "cpu_socket", "warehouse" ] } }, "/location": { "get": { "operationId": "location_get", "responses": { "200": { "description": "Locations have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "params_dhcp": { "description": "dhcp parameters", "properties": { "interfaces_4": { "description": "dhcp v4 interfaces", "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "params_nginx": { "description": "Nginx parameters", "properties": { "addresses": { "description": "List of nginx addresses", "items": { "type": "string" }, "type": "array" }, "port": { "description": "Port", "type": "integer" } }, "type": "object" }, "params_redis": { "description": "Redis parameters", "properties": { "password": { "description": "Password", "type": "string" }, "port": { "description": "Port", "type": "integer" } }, "type": "object" }, "params_netflow": { "description": "Netflow parameters", "properties": { "collect_netflow": { "description": "Flag that allows collect NetFlow data on the location", "type": "boolean", "default": false, "example": false }, "addresses": { "description": "IP addresses on which NetFlow Colloctor will listen", "items": { "example": "127.0.0.1", "format": "ipv4", "type": "string" }, "type": "array" }, "port": { "description": "Port on which NetFlow Collector will listen", "type": "integer", "maximum": 65535, "minimum": 1, "example": 2055 } }, "type": "object" }, "patches": { "description": "Array of the patches for location.yaml file of the location services", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the patch" }, "patch": { "type": "string", "description": "The patch in base64 encryption" } } } }, "setup_info": { "description": "Parameters for location configuration", "properties": { "addresses": { "description": "Addresses list", "items": { "type": "string" }, "type": "array" }, "interfaces": { "description": "Interfaces for dhcp configuration", "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "ssh_address": { "description": "SSH access IP address", "type": "string" }, "ssh_port": { "description": "SSH access port", "type": "integer" }, "ssh_user": { "description": "SSH access username", "type": "string" }, "status": { "description": "Status", "enum": [ "created", "check_failed", "need_setup", "setup", "ok", "setup_failed" ], "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" }, "docker_compose": { "description": "Compose file that was used for location configuration (internal only)", "type": "string" }, "settings": { "description": "Location settings", "properties": { "public_pool": { "description": "IP pool for server dedicating", "type": "integer" }, "free_pool": { "description": "IP Pool for server free", "type": "integer" }, "allowed_vlans_range": { "description": "Allowed VLANs range for user VLANs module", "example": "1-15, 29, 50, 333-400", "type": "string" }, "global_allowed_vlans_range": { "description": "Allowed VLANs range for the location", "example": "1-15, 29, 50, 333-400", "type": "string" }, "free_vlan": { "description": "VLAN in which the server ports will be placed when server free", "example": 1, "type": "integer" }, "statistic_type": { "description": "Statistics that are preferred to use when using external integrations", "enum": [ "switch", "netflow" ], "type": "string", "default": "switch" }, "gather_bmc_log": { "description": "Flag that enables bmc log gathering on this location", "type": "boolean", "example": true } }, "type": "object" }, "proxy_params": { "description": "Proxy connection info", "nullable": true, "type": "object", "properties": { "http": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "https": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "ftp": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "noproxy": { "description": "List of addresses for which proxying is not required", "type": "array", "items": { "type": "string" } }, "enabled": { "description": "Proxy state (enabled/disabled)", "type": "boolean" } } }, "warehouses": { "description": "Warehouses the location is related to", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The warehouse unique identifier", "example": 10 }, "name": { "type": "string", "description": "The warehouse name", "example": "Warehouse London" } } } } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving list of locations", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receiving all locations", "tags": [ "location" ] }, "post": { "operationId": "location_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "name": { "description": "Location name", "example": "DataCenter2", "pattern": "^[^ ]", "type": "string" }, "password": { "description": "Password", "type": "string" }, "ssh_address": { "description": "SSH access IP address", "example": "127.0.0.1", "format": "ipv4", "type": "string" }, "ssh_port": { "description": "SSH access port", "example": 22, "maximum": 65535, "minimum": 1, "type": "integer" }, "ssh_user": { "description": "Username for SSH access", "example": "root", "minLength": 1, "pattern": "^[^ ]", "type": "string" }, "proxy_params": { "description": "Proxy connection info", "nullable": true, "type": "object", "properties": { "http": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "https": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "ftp": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "noproxy": { "description": "List of addresses for which proxying is not required", "type": "array", "items": { "type": "string" } }, "enabled": { "description": "Proxy state (enabled/disabled)", "type": "boolean" } } }, "warehouses": { "description": "Warehouses the location is related to", "type": "array", "items": { "type": "integer", "description": "The warehouse unique identifier", "example": 10 } } }, "required": [ "name", "ssh_address", "ssh_port", "ssh_user" ], "type": "object" } } } }, "responses": { "200": { "description": "Location has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "default": { "description": "Error creating location", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Creating location", "tags": [ "location" ] } }, "/location/{location_id}": { "delete": { "operationId": "location_id_delete", "parameters": [ { "description": "Location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Location has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting location", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Deleting location", "tags": [ "location" ] }, "get": { "operationId": "location_id_get", "parameters": [ { "description": "Location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Location has been received", "content": { "application/json": { "schema": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "params_dhcp": { "description": "dhcp parameters", "properties": { "interfaces_4": { "description": "dhcp v4 interfaces", "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "params_nginx": { "description": "Nginx parameters", "properties": { "addresses": { "description": "List of nginx addresses", "items": { "type": "string" }, "type": "array" }, "port": { "description": "Port", "type": "integer" } }, "type": "object" }, "params_redis": { "description": "Redis parameters", "properties": { "password": { "description": "Password", "type": "string" }, "port": { "description": "Port", "type": "integer" } }, "type": "object" }, "params_netflow": { "description": "Netflow parameters", "properties": { "collect_netflow": { "description": "Flag that allows collect NetFlow data on the location", "type": "boolean", "default": false, "example": false }, "addresses": { "description": "IP addresses on which NetFlow Colloctor will listen", "items": { "example": "127.0.0.1", "format": "ipv4", "type": "string" }, "type": "array" }, "port": { "description": "Port on which NetFlow Collector will listen", "type": "integer", "maximum": 65535, "minimum": 1, "example": 2055 } }, "type": "object" }, "patches": { "description": "Array of the patches for location.yaml file of the location services", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the patch" }, "patch": { "type": "string", "description": "The patch in base64 encryption" } } } }, "setup_info": { "description": "Parameters for location configuration", "properties": { "addresses": { "description": "Addresses list", "items": { "type": "string" }, "type": "array" }, "interfaces": { "description": "Interfaces for dhcp configuration", "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "ssh_address": { "description": "SSH access IP address", "type": "string" }, "ssh_port": { "description": "SSH access port", "type": "integer" }, "ssh_user": { "description": "SSH access username", "type": "string" }, "status": { "description": "Status", "enum": [ "created", "check_failed", "need_setup", "setup", "ok", "setup_failed" ], "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" }, "docker_compose": { "description": "Compose file that was used for location configuration (internal only)", "type": "string" }, "settings": { "description": "Location settings", "properties": { "public_pool": { "description": "IP pool for server dedicating", "type": "integer" }, "free_pool": { "description": "IP Pool for server free", "type": "integer" }, "allowed_vlans_range": { "description": "Allowed VLANs range for user VLANs module", "example": "1-15, 29, 50, 333-400", "type": "string" }, "global_allowed_vlans_range": { "description": "Allowed VLANs range for the location", "example": "1-15, 29, 50, 333-400", "type": "string" }, "free_vlan": { "description": "VLAN in which the server ports will be placed when server free", "example": 1, "type": "integer" }, "statistic_type": { "description": "Statistics that are preferred to use when using external integrations", "enum": [ "switch", "netflow" ], "type": "string", "default": "switch" }, "gather_bmc_log": { "description": "Flag that enables bmc log gathering on this location", "type": "boolean", "example": true } }, "type": "object" }, "proxy_params": { "description": "Proxy connection info", "nullable": true, "type": "object", "properties": { "http": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "https": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "ftp": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "noproxy": { "description": "List of addresses for which proxying is not required", "type": "array", "items": { "type": "string" } }, "enabled": { "description": "Proxy state (enabled/disabled)", "type": "boolean" } } }, "warehouses": { "description": "Warehouses the location is related to", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The warehouse unique identifier", "example": 10 }, "name": { "type": "string", "description": "The warehouse name", "example": "Warehouse London" } } } } }, "type": "object" } } } }, "default": { "description": "Location not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive location information", "tags": [ "location" ] }, "post": { "operationId": "location_id_post", "parameters": [ { "description": "Location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "name": { "description": "Location name", "example": "my key name", "pattern": "^[^ ]", "type": "string" }, "password": { "description": "SSH access password", "type": "string" }, "ssh_address": { "description": "SSH access IP address", "example": "127.0.0.1", "format": "ipv4", "type": "string" }, "ssh_port": { "description": "SSH access port", "example": 22, "maximum": 65535, "minimum": 1, "type": "integer" }, "ssh_user": { "description": "SSH access username", "example": "root", "minLength": 1, "pattern": "^[^ ]", "type": "string" }, "settings": { "description": "Location settings", "additionalProperties": false, "properties": { "public_pool": { "description": "IP pool for server dedicating", "example": 13, "minimum": 1, "type": "integer" }, "free_pool": { "description": "IP Pool for server free", "example": 69, "minimum": 1, "type": "integer" }, "allowed_vlans_range": { "description": "Allowed VLANs range for user VLANs module", "example": "1-15, 29, 50, 333-400", "type": "string" }, "global_allowed_vlans_range": { "description": "Allowed VLANs range for the location", "example": "1-15, 29, 50, 333-400", "type": "string" }, "free_vlan": { "description": "VLAN in which the server ports will be placed when server free", "example": 1, "type": "integer", "nullable": true }, "gather_bmc_log": { "description": "Flag that enables bmc log gathering on this location", "type": "boolean", "example": true } }, "type": "object" }, "proxy_params": { "description": "Proxy connection info", "nullable": true, "type": "object", "properties": { "http": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "https": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "ftp": { "description": "Proxy parameters", "type": "object", "properties": { "user": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "addr": { "description": "Proxy server address", "type": "string" }, "port": { "description": "Proxy server port", "type": "integer", "example": 8080 } } }, "noproxy": { "description": "List of addresses for which proxying is not required", "type": "array", "items": { "type": "string" } }, "enabled": { "description": "Proxy state (enabled/disabled)", "type": "boolean" } } }, "warehouses": { "description": "Warehouses the location is related to", "type": "array", "items": { "type": "integer", "description": "The warehouse unique identifier", "example": 10 } } }, "type": "object" } } } }, "responses": { "200": { "description": "Location has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "default": { "description": "Error saving location", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit location", "tags": [ "location" ] } }, "/location/{location_id}/setup": { "post": { "operationId": "location_id_setup_post", "parameters": [ { "description": "Location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "patches": { "description": "Array of the patches for location.yaml file of the location services", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the patch" }, "patch": { "type": "string", "description": "The patch in base64 encryption" } } } }, "dhcp": { "type": "object", "description": "Dhcp configuration parameters", "properties": { "interfaces_4": { "description": "Dhcp v4 configuration interfaces", "items": { "type": "string" }, "type": "array" } } }, "nginx": { "description": "Nginx configuration parameters", "properties": { "addresses": { "description": "IP addresses on which nginx will listen", "items": { "example": "127.0.0.1", "oneOf": [ { "type": "string", "format": "ipv4" }, { "type": "string", "pattern": "^\\*$" } ] }, "type": "array", "minItems": 1 } }, "type": "object" }, "netflow": { "description": "NetFlow configuration parameters", "properties": { "collect_netflow": { "description": "Flag that allows collect NetFlow data on the location", "type": "boolean", "default": false, "example": false }, "addresses": { "description": "IP addresses on which NetFlow Colloctor will listen", "items": { "example": "127.0.0.1", "format": "ipv4", "type": "string" }, "type": "array" }, "port": { "description": "NetFlow v9/v10(IPFIX) collector port", "type": "integer", "maximum": 65535, "minimum": 1, "default": 2055 }, "port_v5": { "description": "NetFlow v5 collector port", "type": "integer", "maximum": 65535, "minimum": 1, "default": 2056 }, "port_sflow": { "description": "sFlow collector port", "type": "integer", "maximum": 65535, "minimum": 1, "default": 6343 } }, "type": "object", "additionalProperties": false, "required": [ "collect_netflow", "addresses", "port" ] }, "settings": { "description": "Location additional settings", "properties": { "allow_operation": { "description": "Flag that allows PXE operation on location", "type": "boolean", "example": true }, "statistic_type": { "description": "Statistics that are preferred to use when using external integrations", "enum": [ "switch", "netflow" ], "type": "string", "default": "switch" }, "gather_bmc_log": { "description": "Flag that enables bmc log gathering on this location", "type": "boolean", "example": true } }, "type": "object", "additionalProperties": false } }, "type": "object" } } } }, "responses": { "200": { "description": "Location has been configured successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error configuring location", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Configure location", "tags": [ "location" ] } }, "/location/{location_id}/update_info": { "post": { "operationId": "location_id_update_info_post", "parameters": [ { "description": "Location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Location info has been updated successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error updating location info", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Update location info", "tags": [ "location" ] } }, "/location/{location_id}/message": { "post": { "operationId": "location_id_message_post", "parameters": [ { "description": "Location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": true, "properties": { "stream": { "type": "string", "description": "Thread where the message was published" }, "message": { "description": "Message", "type": "object" } }, "required": [ "stream", "message" ], "type": "object" } } } }, "responses": { "200": { "description": "Message has been received successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error receiving message", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive messages about operation status", "tags": [ "location" ] } }, "/location/{location_id}/iso": { "post": { "operationId": "location_id_iso_post", "parameters": [ { "description": "The unique identifier of a location", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "required": [ "name", "access", "type", "tags" ], "type": "object", "properties": { "name": { "description": "Name of ISO image", "type": "string", "minLength": 1 }, "access": { "description": "Access to ISO image", "enum": [ "owner", "admin", "all" ], "type": "string" }, "type": { "description": "Type of ISO image", "enum": [ "os", "diag", "rescue" ], "type": "string" }, "note": { "description": "Note for ISO image", "type": "string" }, "tags": { "description": "Tags for ISO image", "items": { "type": "string" }, "type": "array" }, "url": { "description": "Download url for ISO image", "type": "string" } } } } } }, "responses": { "200": { "description": "The ISO image has been downloaded to location", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "The error of downloading ISO image to location", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Downloading ISO image to location", "tags": [ "iso" ] } }, "/iso/{iso_id}/status": { "post": { "parameters": [ { "description": "The unique identifier of an ISO", "in": "path", "name": "iso_id", "required": true, "schema": { "type": "integer" } } ], "operationId": "iso_id_status_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "required": [ "status" ], "type": "object", "properties": { "status": { "description": "New status for ISO image", "type": "string", "enum": [ "ok", "fail", "uploaded", "uploading" ] }, "status_info": { "description": "Detailed description for status", "type": "object" } } } } } }, "responses": { "200": { "description": "The ISO image status has been edited", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "The error of editing ISO image status", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Editing ISO image status", "tags": [ "iso" ] } }, "/iso/{iso_id}": { "get": { "operationId": "iso_id_get", "parameters": [ { "description": "The ISO image unique identifier", "in": "path", "name": "iso_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The ISO image information has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "size": { "type": "integer" }, "type": { "type": "string", "enum": [ "os", "diag", "rescue" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "datetime": { "type": "string" }, "access": { "type": "string", "enum": [ "admin", "owner", "all" ] }, "owner": { "type": "integer" }, "location": { "type": "integer" }, "note": { "type": "string" }, "status": { "enum": [ "ok", "fail", "deleting", "downloading" ], "type": "string" }, "status_info": { "type": "object" } } } } } }, "default": { "description": "Error receiving ISO image information", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive ISO image information", "tags": [ "iso" ] }, "post": { "parameters": [ { "description": "The unique identifier of an ISO", "in": "path", "name": "iso_id", "required": true, "schema": { "type": "integer" } } ], "operationId": "iso_id_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "name": { "description": "Name of ISO image", "type": "string", "minLength": 1 }, "access": { "description": "Access to ISO image", "enum": [ "owner", "admin", "all" ], "type": "string" }, "type": { "description": "Type of ISO image", "enum": [ "os", "diag", "rescue" ], "type": "string" }, "note": { "description": "Note for ISO image", "type": "string" }, "tags": { "description": "Tags for ISO image", "items": { "type": "string" }, "type": "array" }, "url": { "description": "Download url for ISO image", "type": "string" } } } } } }, "responses": { "200": { "description": "The ISO image has been edited", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "The error of editing ISO image", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Editing ISO image", "tags": [ "iso" ] }, "delete": { "operationId": "iso_id_delete", "parameters": [ { "description": "The unique identifier of an ISO", "in": "path", "name": "iso_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "ISO image has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "The error of deleting ISO image", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete ISO image", "tags": [ "iso" ] } }, "/iso": { "get": { "operationId": "iso", "responses": { "200": { "description": "List of ISO images has been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "size": { "type": "integer" }, "type": { "type": "string", "enum": [ "os", "diag", "rescue" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "datetime": { "type": "string" }, "access": { "type": "string", "enum": [ "admin", "owner", "all" ] }, "owner": { "type": "integer" }, "location": { "type": "integer" }, "note": { "type": "string" }, "status": { "enum": [ "ok", "fail", "deleting", "downloading" ], "type": "string" }, "status_info": { "type": "object" } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of ISO images", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive list of ISO images", "tags": [ "iso" ] } }, "/location/{location_id}/vlan/{vlan_id}": { "delete": { "operationId": "location_id_vlan_id_delete", "parameters": [ { "description": "The location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } }, { "description": "The VLAN unique identifier", "in": "path", "name": "vlan_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The VLAN has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting the VLAN", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The VLAN deletion", "tags": [ "vlan" ] }, "post": { "operationId": "location_id_vlan_id_post", "parameters": [ { "description": "The location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } }, { "description": "The VLAN unique identifier", "in": "path", "name": "vlan_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "description": "The VLAN name", "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[\\w\\-]+$", "example": "vlan 1" }, "note": { "description": "The VLAN comment", "maxLength": 1500, "type": "string" }, "owner": { "description": "The VLAN owner identifier", "nullable": true, "type": "integer" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "The VLAN has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving the VLAN", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The VLAN edit", "tags": [ "vlan" ] }, "get": { "operationId": "location_id_vlan_id_get", "parameters": [ { "description": "The location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } }, { "description": "The VLAN unique identifier", "in": "path", "name": "vlan_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The VLAN has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "description": "The VLAN unique identifier", "type": "integer" }, "location_id": { "description": "The VLAN unique identifier", "type": "integer" }, "name": { "description": "The VLAN name", "type": "string" }, "note": { "description": "The VLAN comment", "type": "string" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "members_count": { "description": "The VLAN members count", "type": "integer" }, "owner": { "description": "The VLAN owner identifier", "type": "integer" }, "vpu_net_count": { "description": "The total count of VPU networks that belongs to VLAN", "type": "integer" } } } } } }, "default": { "description": "The VLAN not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about VLAN", "tags": [ "vlan" ] } }, "/location/{location_id}/vlan": { "post": { "operationId": "vlan_post", "parameters": [ { "description": "The location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "id": { "description": "The VLAN unique identifier", "type": "integer", "minimum": 1 }, "name": { "description": "The VLAN name", "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[\\w\\-]+$", "example": "vlan-1" }, "note": { "description": "The VLAN comment", "maxLength": 1500, "type": "string" }, "owner": { "description": "The VLAN owner identifier", "type": "integer" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "required": [ "id", "name" ], "type": "object" } } } }, "responses": { "200": { "description": "The VLAN has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving vlan", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create vlan", "tags": [ "vlan" ] }, "get": { "operationId": "location_vlan_get", "parameters": [ { "description": "The location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The location vlans have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "type": "object", "properties": { "id": { "description": "The VLAN unique identifier", "type": "integer" }, "location_id": { "description": "The VLAN unique identifier", "type": "integer" }, "name": { "description": "The VLAN name", "type": "string" }, "note": { "description": "The VLAN comment", "type": "string" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "members_count": { "description": "The VLAN members count", "type": "integer" }, "owner": { "description": "The VLAN owner identifier", "type": "integer" }, "vpu_net_count": { "description": "The total count of VPU networks that belongs to VLAN", "type": "integer" } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of location vlans", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive location vlans information", "tags": [ "vlan" ] } }, "/location/{location_id}/vlan/{vlan_id}/members": { "get": { "operationId": "location_id_vlan_id_members_get", "parameters": [ { "description": "The location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } }, { "description": "The VLAN unique identifier", "in": "path", "name": "vlan_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The VLAN members has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "description": "The VLAN member port id", "type": "integer" }, "connection_type": { "enum": [ "free", "connected", "other" ], "type": "string", "description": "The connection type" }, "connection_type_info": { "type": "string", "description": "The connection type information" }, "connection_id": { "type": "string", "description": "The connection identifier" }, "admin_status": { "enum": [ "up", "down", "testing", "unknown" ], "type": "string", "description": "The port administrative status" }, "oper_status": { "enum": [ "up", "down", "testing", "unknown", "dormant", "notpresent", "lowerlayerdown" ], "type": "string", "description": "The port operation status" }, "speed": { "enum": [ "unknown", "auto", "auto_10_100M", "10M", "100M", "1G", "10G", "16G", "40G" ], "type": "string", "description": "The port speed" }, "duplex": { "enum": [ "unknown", "half", "full", "disagree", "auto" ], "type": "string", "description": "The port duplex" }, "note": { "type": "string", "description": "The port notes with additional information" }, "description": { "type": "string", "description": "The port description on switch" }, "is_trunk": { "type": "boolean", "description": "Is port work in trunk mode" }, "trunk_members": { "description": "The VLAN identifiers and names", "type": "array", "items": { "type": "integer" } }, "is_uplink": { "type": "boolean", "description": "Does port work in uplink mode. If the port is in uplink mode, it cannot be edited and connected to other devices." }, "is_service": { "type": "boolean", "description": "Does port work in service mode. If the port is service, it cannot be connected to other devices" }, "do_not_collect_traffic": { "description": "Do not collect traffic passing through the switch port", "type": "boolean" }, "vlan": { "type": "object", "properties": { "vlan_id": { "type": "integer", "description": "The VLAN unique identifier" }, "vlan_name": { "type": "string", "description": "The unique name of a VLAN" } }, "description": "The port VLAN information (If the port is trunk - it is native VLAN)" }, "server": { "type": "object", "properties": { "id": { "type": "integer", "description": "The server unique identifier" }, "name": { "type": "string", "description": "The server name" } }, "description": "The server information" }, "switch": { "type": "object", "properties": { "id": { "type": "integer", "description": "The switch unique identifier" }, "name": { "type": "string", "description": "The switch name" } }, "description": "The switch information" } } } } } }, "default": { "description": "The VLAN not found" } }, "summary": "The VLAN members list", "tags": [ "vlan" ] } }, "/repository": { "get": { "operationId": "repository_get", "summary": "List of OS templates repositories", "tags": [ "repository" ], "responses": { "200": { "description": "List of OS templates repositories has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "list": { "type": "array", "items": { "type": "object", "properties": { "id": { "description": "Repository identifier", "type": "integer" }, "name": { "description": "Repository name", "type": "string" }, "url": { "description": "Repository URL", "type": "string" } } } } } } } } }, "default": { "description": "Error receiving list of OS templates repositories", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "post": { "operationId": "repository_post", "summary": "Create repository of OS templates", "tags": [ "repository" ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "required": [ "name", "url" ], "type": "object", "properties": { "name": { "description": "Name of OS templates repository", "type": "string", "minLength": 1, "maxLength": 255 }, "url": { "description": "URL of OS templates repository", "format": "uri", "type": "string" } } } } } }, "responses": { "200": { "description": "Repository of OS templates has been created", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error creating repository of OS templates", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/repository/{repository_id}": { "get": { "operationId": "repository_id_get", "summary": "Receive repository of OS templates", "parameters": [ { "description": "Repository of OS templates unique identifier", "in": "path", "name": "repository_id", "required": true, "schema": { "type": "integer" } } ], "tags": [ "repository" ], "responses": { "200": { "description": "Repository of OS templates has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "description": "Repository identifier", "type": "integer" }, "name": { "description": "Repository name", "type": "string" }, "url": { "description": "Repository URL", "type": "string" } } } } } }, "default": { "description": "Error receiving repository of OS templates", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "post": { "operationId": "repository_id_post", "summary": "Edit Repository of OS templates", "tags": [ "repository" ], "parameters": [ { "description": "Repository of OS templates unique identifier", "in": "path", "name": "repository_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "name": { "description": "Name of OS templates repository", "type": "string", "minLength": 1, "maxLength": 255 }, "url": { "description": "URL of OS templates repository", "format": "uri", "type": "string" } } } } } }, "responses": { "200": { "description": "Repository of OS templates has been edited", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error editing repository of OS templates", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "delete": { "operationId": "repository_id_delete", "summary": "Delete repository of OS templates", "tags": [ "repository" ], "parameters": [ { "description": "Repository unique identifier", "in": "path", "name": "repository_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Repository of OS templates has been deleted", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting repository of OS templates", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/recipe": { "post": { "operationId": "recipe_post", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "name", "access", "content", "tags" ], "properties": { "name": { "type": "string", "description": "The recipe unique name" }, "access": { "type": "string", "enum": [ "owner", "all" ], "description": "The access rights to recipe" }, "content": { "type": "string", "description": "The recipe script" }, "description": { "type": "string", "description": "The recipe description" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Tags determine that recipe will be available on the OS" } } } } } }, "responses": { "200": { "description": "The recipe has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving the recipe", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create recipe", "tags": [ "recipe" ] }, "get": { "operationId": "recipe_get", "responses": { "200": { "description": "The recipes have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The recipe unique identifier" }, "name": { "type": "string", "description": "The recipe unique name" }, "owner": { "type": "object", "description": "The recipe owner", "properties": { "id": { "type": "integer", "description": "The user unique identifier" }, "emain": { "type": "string", "description": "The user unique email" } } }, "last_update": { "type": "string", "description": "When the recipe was updated" }, "access": { "type": "string", "enum": [ "owner", "all" ], "description": "The access rights to recipe" }, "content": { "type": "string", "description": "The recipe script" }, "description": { "type": "string", "description": "The recipe description" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Tags determine that recipe will be available on the OS" } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of recipes", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive recipes information", "tags": [ "recipe" ] } }, "/recipe/check": { "post": { "operationId": "recipe_check_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Recipes have been updated successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error while updating list of recipes", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Check recipes", "tags": [ "recipe" ] } }, "/recipe/{recipe_id}": { "get": { "operationId": "recipe_id_get", "parameters": [ { "description": "The recipe unique identifier", "in": "path", "name": "recipe_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The recipe has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer", "description": "The recipe unique identifier" }, "name": { "type": "string", "description": "The recipe unique name" }, "owner": { "type": "object", "description": "The recipe owner", "properties": { "id": { "type": "integer", "description": "The user unique identifier" }, "emain": { "type": "string", "description": "The user unique email" } } }, "last_update": { "type": "string", "description": "When the recipe was updated" }, "access": { "type": "string", "enum": [ "owner", "all" ], "description": "The access rights to recipe" }, "content": { "type": "string", "description": "The recipe script" }, "description": { "type": "string", "description": "The recipe description" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Tags determine that recipe will be available on the OS" } } } } } }, "default": { "description": "The recipe not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about recipe", "tags": [ "recipe" ] }, "post": { "operationId": "recipe_id_post", "parameters": [ { "description": "The recipe unique identifier", "in": "path", "name": "recipe_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "name": { "type": "string", "description": "The recipe unique name" }, "access": { "type": "string", "enum": [ "owner", "all" ], "description": "The access rights to recipe" }, "content": { "type": "string", "description": "The recipe script" }, "description": { "type": "string", "description": "The recipe description" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Tags determine that recipe will be available on the OS" } } } } } }, "responses": { "200": { "description": "The recipe has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving the recipe information", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The recipe edit", "tags": [ "recipe" ] }, "delete": { "operationId": "recipe_id_delete", "parameters": [ { "description": "The recipe unique identifier", "in": "path", "name": "recipe_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The recipe has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting the recipe", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The recipe deletion", "tags": [ "recipe" ] } }, "/server/{server_id}/switch_connection": { "get": { "operationId": "server_id_switch_connection_get", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of server connections to switches has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "list": { "type": "array", "items": { "type": "object", "properties": { "server": { "type": "integer", "description": "Server ID", "example": 25 }, "id": { "type": "integer", "description": "Connection ID", "example": 42 }, "switch": { "type": "integer", "description": "Switch ID", "example": 33 }, "switch_port": { "type": "integer", "description": "Switch port ID", "example": 15 }, "if_index": { "type": "string", "description": "Interface index", "example": 10105 }, "speed": { "type": "string", "description": "Port speed", "enum": [ "unknown", "auto", "auto_10_100M", "10M", "100M", "1G", "10G", "16G", "40G" ] }, "duplex": { "type": "string", "description": "Duplex", "enum": [ "unknown", "half", "full", "disagree", "auto" ] }, "admin_status": { "type": "string", "description": "Admin status", "enum": [ "up", "down", "testing", "unknown" ] }, "oper_status": { "type": "string", "description": "Operating status", "enum": [ "up", "down", "testing", "unknown", "dormant", "notpresent", "lowerlayerdown" ] }, "description": { "type": "string", "description": "Port description", "example": "GigabitEthernet1/0/5" }, "do_not_collect_traffic": { "description": "Do not collect traffic passing through the switch port", "type": "boolean" }, "is_ipmi_connection": { "type": "boolean", "description": "Mark as an IPMI connection" } } } } } } } } }, "default": { "description": "Error receiving a list of server connections to switches", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive a list of server connections to switches", "tags": [ "server", "switch_connection" ] } }, "/switch_connection": { "post": { "deprecated": true, "operationId": "switch_connection_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "server_id": { "description": "Server ID", "example": 13, "type": "integer" }, "switch_port_id": { "description": "Switch port ID", "example": 2, "type": "integer" }, "do_not_collect_traffic": { "description": "Do not collect traffic passing through the switch port", "type": "boolean" } }, "required": [ "server_id", "switch_port_id" ], "type": "object" } } } }, "responses": { "200": { "description": "Server has been connected to switch successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error connecting server to switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Method is deprecated. Use \"/switch/{switch_id}/port/{port_id}/connect\"", "tags": [ "switch_connection" ] } }, "/switch_connection/{switch_connection_id}": { "get": { "deprecated": true, "tags": [ "switch_connection" ], "summary": "Method is deprecated. Use \"/switch/{switch_id}/port/{port_id}/connect\"", "operationId": "switch_connection_id_get", "parameters": [ { "name": "switch_connection_id", "in": "path", "required": true, "description": "Unique identifier of server connection to switch", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Information about server connection to switch has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "server": { "type": "integer", "description": "Server ID", "example": 25 }, "id": { "type": "integer", "description": "Connection ID", "example": 42 }, "switch": { "type": "integer", "description": "Switch ID", "example": 33 }, "switch_port": { "type": "integer", "description": "Switch port ID", "example": 15 }, "if_index": { "type": "string", "description": "Interface index", "example": 10105 }, "speed": { "type": "string", "description": "Port speed", "enum": [ "unknown", "auto", "auto_10_100M", "10M", "100M", "1G", "10G", "16G", "40G" ] }, "duplex": { "type": "string", "description": "Duplex", "enum": [ "unknown", "half", "full", "disagree", "auto" ] }, "admin_status": { "type": "string", "description": "Admin status", "enum": [ "up", "down", "testing", "unknown" ] }, "oper_status": { "type": "string", "description": "Operating status", "enum": [ "up", "down", "testing", "unknown", "dormant", "notpresent", "lowerlayerdown" ] }, "description": { "type": "string", "description": "Port description", "example": "GigabitEthernet1/0/5" }, "do_not_collect_traffic": { "description": "Do not collect traffic passing through the switch port", "type": "boolean" }, "is_ipmi_connection": { "type": "boolean", "description": "Mark as an IPMI connection" } } } } } }, "default": { "description": "Error receiving information about server connection to switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "delete": { "deprecated": true, "operationId": "switch_connection_id_delete", "parameters": [ { "name": "switch_connection_id", "description": "Unique identifier of server connection to switch", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Server connection to switch has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting server connection", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Method is deprecated. Use \"/switch/{switch_id}/port/{port_id}/connect\"", "tags": [ "switch_connection" ] }, "post": { "deprecated": true, "operationId": "switch_connection_id_post", "parameters": [ { "name": "switch_connection_id", "description": "Unique identifier of server connection to switch", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Server connection to switch has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error editing server connection to switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Method is deprecated. Use \"/switch/{switch_id}/port/{port_id}/connect\"", "tags": [ "switch_connection" ] } }, "/setup": { "post": { "operationId": "setup_post", "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "properties": { "ip": { "description": "SSH IP address", "example": "127.0.0.1", "format": "ipv4", "type": "string" }, "ssh_port": { "description": "SSH access port", "example": 22, "maximum": 65535, "minimum": 1, "type": "integer" }, "user_email": { "description": "User email", "example": "admin@example.com", "format": "email", "type": "string" }, "user_id": { "description": "User identifier", "example": 2, "type": "integer" }, "username": { "description": "SSH access username", "example": "root", "minLength": 1, "type": "string" } }, "required": [ "ip", "ssh_port", "username", "user_id", "user_email" ], "type": "object" }, { "properties": { "is_box": { "description": "Checkbox that indicates setting up of the box-instance", "example": true, "type": "boolean" }, "user_id": { "description": "User identifier", "example": 2, "type": "integer" }, "user_email": { "description": "User email", "example": "admin@example.com", "format": "email", "type": "string" } }, "required": [ "is_box", "user_id", "user_email" ], "type": "object" } ] } } } }, "responses": { "200": { "description": "Location has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "default": { "description": "Error creating location", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create first location", "tags": [ "location", "common" ] } }, "/info": { "get": { "operationId": "info_get", "responses": { "200": { "description": "DCI6 information and status have been received", "content": { "application/json": { "schema": { "properties": { "location": { "description": "Information about the main location", "properties": { "id": { "description": " Location ID (admin only)", "type": "integer" }, "ssh_address": { "description": "Location SSH-address (admin only)", "type": "string" }, "ssh_port": { "description": "Location SSH-port (admin only)", "type": "integer" }, "ssh_user": { "description": "Location SSH-user (admin only)", "type": "string" }, "status": { "description": "Location status", "enum": [ "created", "check_failed", "need_setup", "setup", "ok", "setup_failed" ], "type": "string" } }, "type": "object" } }, "type": "object" } } } }, "default": { "description": "Error receiving information", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive the panel status information with user permissions", "tags": [ "location", "common" ] } }, "/current_user/auth_setting/{name}": { "post": { "operationId": "user_auth_setting_post", "summary": "Edit description of the configuration by its name for the current user", "tags": [ "common" ], "parameters": [ { "description": "Parameter name", "in": "path", "name": "name", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "properties": {} } } } }, "responses": { "200": { "description": "Configuration description has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error editing configuration description", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "get": { "operationId": "user_auth_setting_get", "summary": "Receive configuration description by its name for the current user", "tags": [ "common" ], "parameters": [ { "description": "Parameter name", "in": "path", "name": "name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Configuration description has been received successfully", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "properties": {} } } } }, "default": { "description": "Error receiving configuration description", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/ipmi": { "get": { "operationId": "ipmi_get", "responses": { "200": { "description": "List of IPMI connections has been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "name": { "description": "Name of the connection", "type": "string" }, "address": { "type": "string" }, "id": { "type": "integer" }, "password": { "type": "string" }, "server": { "type": "string" }, "server_id": { "type": "integer" }, "location": { "type": "integer" }, "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" }, "last_update": { "description": "Date of the last device poll", "type": "string" }, "last_success_update": { "description": "Date of the last successful device poll", "type": "string" }, "last_user_update": { "description": "Date of the last successful user pool", "type": "string" }, "status_info": { "type": "object" }, "type": { "enum": [ "IPMI v1.5/v2", "IPMI v2(lanplus)", "lan", "lanplus", "redfish_v1" ], "type": "string" }, "user": { "type": "string" }, "web_url": { "description": "IPMI web-interface URL", "type": "string" }, "mc_info": { "description": "The IPMI manufacture information", "type": "string" }, "ip_id": { "description": "Identifier of IP address from IPmanager", "type": "integer" }, "gateway": { "description": "Gateway of IP address (from IPmanager)", "type": "string" }, "network": { "description": "Network of IP address (from IPmanager)", "type": "string" }, "ipmi_user": { "type": "integer", "description": "The count of IPMI users" }, "vpu_net": { "type": "integer", "description": "The unique VPU network identifier to which the IP-address belongs" }, "manufacturer_name": { "description": "Manufacturer name of the IPMI", "type": "string" }, "bmc_firmware": { "type": "object", "properties": { "name": { "description": "Firmware file name", "type": "string" }, "status": { "description": "Firmware status", "type": "string" }, "status_info": { "description": "Additional info about status", "oneOf": [ { "type": "object" }, { "type": "string" } ] }, "type": { "description": "Firmware type", "type": "string", "enum": [ "bios", "bmc" ] } } }, "features": { "description": "Ipmi supported features", "type": "array", "items": { "type": "string" } } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of IPMI connections", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receiving list of IPMI connections", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}": { "delete": { "operationId": "ipmi_id_delete", "parameters": [ { "description": "IPMI connection unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "IPMI connection has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting IPMI connections", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Deleting IPMI connections", "tags": [ "ipmi" ] }, "get": { "operationId": "ipmi_id_get", "parameters": [ { "description": "IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Information about IPMI connection has been received", "content": { "application/json": { "schema": { "properties": { "name": { "description": "Name of the connection", "type": "string" }, "address": { "type": "string" }, "id": { "type": "integer" }, "password": { "type": "string" }, "server": { "type": "string" }, "server_id": { "type": "integer" }, "location": { "type": "integer" }, "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" }, "last_update": { "description": "Date of the last device poll", "type": "string" }, "last_success_update": { "description": "Date of the last successful device poll", "type": "string" }, "last_user_update": { "description": "Date of the last successful user pool", "type": "string" }, "status_info": { "type": "object" }, "type": { "enum": [ "IPMI v1.5/v2", "IPMI v2(lanplus)", "lan", "lanplus", "redfish_v1" ], "type": "string" }, "user": { "type": "string" }, "web_url": { "description": "IPMI web-interface URL", "type": "string" }, "mc_info": { "description": "The IPMI manufacture information", "type": "string" }, "ip_id": { "description": "Identifier of IP address from IPmanager", "type": "integer" }, "gateway": { "description": "Gateway of IP address (from IPmanager)", "type": "string" }, "network": { "description": "Network of IP address (from IPmanager)", "type": "string" }, "ipmi_user": { "type": "integer", "description": "The count of IPMI users" }, "vpu_net": { "type": "integer", "description": "The unique VPU network identifier to which the IP-address belongs" }, "manufacturer_name": { "description": "Manufacturer name of the IPMI", "type": "string" }, "bmc_firmware": { "type": "object", "properties": { "name": { "description": "Firmware file name", "type": "string" }, "status": { "description": "Firmware status", "type": "string" }, "status_info": { "description": "Additional info about status", "oneOf": [ { "type": "object" }, { "type": "string" } ] }, "type": { "description": "Firmware type", "type": "string", "enum": [ "bios", "bmc" ] } } }, "features": { "description": "Ipmi supported features", "type": "array", "items": { "type": "string" } } }, "type": "object" } } } }, "default": { "description": "IPMI connection not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Getting information about IPMI connection", "tags": [ "ipmi" ] }, "post": { "operationId": "ipmi_id_post", "parameters": [ { "description": "IPMI connection unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "description": "Name of the connection", "type": "string" }, "address": { "description": "IPMI address", "type": "string" }, "password": { "description": "Password", "type": "string" }, "type": { "description": "IPMI type", "enum": [ "IPMI v1.5/v2", "IPMI v2(lanplus)", "lan", "lanplus", "redfish_v1" ], "type": "string" }, "user": { "description": "Username", "maxLength": 15, "type": "string" }, "web_url": { "description": "IPMI web-interface URL", "format": "uri", "type": "string" }, "pool": { "type": "integer", "description": "IP pool for IP allocation (from IPmgr)" }, "vpu_net": { "type": "integer", "description": "VPU network unique identifier for IP allocation" }, "domain": { "type": "string", "description": "Domain name for IP address" }, "need_configure": { "type": "boolean", "description": "Configure IPMI for VPU" } }, "type": "object" } } } }, "responses": { "200": { "description": "IPMI connection has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving IPMI connection", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Editing IPMI connection", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}/status": { "post": { "operationId": "ipmi_id_status_post", "parameters": [ { "description": "IPMI connection unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "IPMI status has been received successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error receiving IPMI status", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receiving IPMI status", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}/user": { "get": { "operationId": "ipmi_id_user_get", "parameters": [ { "description": "The IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of IPMI users", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "id": { "type": "integer", "description": "The IPMI user identifier in DCImanager" }, "name": { "type": "string", "description": "The IPMI user name" }, "password": { "type": "string", "description": "The IPMI user password" }, "level": { "type": "string", "enum": [ "user", "operator", "administrator" ], "description": "The IPMI user level" }, "note": { "type": "string", "description": "The IPMI user note" }, "is_main_admin": { "type": "boolean", "description": "Is the IPMI user main administrator" }, "login_user": { "type": "boolean", "description": "Use credentials of this uset to log in to IPMI" }, "ipmi": { "type": "integer", "description": "The unique IPMI identifier" }, "ipmi_user_id": { "type": "string", "description": "User indetifier from IPMI device" }, "status": { "enum": [ "created", "creating", "editing", "error" ], "type": "string", "description": "Status of the IPMI user" }, "status_info": { "type": "object", "description": "Status description of the IPMI user" } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of IPMI users", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receiving list of IPMI users", "tags": [ "ipmi" ] }, "post": { "operationId": "ipmi_id_user_post", "parameters": [ { "description": "The IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "name": { "type": "string", "description": "The IPMI user name" }, "password": { "type": "string", "minLength": 1, "maxLength": 15, "description": "The IPMI user password" }, "level": { "type": "string", "enum": [ "user", "operator", "administrator" ], "description": "The IPMI user level" }, "note": { "type": "string", "maxLength": 1500, "description": "The IMPI user note" }, "login_user": { "type": "boolean", "default": false, "description": "Use credentials of this user to log in to IPMI" } }, "type": "object", "required": [ "name", "password", "level" ] } } } }, "responses": { "200": { "description": "IPMI user has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error creating IPMI user", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create IPMI user", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}/user/{user_id}": { "get": { "operationId": "ipmi_id_user_id_get", "parameters": [ { "description": "The IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } }, { "description": "The IPMI user unique identifier", "in": "path", "name": "user_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Information about IPMI user has been received", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "description": "The IPMI user identifier in DCImanager" }, "name": { "type": "string", "description": "The IPMI user name" }, "password": { "type": "string", "description": "The IPMI user password" }, "level": { "type": "string", "enum": [ "user", "operator", "administrator" ], "description": "The IPMI user level" }, "note": { "type": "string", "description": "The IPMI user note" }, "is_main_admin": { "type": "boolean", "description": "Is the IPMI user main administrator" }, "login_user": { "type": "boolean", "description": "Use credentials of this uset to log in to IPMI" }, "ipmi": { "type": "integer", "description": "The unique IPMI identifier" }, "ipmi_user_id": { "type": "string", "description": "User indetifier from IPMI device" }, "status": { "enum": [ "created", "creating", "editing", "error" ], "type": "string", "description": "Status of the IPMI user" }, "status_info": { "type": "object", "description": "Status description of the IPMI user" } } } } } }, "default": { "description": "Error receiving information about IPMI user", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receiving information about IPMI user", "tags": [ "ipmi" ] }, "post": { "operationId": "ipmi_id_user_id_post", "parameters": [ { "description": "The IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } }, { "description": "The IPMI user unique identifier", "in": "path", "name": "user_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "name": { "type": "string", "description": "The IPMI user name" }, "password": { "type": "string", "minLength": 1, "maxLength": 15, "description": "The IPMI user password" }, "level": { "type": "string", "enum": [ "user", "operator", "administrator" ], "description": "The IPMI user level" }, "note": { "type": "string", "maxLength": 1500, "description": "The IPMI user note" }, "login_user": { "type": "boolean", "description": "Use credentials of this user to log in to IPMI" } }, "type": "object" } } } }, "responses": { "200": { "description": "IPMI user has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error editing IPMI user", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit IPMI user", "tags": [ "ipmi" ] }, "delete": { "operationId": "ipmi_id_user_id_delete", "parameters": [ { "description": "The IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } }, { "description": "The IPMI user unique identifier", "in": "path", "name": "user_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "IPMI user has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting IPMI user", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Deleting IPMI user", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}/user/status": { "post": { "operationId": "ipmi_id_user_status_post", "parameters": [ { "description": "IPMI connection unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "IPMI users status has been received successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error receiving IPMI users status", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Checking IPMI users status", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}/power_on": { "post": { "operationId": "ipmi_id_power_on", "summary": "Turn IPMI on", "tags": [ "ipmi" ], "parameters": [ { "description": "The IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "IPMI power has been successfully turned on", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error turning IPMI on", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/ipmi/{ipmi_id}/power_off": { "post": { "operationId": "ipmi_id_power_off", "summary": "Turn IPMI off", "tags": [ "ipmi" ], "parameters": [ { "description": "The IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "IPMI power has been successfully turned off", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error turning IPMI off", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/ipmi/{ipmi_id}/power_reset": { "post": { "operationId": "ipmi_id_power_reset", "summary": "Reset IPMI power", "tags": [ "ipmi" ], "parameters": [ { "description": "The IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "IPMI power has been successfully reseted", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error resetting IPMI power", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/ipmi/{ipmi_id}/boot_order": { "post": { "operationId": "ipmi_id_boot_order", "summary": "Change IPMI boot order", "tags": [ "ipmi" ], "parameters": [ { "description": "The IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "bootdev": { "description": "The boot device the server will be booted from", "type": "string", "enum": [ "pxe", "disk", "cdrom", "floppy" ] } } } } } }, "responses": { "200": { "description": "IPMI boot order has been successfully changed", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error changing IPMI boot order", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/server/{server_id}/ipmi": { "post": { "operationId": "server_id_ipmi_post", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "description": "Name of the connection", "type": "string" }, "address": { "description": "IPMI address", "type": "string", "format": "ipv4" }, "password": { "description": "Password", "type": "string" }, "type": { "description": "IPMI type", "enum": [ "IPMI v1.5/v2", "IPMI v2(lanplus)", "lan", "lanplus", "redfish_v1" ], "type": "string" }, "user": { "description": "Username", "maxLength": 15, "type": "string" }, "web_url": { "description": "IPMI web-interface URL", "format": "uri", "type": "string" }, "pool": { "type": "integer", "description": "IP pool for IP allocation (from IPmgr)" }, "domain": { "type": "string", "description": "Domain name for IP address" } }, "required": [ "user", "password", "type" ], "type": "object" } } } }, "responses": { "200": { "description": "IPMI has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving IPMI", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Creating IPMI", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}/info": { "post": { "operationId": "ipmi_id_info_post", "parameters": [ { "description": "The IPMI unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "ipmi_info": { "type": "object", "description": "New IPMI data", "properties": { "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" } } }, "ipmi_error": { "type": "object", "description": "The IPMI error description", "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } } } }, "type": "object" } } } }, "responses": { "200": { "description": "IPMI data have been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving IPMI data", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit IPMI information (internal only)", "tags": [ "ipmi" ] } }, "/ipmi_connection_info": { "get": { "operationId": "ipmi_connection_info_get", "responses": { "200": { "description": "List of IPMI connections info has been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "address": { "type": "string" }, "id": { "type": "integer" }, "password": { "type": "string" }, "location": { "type": "integer" }, "type": { "enum": [ "IPMI v1.5/v2", "IPMI v2(lanplus)", "lan", "lanplus", "redfish_v1" ], "type": "string" }, "user": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of IPMI connections info", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receiving list info of IPMI connections", "tags": [ "ipmi" ] } }, "/ipmi_status_info": { "post": { "operationId": "ipmi_status_info_post", "requestBody": { "content": { "application/json": { "schema": { "properties": { "entities": { "items": { "type": "integer" }, "description": "List of unique identifiers of BMC devices", "type": "array" }, "status": { "type": "string", "description": "Power status of the server", "enum": [ "on", "off", "unknown" ] }, "status_info": { "description": "Additional information of the status", "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "IPMI status info have been edited successfully", "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "default": { "description": "Error saving IPMI status info", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit status info IPMI information (internal only)", "tags": [ "ipmi" ] } }, "/provider": { "post": { "operationId": "warehouse_provider_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "description": "The provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" }, "actual_address": { "description": "The provider actual address", "example": "London", "type": "string" }, "legal_address": { "description": "The provider legal address", "example": "London", "type": "string" }, "site": { "description": "The provider site address", "example": "https://google.com", "type": "string" }, "email": { "description": "The provider e-mail address", "example": "provider@test.com", "type": "string" }, "phone_numbers": { "description": "The provider phone numbers", "type": "array", "items": { "example": "88001112233", "type": "string" } }, "note": { "description": "Comment", "example": "The best provider we ever meet", "type": "string" } }, "required": [ "name", "identifier_number" ], "type": "object" } } } }, "responses": { "200": { "description": "The provider has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Failed to create a provider", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create provider", "tags": [ "provider" ] }, "get": { "operationId": "warehouse_provider_get", "responses": { "200": { "description": "Total list of providers", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "id": { "description": "The provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" }, "actual_address": { "description": "The provider actual address", "example": "London", "type": "string" }, "legal_address": { "description": "The provider legal address", "example": "London", "type": "string" }, "site": { "description": "The provider site address", "example": "https://google.com", "type": "string" }, "email": { "description": "The provider e-mail address", "example": "provider@test.com", "type": "string" }, "phone_numbers": { "description": "The provider phone numbers", "type": "array", "items": { "example": "88001112233", "type": "string" } }, "deliveries_count": { "description": "The total count of deliveries", "example": 5, "type": "integer" }, "note": { "description": "Comment", "example": "The best provider we ever meet", "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of providers", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive a list of providers", "tags": [ "provider" ] } }, "/provider/{provider_id}": { "post": { "operationId": "warehouse_provider_id_post", "parameters": [ { "description": "The provider unique identifier", "in": "path", "name": "provider_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "description": "The provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" }, "actual_address": { "description": "The provider actual address", "example": "London", "type": "string" }, "legal_address": { "description": "The provider legal address", "example": "London", "type": "string" }, "site": { "description": "The provider site address", "example": "https://google.com", "type": "string" }, "email": { "description": "The provider e-mail address", "example": "provider@test.com", "type": "string" }, "phone_numbers": { "description": "The provider phone numbers", "type": "array", "items": { "example": "88001112233", "type": "string" } }, "note": { "description": "Comment", "example": "The best provider we ever meet", "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "The provider has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Failed to edit the provider", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit the provider", "tags": [ "provider" ] }, "delete": { "operationId": "warehouse_provider_id_delete", "parameters": [ { "description": "The provider unique identifier", "in": "path", "name": "provider_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The provider has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Failed to delete the provider", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete the provider", "tags": [ "provider" ] }, "get": { "operationId": "warehouse_provider_id_get", "parameters": [ { "description": "The provider unique identifier", "in": "path", "name": "provider_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The provider has been received", "content": { "application/json": { "schema": { "properties": { "id": { "description": "The provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" }, "actual_address": { "description": "The provider actual address", "example": "London", "type": "string" }, "legal_address": { "description": "The provider legal address", "example": "London", "type": "string" }, "site": { "description": "The provider site address", "example": "https://google.com", "type": "string" }, "email": { "description": "The provider e-mail address", "example": "provider@test.com", "type": "string" }, "phone_numbers": { "description": "The provider phone numbers", "type": "array", "items": { "example": "88001112233", "type": "string" } }, "deliveries_count": { "description": "The total count of deliveries", "example": 5, "type": "integer" }, "note": { "description": "Comment", "example": "The best provider we ever meet", "type": "string" } }, "type": "object" } } } }, "default": { "description": "The provider was not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive the provider", "tags": [ "provider" ] } }, "/server": { "get": { "operationId": "server_get", "responses": { "200": { "description": "Servers have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "operation": { "type": "object", "properties": { "id": { "type": "integer" }, "status": { "type": "string" }, "status_info": { "type": "object" }, "progress_info": { "description": "Operation progress information", "type": "array", "items": { "type": "object" } } } }, "server_profile_operation": { "additionalProperties": false, "type": "object", "properties": { "id": { "description": "Unique identifier of the server profile operation", "type": "integer" }, "server": { "description": "Unique identifier of the server on which the operation was performed", "type": "integer" }, "name": { "description": "Name of the operation", "type": "string" }, "params": { "additionalProperties": false, "type": "object", "properties": { "name": { "description": "Server profile name", "type": "string" }, "location": { "description": "Location of the server profile", "type": "integer" }, "model": { "description": "Server profile model", "type": "string" }, "note": { "description": "Server profile note", "type": "string" }, "hostname": { "description": "BMC hostname", "type": "object", "properties": { "value": { "description": "BMC hostname value", "type": "string" } } }, "lan": { "description": "BMC lan configuration", "type": "object", "properties": { "ip": { "description": "BMC ip address", "type": "string" }, "mask": { "description": "BMC network mask", "type": "string" }, "gateway": { "description": "BMC gateway address", "type": "string" } } }, "iso": { "description": "BMC ISO mount params", "type": "object", "properties": { "id": { "description": "Unique ISO identifier for mounting", "type": "integer" } } }, "time": { "description": "BMC time params", "type": "object", "properties": { "type": { "description": "Type of time settings * `host` - uses location time * `ntp` - uses remote time server\n", "type": "string", "enum": [ "host", "ntp" ] }, "ntp_servers_urls": { "description": "URLs to NTP servers", "type": "array", "items": { "type": "string" } }, "time": { "description": "Local BMC time", "type": "string" } } }, "user": { "description": "BMC user list", "type": "array", "items": { "type": "object", "properties": { "name": { "description": "name of the BMC user", "type": "string" }, "password": { "description": "password of the BMC user", "type": "string" }, "level": { "description": "access level of the BMC user", "type": "string", "enum": [ "user", "operator", "administrator" ] } } } }, "ldap": { "description": "BMC LDAP params", "type": "object", "properties": { "server_uri": { "description": "LDAP server URL", "type": "string" }, "bind_dn": { "description": "LDAP bind DN", "type": "string" }, "bind_password": { "description": "LDAP bind password", "type": "string" }, "base_dn": { "description": "LDAP base DN", "type": "string" }, "user_id": { "description": "LDAP user id attr", "type": "string" }, "group_id": { "description": "LDAP group id attr", "type": "string" }, "server_type": { "description": "LDAP server type", "type": "string", "enum": [ "ldap", "ad" ] }, "role_map": { "description": "LDAP user group roles binding option with local user groups", "type": "array", "items": { "description": "Roles map", "type": "object", "properties": { "local": { "description": "Name of the local BMC access group", "type": "string" }, "remote": { "description": "Name of the remote LDAP access group", "type": "string" } } } } } }, "firmware": { "description": "Firmware params", "type": "object" }, "power_policy": { "description": "Power policy", "type": "object", "properties": { "value": { "description": "BMC power policy value", "type": "string", "enum": [ "always_on", "always_off", "last_state" ] } } }, "syslog": { "description": "Remote syslog server", "type": "object", "properties": { "address": { "description": "Remote syslog server address", "type": "string" }, "port": { "description": "Remote syslog server port", "type": "integer" } } }, "snmp": { "description": "Remote snmp trap server list", "type": "array", "items": { "type": "object", "properties": { "address": { "description": "Remote snmp trap server address", "type": "string" }, "port": { "description": "Remote snmp trap server port", "type": "integer" } } } }, "ssl_certificate": { "description": "BMC ssl configuration", "type": "array", "items": { "type": "object", "properties": { "type": { "description": "Type of the SSL certificate", "type": "string", "enum": [ "https", "ldap", "ca" ] }, "context": { "description": "SSL certificate (certificate and key)", "type": "string" } } } } } }, "status": { "description": "Status of the operation", "type": "string", "enum": [ "preparing", "running", "ok", "fail" ] }, "status_info": { "description": "Statuses of the children tasks", "type": "object", "properties": { "hostname": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "lan": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "ssl_certificate": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "iso": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "time": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "user": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "ldap": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "firmware": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "power_policy": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "syslog": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "snmp": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } } } } } }, "domain": { "type": "string" }, "id": { "type": "integer" }, "os_template": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } } } }, "power_status": { "type": "string", "enum": [ "unknown", "on", "off" ], "description": "Server power status", "example": "on" }, "has_errors": { "type": "boolean", "description": "Has errors or not", "example": false }, "hardware_info": { "type": "object", "description": "Information about server equipment", "properties": { "cpu": { "type": "array", "items": { "type": "object", "description": "Server CPU component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "manufacturer": { "type": "string", "description": "Component manufacturer" }, "architecture": { "type": "string", "description": "Component architecture" }, "socket": { "type": "string", "description": "Component socket" }, "core_cnt": { "type": "integer", "description": "Count of CPU cores" }, "thread_cnt": { "type": "integer", "description": "Count of CPU threads" } } } }, "ram": { "type": "array", "items": { "type": "object", "description": "Server RAM component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "part_number": { "type": "string", "description": "Component part number" }, "serial_number": { "type": "string", "description": "Component serial number" }, "device_locator": { "type": "string", "description": "DeviceLocator" }, "error_correction": { "type": "string", "description": "ErrorCorrenction" }, "base_module_type": { "type": "string", "description": "Base module type (for example \"RDIMM\")" }, "device_type": { "type": "string", "description": "Device type (for example \"DDR4\")" }, "memory_type": { "type": "string", "description": "Memory type (for example \"DRAM\")" }, "speed": { "type": "string", "description": "Speed" }, "frequency": { "type": "integer", "description": "Memory frequency (MHz)" }, "size": { "type": "integer", "description": "Memory size (Gb)" } } } }, "pci": { "type": "array", "items": { "type": "object", "description": "Server PCI component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "manufacturer": { "type": "string", "description": "Component manufacturer" }, "is_raid_configured": { "type": "boolean", "description": "Diag component compatibility field" }, "functions": { "items": { "type": "object", "description": "PCI function info", "properties": { "id": { "type": "string", "description": "PCI function unique identifier" }, "name": { "type": "string", "description": "PCI function name (for example \"PCIe Function\")" }, "device_id": { "type": "string", "description": "Device unique identifier" }, "device_class": { "type": "string", "description": "Device class (for example \"PCI bridge\")" }, "function_type": { "type": "string", "description": "PCI function type" }, "function_id": { "type": "integer", "description": "PCI function id" } } }, "type": "array" } } } }, "lan": { "type": "array", "items": { "type": "object", "description": "Server Lan component info", "properties": { "name": { "type": "string", "description": "Component name" }, "interface": { "type": "string", "description": "Interface name (for example \"eth0\")" }, "mac": { "type": "string", "description": "MAC address" } } } }, "fan": { "type": "array", "items": { "type": "object", "description": "Server Fan component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" } } } }, "storage": { "type": "array", "items": { "type": "object", "description": "Server storage component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "vendor": { "type": "string", "description": "Component vendor" }, "serial_number": { "type": "string", "description": "Component serial number" }, "part_number": { "type": "string", "description": "Component part number" }, "interface": { "type": "string", "enum": [ "SATA", "SCSI", "NVMe", "SAS", "SSD" ], "description": "Interface type" }, "smart": { "type": "string", "description": "Smart info" }, "size": { "type": "integer", "description": "Size of the storage" }, "rotation_rate": { "type": "integer", "description": "Rotation rate" } } } }, "ps": { "type": "array", "items": { "type": "object", "description": "Server power supply component info", "properties": { "member_id": { "type": "string", "description": "Component member identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "manufacturer": { "type": "string", "description": "Component manufacturer" }, "part_number": { "type": "string", "description": "Component part number" }, "serial_number": { "type": "string", "description": "Component serial number" } } } }, "motherboard": { "type": "object", "description": "Server motherboard info", "properties": { "model": { "type": "string", "description": "Model" } } }, "dmi": { "type": "object", "description": "Server dmidecode info", "properties": { "name": { "type": "string", "description": "Name of the platform from dmidecode" }, "cpu": { "type": "string", "description": "Raw output of the cpu information" }, "memory": { "type": "string", "description": "Raw output of the memory information" } } } } }, "perform_info": { "type": "object", "description": "Information about server performance received during diagnostics" }, "model": { "type": "string", "description": "Model of the server that is gotten from BMC" }, "configuration": { "type": "string", "description": "Displayed server configuration" }, "custom_configuration": { "type": "string", "description": "Server configuration entered manually" }, "generated_configuration": { "type": "string", "description": "Automatically generated server configuration" }, "is_custom_configuration": { "type": "boolean", "description": "Should we display configuration entered manually", "default": false }, "settings": { "description": "The server settings", "type": "object", "properties": { "efi": { "description": "Run operations with EFI feature for this server", "type": "boolean" }, "boot_mode": { "description": "Run operations with specified boot mode (pxe/ipxe etc.) for this server", "type": "string", "enum": [ "auto", "pxe", "ipxe" ] } } }, "state": { "type": "string", "description": "Server status: * suspending - Server operation has been suspended (all switch ports connected to the server were powered off) * suspended - Suspended(all switch ports connected to the server were powered off) * suspend_error - Error suspending sever (failed to power off all switch ports connected to the server) * resuming - Enable server operation (all switch ports connected to the server were powered on) * ok - Ready to work * resume_error - Error powering on the server(failed to power on all switch ports connected to the server)\n", "enum": [ "suspending", "suspended", "suspend_error", "resuming", "ok", "resume_error" ] }, "state_info": { "type": "string", "description": "Information about server status" }, "error_count": { "type": "integer", "example": 3 }, "ignored_error_count": { "type": "integer", "example": 2 }, "ip": { "items": { "properties": { "domain": { "type": "string" }, "family": { "enum": [ "ipv4", "ipv6" ], "type": "string" }, "gateway": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "network": { "type": "string" }, "status": { "enum": [ "allocating", "ok", "fail", "allocation_fail", "in_progress", "deleting" ], "type": "string" }, "status_info": { "type": "object" }, "type": { "enum": [ "common", "vpu" ], "type": "string", "default": "common", "description": "The IP-address type" }, "temporary": { "type": "boolean", "description": "Address is temporary" }, "vpu_net": { "type": "integer", "description": "The unique VPU network identifier to which the IP-address belongs" }, "vpu_vlan": { "type": "integer", "description": "The VLAN identifier of the VPU network" } }, "type": "object" }, "type": "array" }, "main_ipv4_info": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "domain": { "type": "string" }, "temporary": { "type": "boolean", "description": "Address is temporary" } }, "type": "object" }, "main_ipv6_info": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "domain": { "type": "string" } }, "type": "object" }, "switch_connection": { "description": "List of switch ports connected to the server", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "Port identifier" }, "switch": { "type": "integer", "description": "Switch identifier" }, "connection_id": { "type": "integer", "description": "Connection identifier" }, "description": { "type": "string", "description": "Port description" }, "admin_status": { "type": "string", "description": "Status of the switch port managed by administrator * `up` - port enabled * `down` - port disabled * `testing` - port status is test * `unknown` - unknown port status\n", "enum": [ "up", "down", "testing", "unknown" ] }, "oper_status": { "type": "string", "description": "Link status of switch port * `up` - Link ON * `down` - Link OFF * `testing` - port status is test * `unknown` - unknown link status\n", "enum": [ "up", "down", "testing", "unknown" ] }, "do_not_collect_traffic": { "type": "boolean", "description": "Do not collect traffic passing through the switch port" }, "is_ipmi_connection": { "type": "boolean", "description": "Is this connection to IPMI device" }, "vlan": { "type": "object", "nullable": true, "description": "Main VLAN info on the connection", "properties": { "vlan_id": { "type": "integer", "description": "The VLAN unique identifier" }, "vlan_name": { "type": "string", "description": "The VLAN name" }, "vlan_owner": { "type": "string", "description": "The VLAN owner" } } } } } }, "pdu_connection": { "description": "PDU port identifier connected to the server", "type": "object", "properties": { "port_id": { "type": "integer", "description": "Port identifier" }, "port_identity": { "type": "string", "description": "Port identifier in PDU" }, "pdu_id": { "type": "integer", "description": "PDU identifier" }, "pdu_name": { "type": "string", "description": "PDU name" }, "connection_id": { "type": "integer", "description": "Connection identifier" }, "power_status": { "type": "string", "description": "Port power status * up - port enabled * down - port disabled * unknown - unknown port status (does not correspond to up/down)\n", "enum": [ "up", "down", "unknown" ] } } }, "ipmi": { "type": "object", "properties": { "address": { "description": "IPMI IP address", "type": "string" }, "id": { "type": "integer" }, "name": { "description": "Name of the IPMI", "type": "string" }, "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" }, "status_info": { "type": "object" }, "type": { "description": "IPMI type", "enum": [ "IPMI v1.5/v2", "IPMI v2(lanplus)", "lan", "lanplus", "redfish_v1" ], "type": "string" }, "web_url": { "description": "IPMI web-interface URL", "format": "uri", "type": "string" }, "manufacturer_name": { "description": "Manufacturer name of the IPMI", "type": "string" }, "features": { "description": "Ipmi supported features", "type": "array", "items": { "type": "string" } } } }, "intel_amt": { "type": "object", "properties": { "address": { "description": "The Intel AMT IP address", "type": "string" }, "id": { "type": "integer", "description": "The IntelAMT unique identifier" }, "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" }, "status_info": { "type": "object" }, "protocol": { "description": "The Intel AMT connection protocol", "enum": [ "http", "https" ], "type": "string" } } }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "location_id": { "type": "integer", "description": "Location identifier" }, "mac": { "type": "string" }, "main_ipv4": { "description": "Primary IPv4 address (ID). This IP will be used for OS deployment", "type": "integer" }, "main_ipv6": { "description": "Primary IPv6 address (ID). This IP will be used for OS deployment", "type": "integer" }, "name": { "type": "string" }, "platform": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "type": { "type": "string" } }, "type": "object" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "chassis": { "properties": { "id": { "description": "Chassis identifier", "type": "integer" }, "name": { "description": "Chassis name", "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "server_slot_count": { "description": "Number of slots in chassis for blade servers", "type": "integer" } }, "type": "object" }, "slot": { "description": "Starting slot where blade server is located", "type": "integer" }, "owner": { "type": "object", "description": "Information about the server owner", "properties": { "id": { "type": "integer", "description": "Server owner identifier" }, "email": { "type": "string", "description": "Server owner email" } } }, "owner_email": { "type": "string", "description": "Server owner email" }, "diag_error": { "type": "array", "items": { "additionalProperties": false, "type": "object", "properties": { "type": { "type": "string" }, "info": { "type": "string" } } } }, "is_new": { "description": "Server found by servers search module and not yet operational", "type": "boolean" }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "exploitation_status": { "description": "Exploitation status", "type": "string", "enum": [ "in_exploitation", "not_in_exploitation" ] }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "bmc_firmware": { "type": "object", "properties": { "name": { "description": "Firmware file name", "type": "string" }, "status": { "description": "Firmware status", "type": "string" }, "status_info": { "description": "Additional info about status", "oneOf": [ { "type": "object" }, { "type": "string" } ] }, "type": { "description": "Firmware type", "type": "string", "enum": [ "bios", "bmc" ] } } } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving servers list", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about servers", "tags": [ "server" ] }, "post": { "operationId": "server_post", "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "required": [ "name", "platform" ], "type": "object", "properties": { "mac": { "description": "MAC address", "example": "AA:BB:CC:DD:EE:FF", "nullable": true, "type": "string", "pattern": "^(([A-F0-9a-f]){2}(:|-)){5}([A-F0-9a-f]){2}$" }, "name": { "description": "Server name", "example": "Server 1", "minLength": 1, "maxLength": 255, "type": "string" }, "note": { "description": "Comment", "type": "string" }, "rack": { "description": "Rack unique identifier", "example": "1", "type": "integer" }, "location": { "description": "Location unique identifier", "example": "1", "type": "integer" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "configuration": { "type": "string", "description": "The server configuration for billing purposes" }, "state": { "type": "string", "description": "Server status: * suspended - Suspended(all switch ports connected to the server were powered off) * ok - Ready to work connected to the server)\n", "default": "ok", "enum": [ "suspended", "ok" ] }, "owner": { "type": "integer", "description": "The server owner ID" }, "os_template": { "type": "object", "description": "OS installed on server", "properties": { "id": { "type": "integer", "description": "OS template ID in DCI6 (if any)" }, "name": { "type": "string", "description": "OS name" }, "tags": { "type": "array", "description": "List of template tags", "example": [ "centos", "linux", "unix", "centos6" ], "items": { "type": "string" } } } }, "platform": { "description": "Server platforms ID", "minimum": 1, "type": "integer" }, "settings": { "description": "The server settings", "type": "object", "properties": { "efi": { "description": "Run operations with EFI feature for this server", "type": "boolean" }, "boot_mode": { "description": "Run operations with specified boot mode (pxe/ipxe etc.) for this server", "type": "string", "enum": [ "auto", "pxe", "ipxe" ] } } }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The server price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The server nomenclature", "example": "00000001679845", "type": "string" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse": { "description": "Warehouse unique identifier", "type": "integer" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } }, { "additionalProperties": false, "required": [ "name", "chassis", "slot", "platform" ], "type": "object", "properties": { "mac": { "description": "MAC address", "example": "AA:BB:CC:DD:EE:FF", "nullable": true, "type": "string", "pattern": "^(([A-F0-9a-f]){2}(:|-)){5}([A-F0-9a-f]){2}$" }, "name": { "description": "Server name", "example": "my key name", "pattern": "^[^ ]", "type": "string" }, "note": { "description": "Comment", "type": "string" }, "chassis": { "description": "Chassis", "example": 1, "type": "integer" }, "slot": { "description": "Starting slot where blade server is located", "maximum": 99, "minimum": 1, "type": "integer" }, "owner": { "type": "integer", "description": "The server owner ID" }, "configuration": { "type": "string", "description": "The server configuration for billing purposes" }, "state": { "type": "string", "description": "Server status: * suspended - Suspended(all switch ports connected to the server were powered off) * ok - Ready to work connected to the server)\n", "default": "ok", "enum": [ "suspended", "ok" ] }, "os_template": { "type": "object", "description": "OS installed on server", "properties": { "id": { "type": "integer", "description": "OS template ID in DCI6 (if any)" }, "name": { "type": "string", "description": "OS name" }, "tags": { "type": "array", "description": "List of template tags", "example": [ "centos", "linux", "unix", "centos6" ], "items": { "type": "string" } } } }, "platform": { "description": "Server platforms ID", "minimum": 1, "type": "integer" }, "settings": { "description": "The server settings", "type": "object", "properties": { "efi": { "description": "Run operations with EFI feature for this server", "type": "boolean" }, "boot_mode": { "description": "Run operations with specified boot mode (pxe/ipxe etc.) for this server", "type": "string", "enum": [ "auto", "pxe", "ipxe" ] } } }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The server price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The server nomenclature", "example": "00000001679845", "type": "string" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse": { "description": "Warehouse unique identifier", "type": "integer" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } ] } } } }, "responses": { "200": { "description": "Server has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving server", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create server", "tags": [ "server" ] } }, "/server/{server_id}": { "delete": { "operationId": "server_id_delete", "parameters": [ { "description": "Server unique identifier or UUID", "in": "path", "name": "server_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Server has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting server", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete server", "tags": [ "server" ] }, "get": { "operationId": "server_id_get", "parameters": [ { "description": "Server unique identifier or UUID", "in": "path", "name": "server_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Server has been received", "content": { "application/json": { "schema": { "properties": { "operation": { "type": "object", "properties": { "id": { "type": "integer" }, "status": { "type": "string" }, "status_info": { "type": "object" }, "progress_info": { "description": "Operation progress information", "type": "array", "items": { "type": "object" } } } }, "server_profile_operation": { "additionalProperties": false, "type": "object", "properties": { "id": { "description": "Unique identifier of the server profile operation", "type": "integer" }, "server": { "description": "Unique identifier of the server on which the operation was performed", "type": "integer" }, "name": { "description": "Name of the operation", "type": "string" }, "params": { "additionalProperties": false, "type": "object", "properties": { "name": { "description": "Server profile name", "type": "string" }, "location": { "description": "Location of the server profile", "type": "integer" }, "model": { "description": "Server profile model", "type": "string" }, "note": { "description": "Server profile note", "type": "string" }, "hostname": { "description": "BMC hostname", "type": "object", "properties": { "value": { "description": "BMC hostname value", "type": "string" } } }, "lan": { "description": "BMC lan configuration", "type": "object", "properties": { "ip": { "description": "BMC ip address", "type": "string" }, "mask": { "description": "BMC network mask", "type": "string" }, "gateway": { "description": "BMC gateway address", "type": "string" } } }, "iso": { "description": "BMC ISO mount params", "type": "object", "properties": { "id": { "description": "Unique ISO identifier for mounting", "type": "integer" } } }, "time": { "description": "BMC time params", "type": "object", "properties": { "type": { "description": "Type of time settings * `host` - uses location time * `ntp` - uses remote time server\n", "type": "string", "enum": [ "host", "ntp" ] }, "ntp_servers_urls": { "description": "URLs to NTP servers", "type": "array", "items": { "type": "string" } }, "time": { "description": "Local BMC time", "type": "string" } } }, "user": { "description": "BMC user list", "type": "array", "items": { "type": "object", "properties": { "name": { "description": "name of the BMC user", "type": "string" }, "password": { "description": "password of the BMC user", "type": "string" }, "level": { "description": "access level of the BMC user", "type": "string", "enum": [ "user", "operator", "administrator" ] } } } }, "ldap": { "description": "BMC LDAP params", "type": "object", "properties": { "server_uri": { "description": "LDAP server URL", "type": "string" }, "bind_dn": { "description": "LDAP bind DN", "type": "string" }, "bind_password": { "description": "LDAP bind password", "type": "string" }, "base_dn": { "description": "LDAP base DN", "type": "string" }, "user_id": { "description": "LDAP user id attr", "type": "string" }, "group_id": { "description": "LDAP group id attr", "type": "string" }, "server_type": { "description": "LDAP server type", "type": "string", "enum": [ "ldap", "ad" ] }, "role_map": { "description": "LDAP user group roles binding option with local user groups", "type": "array", "items": { "description": "Roles map", "type": "object", "properties": { "local": { "description": "Name of the local BMC access group", "type": "string" }, "remote": { "description": "Name of the remote LDAP access group", "type": "string" } } } } } }, "firmware": { "description": "Firmware params", "type": "object" }, "power_policy": { "description": "Power policy", "type": "object", "properties": { "value": { "description": "BMC power policy value", "type": "string", "enum": [ "always_on", "always_off", "last_state" ] } } }, "syslog": { "description": "Remote syslog server", "type": "object", "properties": { "address": { "description": "Remote syslog server address", "type": "string" }, "port": { "description": "Remote syslog server port", "type": "integer" } } }, "snmp": { "description": "Remote snmp trap server list", "type": "array", "items": { "type": "object", "properties": { "address": { "description": "Remote snmp trap server address", "type": "string" }, "port": { "description": "Remote snmp trap server port", "type": "integer" } } } }, "ssl_certificate": { "description": "BMC ssl configuration", "type": "array", "items": { "type": "object", "properties": { "type": { "description": "Type of the SSL certificate", "type": "string", "enum": [ "https", "ldap", "ca" ] }, "context": { "description": "SSL certificate (certificate and key)", "type": "string" } } } } } }, "status": { "description": "Status of the operation", "type": "string", "enum": [ "preparing", "running", "ok", "fail" ] }, "status_info": { "description": "Statuses of the children tasks", "type": "object", "properties": { "hostname": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "lan": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "ssl_certificate": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "iso": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "time": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "user": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "ldap": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "firmware": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "power_policy": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "syslog": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "snmp": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } } } } } }, "domain": { "type": "string" }, "id": { "type": "integer" }, "os_template": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } } } }, "power_status": { "type": "string", "enum": [ "unknown", "on", "off" ], "description": "Server power status", "example": "on" }, "has_errors": { "type": "boolean", "description": "Has errors or not", "example": false }, "hardware_info": { "type": "object", "description": "Information about server equipment", "properties": { "cpu": { "type": "array", "items": { "type": "object", "description": "Server CPU component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "manufacturer": { "type": "string", "description": "Component manufacturer" }, "architecture": { "type": "string", "description": "Component architecture" }, "socket": { "type": "string", "description": "Component socket" }, "core_cnt": { "type": "integer", "description": "Count of CPU cores" }, "thread_cnt": { "type": "integer", "description": "Count of CPU threads" } } } }, "ram": { "type": "array", "items": { "type": "object", "description": "Server RAM component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "part_number": { "type": "string", "description": "Component part number" }, "serial_number": { "type": "string", "description": "Component serial number" }, "device_locator": { "type": "string", "description": "DeviceLocator" }, "error_correction": { "type": "string", "description": "ErrorCorrenction" }, "base_module_type": { "type": "string", "description": "Base module type (for example \"RDIMM\")" }, "device_type": { "type": "string", "description": "Device type (for example \"DDR4\")" }, "memory_type": { "type": "string", "description": "Memory type (for example \"DRAM\")" }, "speed": { "type": "string", "description": "Speed" }, "frequency": { "type": "integer", "description": "Memory frequency (MHz)" }, "size": { "type": "integer", "description": "Memory size (Gb)" } } } }, "pci": { "type": "array", "items": { "type": "object", "description": "Server PCI component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "manufacturer": { "type": "string", "description": "Component manufacturer" }, "is_raid_configured": { "type": "boolean", "description": "Diag component compatibility field" }, "functions": { "items": { "type": "object", "description": "PCI function info", "properties": { "id": { "type": "string", "description": "PCI function unique identifier" }, "name": { "type": "string", "description": "PCI function name (for example \"PCIe Function\")" }, "device_id": { "type": "string", "description": "Device unique identifier" }, "device_class": { "type": "string", "description": "Device class (for example \"PCI bridge\")" }, "function_type": { "type": "string", "description": "PCI function type" }, "function_id": { "type": "integer", "description": "PCI function id" } } }, "type": "array" } } } }, "lan": { "type": "array", "items": { "type": "object", "description": "Server Lan component info", "properties": { "name": { "type": "string", "description": "Component name" }, "interface": { "type": "string", "description": "Interface name (for example \"eth0\")" }, "mac": { "type": "string", "description": "MAC address" } } } }, "fan": { "type": "array", "items": { "type": "object", "description": "Server Fan component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" } } } }, "storage": { "type": "array", "items": { "type": "object", "description": "Server storage component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "vendor": { "type": "string", "description": "Component vendor" }, "serial_number": { "type": "string", "description": "Component serial number" }, "part_number": { "type": "string", "description": "Component part number" }, "interface": { "type": "string", "enum": [ "SATA", "SCSI", "NVMe", "SAS", "SSD" ], "description": "Interface type" }, "smart": { "type": "string", "description": "Smart info" }, "size": { "type": "integer", "description": "Size of the storage" }, "rotation_rate": { "type": "integer", "description": "Rotation rate" } } } }, "ps": { "type": "array", "items": { "type": "object", "description": "Server power supply component info", "properties": { "member_id": { "type": "string", "description": "Component member identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "manufacturer": { "type": "string", "description": "Component manufacturer" }, "part_number": { "type": "string", "description": "Component part number" }, "serial_number": { "type": "string", "description": "Component serial number" } } } }, "motherboard": { "type": "object", "description": "Server motherboard info", "properties": { "model": { "type": "string", "description": "Model" } } }, "dmi": { "type": "object", "description": "Server dmidecode info", "properties": { "name": { "type": "string", "description": "Name of the platform from dmidecode" }, "cpu": { "type": "string", "description": "Raw output of the cpu information" }, "memory": { "type": "string", "description": "Raw output of the memory information" } } } } }, "perform_info": { "type": "object", "description": "Information about server performance received during diagnostics" }, "model": { "type": "string", "description": "Model of the server that is gotten from BMC" }, "configuration": { "type": "string", "description": "Displayed server configuration" }, "custom_configuration": { "type": "string", "description": "Server configuration entered manually" }, "generated_configuration": { "type": "string", "description": "Automatically generated server configuration" }, "is_custom_configuration": { "type": "boolean", "description": "Should we display configuration entered manually", "default": false }, "settings": { "description": "The server settings", "type": "object", "properties": { "efi": { "description": "Run operations with EFI feature for this server", "type": "boolean" }, "boot_mode": { "description": "Run operations with specified boot mode (pxe/ipxe etc.) for this server", "type": "string", "enum": [ "auto", "pxe", "ipxe" ] } } }, "state": { "type": "string", "description": "Server status: * suspending - Server operation has been suspended (all switch ports connected to the server were powered off) * suspended - Suspended(all switch ports connected to the server were powered off) * suspend_error - Error suspending sever (failed to power off all switch ports connected to the server) * resuming - Enable server operation (all switch ports connected to the server were powered on) * ok - Ready to work * resume_error - Error powering on the server(failed to power on all switch ports connected to the server)\n", "enum": [ "suspending", "suspended", "suspend_error", "resuming", "ok", "resume_error" ] }, "state_info": { "type": "string", "description": "Information about server status" }, "error_count": { "type": "integer", "example": 3 }, "ignored_error_count": { "type": "integer", "example": 2 }, "ip": { "items": { "properties": { "domain": { "type": "string" }, "family": { "enum": [ "ipv4", "ipv6" ], "type": "string" }, "gateway": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "network": { "type": "string" }, "status": { "enum": [ "allocating", "ok", "fail", "allocation_fail", "in_progress", "deleting" ], "type": "string" }, "status_info": { "type": "object" }, "type": { "enum": [ "common", "vpu" ], "type": "string", "default": "common", "description": "The IP-address type" }, "temporary": { "type": "boolean", "description": "Address is temporary" }, "vpu_net": { "type": "integer", "description": "The unique VPU network identifier to which the IP-address belongs" }, "vpu_vlan": { "type": "integer", "description": "The VLAN identifier of the VPU network" } }, "type": "object" }, "type": "array" }, "main_ipv4_info": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "domain": { "type": "string" }, "temporary": { "type": "boolean", "description": "Address is temporary" } }, "type": "object" }, "main_ipv6_info": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "domain": { "type": "string" } }, "type": "object" }, "switch_connection": { "description": "List of switch ports connected to the server", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "Port identifier" }, "switch": { "type": "integer", "description": "Switch identifier" }, "connection_id": { "type": "integer", "description": "Connection identifier" }, "description": { "type": "string", "description": "Port description" }, "admin_status": { "type": "string", "description": "Status of the switch port managed by administrator * `up` - port enabled * `down` - port disabled * `testing` - port status is test * `unknown` - unknown port status\n", "enum": [ "up", "down", "testing", "unknown" ] }, "oper_status": { "type": "string", "description": "Link status of switch port * `up` - Link ON * `down` - Link OFF * `testing` - port status is test * `unknown` - unknown link status\n", "enum": [ "up", "down", "testing", "unknown" ] }, "do_not_collect_traffic": { "type": "boolean", "description": "Do not collect traffic passing through the switch port" }, "is_ipmi_connection": { "type": "boolean", "description": "Is this connection to IPMI device" }, "vlan": { "type": "object", "nullable": true, "description": "Main VLAN info on the connection", "properties": { "vlan_id": { "type": "integer", "description": "The VLAN unique identifier" }, "vlan_name": { "type": "string", "description": "The VLAN name" }, "vlan_owner": { "type": "string", "description": "The VLAN owner" } } } } } }, "pdu_connection": { "description": "PDU port identifier connected to the server", "type": "object", "properties": { "port_id": { "type": "integer", "description": "Port identifier" }, "port_identity": { "type": "string", "description": "Port identifier in PDU" }, "pdu_id": { "type": "integer", "description": "PDU identifier" }, "pdu_name": { "type": "string", "description": "PDU name" }, "connection_id": { "type": "integer", "description": "Connection identifier" }, "power_status": { "type": "string", "description": "Port power status * up - port enabled * down - port disabled * unknown - unknown port status (does not correspond to up/down)\n", "enum": [ "up", "down", "unknown" ] } } }, "ipmi": { "type": "object", "properties": { "address": { "description": "IPMI IP address", "type": "string" }, "id": { "type": "integer" }, "name": { "description": "Name of the IPMI", "type": "string" }, "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" }, "status_info": { "type": "object" }, "type": { "description": "IPMI type", "enum": [ "IPMI v1.5/v2", "IPMI v2(lanplus)", "lan", "lanplus", "redfish_v1" ], "type": "string" }, "web_url": { "description": "IPMI web-interface URL", "format": "uri", "type": "string" }, "manufacturer_name": { "description": "Manufacturer name of the IPMI", "type": "string" }, "features": { "description": "Ipmi supported features", "type": "array", "items": { "type": "string" } } } }, "intel_amt": { "type": "object", "properties": { "address": { "description": "The Intel AMT IP address", "type": "string" }, "id": { "type": "integer", "description": "The IntelAMT unique identifier" }, "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" }, "status_info": { "type": "object" }, "protocol": { "description": "The Intel AMT connection protocol", "enum": [ "http", "https" ], "type": "string" } } }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "location_id": { "type": "integer", "description": "Location identifier" }, "mac": { "type": "string" }, "main_ipv4": { "description": "Primary IPv4 address (ID). This IP will be used for OS deployment", "type": "integer" }, "main_ipv6": { "description": "Primary IPv6 address (ID). This IP will be used for OS deployment", "type": "integer" }, "name": { "type": "string" }, "platform": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "type": { "type": "string" } }, "type": "object" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "chassis": { "properties": { "id": { "description": "Chassis identifier", "type": "integer" }, "name": { "description": "Chassis name", "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "server_slot_count": { "description": "Number of slots in chassis for blade servers", "type": "integer" } }, "type": "object" }, "slot": { "description": "Starting slot where blade server is located", "type": "integer" }, "owner": { "type": "object", "description": "Information about the server owner", "properties": { "id": { "type": "integer", "description": "Server owner identifier" }, "email": { "type": "string", "description": "Server owner email" } } }, "owner_email": { "type": "string", "description": "Server owner email" }, "diag_error": { "type": "array", "items": { "additionalProperties": false, "type": "object", "properties": { "type": { "type": "string" }, "info": { "type": "string" } } } }, "is_new": { "description": "Server found by servers search module and not yet operational", "type": "boolean" }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "exploitation_status": { "description": "Exploitation status", "type": "string", "enum": [ "in_exploitation", "not_in_exploitation" ] }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "bmc_firmware": { "type": "object", "properties": { "name": { "description": "Firmware file name", "type": "string" }, "status": { "description": "Firmware status", "type": "string" }, "status_info": { "description": "Additional info about status", "oneOf": [ { "type": "object" }, { "type": "string" } ] }, "type": { "description": "Firmware type", "type": "string", "enum": [ "bios", "bmc" ] } } } }, "type": "object" } } } }, "default": { "description": "Server not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive server information", "tags": [ "server" ] }, "post": { "operationId": "server_id_post", "parameters": [ { "description": "Server unique identifier or UUID", "in": "path", "name": "server_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "domain": { "description": "Hostname", "example": "my.server", "format": "hostname", "minLength": 1, "type": "string" }, "mac": { "description": "MAC address", "example": "AA:BB:CC:DD:EE:FF", "nullable": true, "type": "string", "pattern": "^(([A-F0-9a-f]){2}(:|-)){5}([A-F0-9a-f]){2}$" }, "name": { "description": "Server name", "example": "my key name", "pattern": "^[^ ]", "type": "string" }, "note": { "description": "Comment", "type": "string" }, "user_note": { "description": "User comments", "type": "string" }, "custom_configuration": { "type": "string", "description": "Server configuration entered manually" }, "is_custom_configuration": { "type": "boolean", "description": "Should we display configuration entered manually" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "slot": { "description": "Starting slot where blade server is located", "maximum": 99, "minimum": 1, "type": "integer" }, "main_ipv4": { "description": "Primary IPv4 address of the server", "minimum": 1, "type": "integer" }, "main_ipv6": { "description": "Primary IPv6 address of the server", "minimum": 1, "type": "integer" }, "platform": { "type": "integer", "description": "The platform identifier" }, "rack": { "description": "Rack unique identifier", "example": "1", "type": "integer" }, "location": { "description": "Location unique identifier", "example": "1", "type": "integer" }, "settings": { "description": "The server settings", "type": "object", "properties": { "efi": { "description": "Run operations with EFI feature for this server", "type": "boolean" }, "boot_mode": { "description": "Run operations with specified boot mode (pxe/ipxe etc.) for this server", "type": "string", "enum": [ "auto", "pxe", "ipxe" ] } } }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The server price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The server nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse": { "description": "Warehouse unique identifier", "type": "integer" }, "warehouse_status": { "description": "Warehouse server status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `in_chassis` - The server in chassis * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "in_chassis", "written_off", "reserved", "under_repair", "broken" ] }, "chassis": { "description": "Chassis", "example": 1, "type": "integer" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Server has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "default": { "description": "Error saving server", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit server", "tags": [ "server" ] } }, "/server/{server_id}/vlan/{vlan_id}": { "post": { "operationId": "server_id_vlan_id_post", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } }, { "description": "VLAN unique identifier", "in": "path", "name": "vlan_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "ignore_bmc_connections": { "description": "Do not change VLAN for BMC connections", "type": "boolean", "default": false, "example": false } } } } } }, "responses": { "200": { "description": "Server ports has been moved to VLAN successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "default": { "description": "Error moving server ports to VLAN", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Move server switch ports to provided VLAN", "tags": [ "server" ] } }, "/server/{server_id}/recipe/{recipe_id}": { "post": { "operationId": "server_id_recipe_id_post", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } }, { "description": "Recipe unique identifier", "in": "path", "name": "recipe_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "required": [ "password" ], "type": "object", "properties": { "password": { "description": "Server root password", "type": "string" }, "macros": { "description": "Macros for operations", "type": "object", "additionalProperties": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Recipe has been executed successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "default": { "description": "Error executing recipe on server", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Execute recipe on server", "tags": [ "server" ] } }, "/server/{server_id}/last_operation": { "get": { "operationId": "server_id_last_operation_get", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Operation has been received", "content": { "application/json": { "schema": { "additionalProperties": true, "properties": { "id": { "type": "integer" }, "status": { "type": "string" }, "status_info": { "type": "object" }, "server": { "type": "integer", "description": "The server unique identifier" }, "auth_id": { "type": "string" }, "os_template": { "type": "object", "description": "The OS template information the operation was started with" }, "progress_info": { "type": "object", "description": "The operation progress information" }, "common_info": { "type": "object", "description": "The operation common info", "properties": { "bmc_mounted": { "type": "boolean", "description": "Image mount status in BMC of the server" }, "setup_ipmi": { "type": "boolean", "description": "Ipmi setting need status" }, "ipmi_pool": { "type": "integer", "description": "IP pool for the BMC address" }, "clear_hdd": { "type": "string", "description": "Type of the HDD clear operation" } } }, "type": { "type": "string", "enum": [ "os_install", "diag", "rescue" ], "description": "Operation type" }, "template_type": { "type": "string", "enum": [ "iso", "os_template" ], "description": "Template type" }, "start_time": { "type": "string", "description": "The operation start time" } }, "type": "object" } } } }, "default": { "description": "Operation not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about operation", "tags": [ "server" ] } }, "/server/{server_id}/suspend": { "post": { "operationId": "server_id_suspend", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Switch ports connected to server have been powered off successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error powering off switch ports connected to server", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Power off switch ports connected to server.", "tags": [ "server" ] } }, "/server/{server_id}/resume": { "post": { "operationId": "server_id_resume", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Switch ports connected to server have been powered on successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error powering on switch ports connected to server", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Power on switch ports connected to server.", "tags": [ "server" ] } }, "/server/configuration": { "get": { "operationId": "servers_configuration_get", "responses": { "200": { "description": "List of servers configurations has been received", "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "list": { "items": { "properties": { "configuration": { "type": "string", "description": "Server configuration", "example": "i9-9900K-64Gb-2x1024NVMe" }, "free_server_count": { "type": "integer", "description": "Number of available servers with corresponding configuration", "example": 42 } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Cannot receive a list of servers configurations", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive a list of all unique servers configurations and number of available servers corresponding to these configurations. Integration with billing system is required\n", "tags": [ "server" ] } }, "/server/free": { "get": { "operationId": "server_free_get", "responses": { "200": { "description": "Free servers have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "operation": { "type": "object", "properties": { "id": { "type": "integer" }, "status": { "type": "string" }, "status_info": { "type": "object" }, "progress_info": { "description": "Operation progress information", "type": "array", "items": { "type": "object" } } } }, "server_profile_operation": { "additionalProperties": false, "type": "object", "properties": { "id": { "description": "Unique identifier of the server profile operation", "type": "integer" }, "server": { "description": "Unique identifier of the server on which the operation was performed", "type": "integer" }, "name": { "description": "Name of the operation", "type": "string" }, "params": { "additionalProperties": false, "type": "object", "properties": { "name": { "description": "Server profile name", "type": "string" }, "location": { "description": "Location of the server profile", "type": "integer" }, "model": { "description": "Server profile model", "type": "string" }, "note": { "description": "Server profile note", "type": "string" }, "hostname": { "description": "BMC hostname", "type": "object", "properties": { "value": { "description": "BMC hostname value", "type": "string" } } }, "lan": { "description": "BMC lan configuration", "type": "object", "properties": { "ip": { "description": "BMC ip address", "type": "string" }, "mask": { "description": "BMC network mask", "type": "string" }, "gateway": { "description": "BMC gateway address", "type": "string" } } }, "iso": { "description": "BMC ISO mount params", "type": "object", "properties": { "id": { "description": "Unique ISO identifier for mounting", "type": "integer" } } }, "time": { "description": "BMC time params", "type": "object", "properties": { "type": { "description": "Type of time settings * `host` - uses location time * `ntp` - uses remote time server\n", "type": "string", "enum": [ "host", "ntp" ] }, "ntp_servers_urls": { "description": "URLs to NTP servers", "type": "array", "items": { "type": "string" } }, "time": { "description": "Local BMC time", "type": "string" } } }, "user": { "description": "BMC user list", "type": "array", "items": { "type": "object", "properties": { "name": { "description": "name of the BMC user", "type": "string" }, "password": { "description": "password of the BMC user", "type": "string" }, "level": { "description": "access level of the BMC user", "type": "string", "enum": [ "user", "operator", "administrator" ] } } } }, "ldap": { "description": "BMC LDAP params", "type": "object", "properties": { "server_uri": { "description": "LDAP server URL", "type": "string" }, "bind_dn": { "description": "LDAP bind DN", "type": "string" }, "bind_password": { "description": "LDAP bind password", "type": "string" }, "base_dn": { "description": "LDAP base DN", "type": "string" }, "user_id": { "description": "LDAP user id attr", "type": "string" }, "group_id": { "description": "LDAP group id attr", "type": "string" }, "server_type": { "description": "LDAP server type", "type": "string", "enum": [ "ldap", "ad" ] }, "role_map": { "description": "LDAP user group roles binding option with local user groups", "type": "array", "items": { "description": "Roles map", "type": "object", "properties": { "local": { "description": "Name of the local BMC access group", "type": "string" }, "remote": { "description": "Name of the remote LDAP access group", "type": "string" } } } } } }, "firmware": { "description": "Firmware params", "type": "object" }, "power_policy": { "description": "Power policy", "type": "object", "properties": { "value": { "description": "BMC power policy value", "type": "string", "enum": [ "always_on", "always_off", "last_state" ] } } }, "syslog": { "description": "Remote syslog server", "type": "object", "properties": { "address": { "description": "Remote syslog server address", "type": "string" }, "port": { "description": "Remote syslog server port", "type": "integer" } } }, "snmp": { "description": "Remote snmp trap server list", "type": "array", "items": { "type": "object", "properties": { "address": { "description": "Remote snmp trap server address", "type": "string" }, "port": { "description": "Remote snmp trap server port", "type": "integer" } } } }, "ssl_certificate": { "description": "BMC ssl configuration", "type": "array", "items": { "type": "object", "properties": { "type": { "description": "Type of the SSL certificate", "type": "string", "enum": [ "https", "ldap", "ca" ] }, "context": { "description": "SSL certificate (certificate and key)", "type": "string" } } } } } }, "status": { "description": "Status of the operation", "type": "string", "enum": [ "preparing", "running", "ok", "fail" ] }, "status_info": { "description": "Statuses of the children tasks", "type": "object", "properties": { "hostname": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "lan": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "ssl_certificate": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "iso": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "time": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "user": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "ldap": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "firmware": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "power_policy": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "syslog": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } }, "snmp": { "description": "Status and info of the child task", "additionalProperties": false, "type": "object", "properties": { "status": { "description": "Child task status", "type": "string", "enum": [ "created", "running", "failed", "completed" ] }, "status_info": { "description": "Additional child task info", "type": "string" } } } } } } }, "domain": { "type": "string" }, "id": { "type": "integer" }, "os_template": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } } } }, "power_status": { "type": "string", "enum": [ "unknown", "on", "off" ], "description": "Server power status", "example": "on" }, "has_errors": { "type": "boolean", "description": "Has errors or not", "example": false }, "hardware_info": { "type": "object", "description": "Information about server equipment", "properties": { "cpu": { "type": "array", "items": { "type": "object", "description": "Server CPU component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "manufacturer": { "type": "string", "description": "Component manufacturer" }, "architecture": { "type": "string", "description": "Component architecture" }, "socket": { "type": "string", "description": "Component socket" }, "core_cnt": { "type": "integer", "description": "Count of CPU cores" }, "thread_cnt": { "type": "integer", "description": "Count of CPU threads" } } } }, "ram": { "type": "array", "items": { "type": "object", "description": "Server RAM component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "part_number": { "type": "string", "description": "Component part number" }, "serial_number": { "type": "string", "description": "Component serial number" }, "device_locator": { "type": "string", "description": "DeviceLocator" }, "error_correction": { "type": "string", "description": "ErrorCorrenction" }, "base_module_type": { "type": "string", "description": "Base module type (for example \"RDIMM\")" }, "device_type": { "type": "string", "description": "Device type (for example \"DDR4\")" }, "memory_type": { "type": "string", "description": "Memory type (for example \"DRAM\")" }, "speed": { "type": "string", "description": "Speed" }, "frequency": { "type": "integer", "description": "Memory frequency (MHz)" }, "size": { "type": "integer", "description": "Memory size (Gb)" } } } }, "pci": { "type": "array", "items": { "type": "object", "description": "Server PCI component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "manufacturer": { "type": "string", "description": "Component manufacturer" }, "is_raid_configured": { "type": "boolean", "description": "Diag component compatibility field" }, "functions": { "items": { "type": "object", "description": "PCI function info", "properties": { "id": { "type": "string", "description": "PCI function unique identifier" }, "name": { "type": "string", "description": "PCI function name (for example \"PCIe Function\")" }, "device_id": { "type": "string", "description": "Device unique identifier" }, "device_class": { "type": "string", "description": "Device class (for example \"PCI bridge\")" }, "function_type": { "type": "string", "description": "PCI function type" }, "function_id": { "type": "integer", "description": "PCI function id" } } }, "type": "array" } } } }, "lan": { "type": "array", "items": { "type": "object", "description": "Server Lan component info", "properties": { "name": { "type": "string", "description": "Component name" }, "interface": { "type": "string", "description": "Interface name (for example \"eth0\")" }, "mac": { "type": "string", "description": "MAC address" } } } }, "fan": { "type": "array", "items": { "type": "object", "description": "Server Fan component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" } } } }, "storage": { "type": "array", "items": { "type": "object", "description": "Server storage component info", "properties": { "id": { "type": "string", "description": "Component unique identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "vendor": { "type": "string", "description": "Component vendor" }, "serial_number": { "type": "string", "description": "Component serial number" }, "part_number": { "type": "string", "description": "Component part number" }, "interface": { "type": "string", "enum": [ "SATA", "SCSI", "NVMe", "SAS", "SSD" ], "description": "Interface type" }, "smart": { "type": "string", "description": "Smart info" }, "size": { "type": "integer", "description": "Size of the storage" }, "rotation_rate": { "type": "integer", "description": "Rotation rate" } } } }, "ps": { "type": "array", "items": { "type": "object", "description": "Server power supply component info", "properties": { "member_id": { "type": "string", "description": "Component member identifier" }, "name": { "type": "string", "description": "Component name" }, "model": { "type": "string", "description": "Component model" }, "manufacturer": { "type": "string", "description": "Component manufacturer" }, "part_number": { "type": "string", "description": "Component part number" }, "serial_number": { "type": "string", "description": "Component serial number" } } } }, "motherboard": { "type": "object", "description": "Server motherboard info", "properties": { "model": { "type": "string", "description": "Model" } } }, "dmi": { "type": "object", "description": "Server dmidecode info", "properties": { "name": { "type": "string", "description": "Name of the platform from dmidecode" }, "cpu": { "type": "string", "description": "Raw output of the cpu information" }, "memory": { "type": "string", "description": "Raw output of the memory information" } } } } }, "perform_info": { "type": "object", "description": "Information about server performance received during diagnostics" }, "model": { "type": "string", "description": "Model of the server that is gotten from BMC" }, "configuration": { "type": "string", "description": "Displayed server configuration" }, "custom_configuration": { "type": "string", "description": "Server configuration entered manually" }, "generated_configuration": { "type": "string", "description": "Automatically generated server configuration" }, "is_custom_configuration": { "type": "boolean", "description": "Should we display configuration entered manually", "default": false }, "settings": { "description": "The server settings", "type": "object", "properties": { "efi": { "description": "Run operations with EFI feature for this server", "type": "boolean" }, "boot_mode": { "description": "Run operations with specified boot mode (pxe/ipxe etc.) for this server", "type": "string", "enum": [ "auto", "pxe", "ipxe" ] } } }, "state": { "type": "string", "description": "Server status: * suspending - Server operation has been suspended (all switch ports connected to the server were powered off) * suspended - Suspended(all switch ports connected to the server were powered off) * suspend_error - Error suspending sever (failed to power off all switch ports connected to the server) * resuming - Enable server operation (all switch ports connected to the server were powered on) * ok - Ready to work * resume_error - Error powering on the server(failed to power on all switch ports connected to the server)\n", "enum": [ "suspending", "suspended", "suspend_error", "resuming", "ok", "resume_error" ] }, "state_info": { "type": "string", "description": "Information about server status" }, "error_count": { "type": "integer", "example": 3 }, "ignored_error_count": { "type": "integer", "example": 2 }, "ip": { "items": { "properties": { "domain": { "type": "string" }, "family": { "enum": [ "ipv4", "ipv6" ], "type": "string" }, "gateway": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "network": { "type": "string" }, "status": { "enum": [ "allocating", "ok", "fail", "allocation_fail", "in_progress", "deleting" ], "type": "string" }, "status_info": { "type": "object" }, "type": { "enum": [ "common", "vpu" ], "type": "string", "default": "common", "description": "The IP-address type" }, "temporary": { "type": "boolean", "description": "Address is temporary" }, "vpu_net": { "type": "integer", "description": "The unique VPU network identifier to which the IP-address belongs" }, "vpu_vlan": { "type": "integer", "description": "The VLAN identifier of the VPU network" } }, "type": "object" }, "type": "array" }, "main_ipv4_info": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "domain": { "type": "string" }, "temporary": { "type": "boolean", "description": "Address is temporary" } }, "type": "object" }, "main_ipv6_info": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "domain": { "type": "string" } }, "type": "object" }, "switch_connection": { "description": "List of switch ports connected to the server", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "Port identifier" }, "switch": { "type": "integer", "description": "Switch identifier" }, "connection_id": { "type": "integer", "description": "Connection identifier" }, "description": { "type": "string", "description": "Port description" }, "admin_status": { "type": "string", "description": "Status of the switch port managed by administrator * `up` - port enabled * `down` - port disabled * `testing` - port status is test * `unknown` - unknown port status\n", "enum": [ "up", "down", "testing", "unknown" ] }, "oper_status": { "type": "string", "description": "Link status of switch port * `up` - Link ON * `down` - Link OFF * `testing` - port status is test * `unknown` - unknown link status\n", "enum": [ "up", "down", "testing", "unknown" ] }, "do_not_collect_traffic": { "type": "boolean", "description": "Do not collect traffic passing through the switch port" }, "is_ipmi_connection": { "type": "boolean", "description": "Is this connection to IPMI device" }, "vlan": { "type": "object", "nullable": true, "description": "Main VLAN info on the connection", "properties": { "vlan_id": { "type": "integer", "description": "The VLAN unique identifier" }, "vlan_name": { "type": "string", "description": "The VLAN name" }, "vlan_owner": { "type": "string", "description": "The VLAN owner" } } } } } }, "pdu_connection": { "description": "PDU port identifier connected to the server", "type": "object", "properties": { "port_id": { "type": "integer", "description": "Port identifier" }, "port_identity": { "type": "string", "description": "Port identifier in PDU" }, "pdu_id": { "type": "integer", "description": "PDU identifier" }, "pdu_name": { "type": "string", "description": "PDU name" }, "connection_id": { "type": "integer", "description": "Connection identifier" }, "power_status": { "type": "string", "description": "Port power status * up - port enabled * down - port disabled * unknown - unknown port status (does not correspond to up/down)\n", "enum": [ "up", "down", "unknown" ] } } }, "ipmi": { "type": "object", "properties": { "address": { "description": "IPMI IP address", "type": "string" }, "id": { "type": "integer" }, "name": { "description": "Name of the IPMI", "type": "string" }, "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" }, "status_info": { "type": "object" }, "type": { "description": "IPMI type", "enum": [ "IPMI v1.5/v2", "IPMI v2(lanplus)", "lan", "lanplus", "redfish_v1" ], "type": "string" }, "web_url": { "description": "IPMI web-interface URL", "format": "uri", "type": "string" }, "manufacturer_name": { "description": "Manufacturer name of the IPMI", "type": "string" }, "features": { "description": "Ipmi supported features", "type": "array", "items": { "type": "string" } } } }, "intel_amt": { "type": "object", "properties": { "address": { "description": "The Intel AMT IP address", "type": "string" }, "id": { "type": "integer", "description": "The IntelAMT unique identifier" }, "status": { "enum": [ "on", "off", "unknown", "in_progress" ], "type": "string" }, "status_info": { "type": "object" }, "protocol": { "description": "The Intel AMT connection protocol", "enum": [ "http", "https" ], "type": "string" } } }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "location_id": { "type": "integer", "description": "Location identifier" }, "mac": { "type": "string" }, "main_ipv4": { "description": "Primary IPv4 address (ID). This IP will be used for OS deployment", "type": "integer" }, "main_ipv6": { "description": "Primary IPv6 address (ID). This IP will be used for OS deployment", "type": "integer" }, "name": { "type": "string" }, "platform": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "type": { "type": "string" } }, "type": "object" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "chassis": { "properties": { "id": { "description": "Chassis identifier", "type": "integer" }, "name": { "description": "Chassis name", "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "server_slot_count": { "description": "Number of slots in chassis for blade servers", "type": "integer" } }, "type": "object" }, "slot": { "description": "Starting slot where blade server is located", "type": "integer" }, "owner": { "type": "object", "description": "Information about the server owner", "properties": { "id": { "type": "integer", "description": "Server owner identifier" }, "email": { "type": "string", "description": "Server owner email" } } }, "owner_email": { "type": "string", "description": "Server owner email" }, "diag_error": { "type": "array", "items": { "additionalProperties": false, "type": "object", "properties": { "type": { "type": "string" }, "info": { "type": "string" } } } }, "is_new": { "description": "Server found by servers search module and not yet operational", "type": "boolean" }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "exploitation_status": { "description": "Exploitation status", "type": "string", "enum": [ "in_exploitation", "not_in_exploitation" ] }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "bmc_firmware": { "type": "object", "properties": { "name": { "description": "Firmware file name", "type": "string" }, "status": { "description": "Firmware status", "type": "string" }, "status_info": { "description": "Additional info about status", "oneOf": [ { "type": "object" }, { "type": "string" } ] }, "type": { "description": "Firmware type", "type": "string", "enum": [ "bios", "bmc" ] } } } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Failed to receive free servers list", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about servers that are able to be dedicated to client. These servers meet the following conditions: - server has no owner - server diagnostics completed and its configuration has been received - server last operation completed successfully or canceled\n", "tags": [ "server" ] } }, "/server/{server_id}/approve": { "post": { "operationId": "server_id_approve", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "warehouse": { "description": "The warehouse ID if the warehouse module is enabled", "type": "integer", "example": 1 } } } } } }, "responses": { "200": { "description": "Server commissioning success", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Server commissioning error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Server commissioning", "tags": [ "server" ] } }, "/warehouse/server": { "get": { "operationId": "warehouse_server_get", "responses": { "200": { "description": "Servers in warehouse have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "id": { "type": "integer" }, "configuration": { "type": "string", "description": "Automatically generated server configuration" }, "location_id": { "type": "integer", "description": "Location identifier" }, "mac": { "type": "string" }, "name": { "type": "string" }, "platform": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "type": { "type": "string" } }, "type": "object" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "chassis": { "properties": { "id": { "description": "Chassis identifier", "type": "integer" }, "name": { "description": "Chassis name", "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "server_slot_count": { "description": "Number of slots in chassis for blade servers", "type": "integer" } }, "type": "object" }, "slot": { "description": "Starting slot where blade server is located", "type": "integer" }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery information", "type": "object", "properties": { "id": { "description": "The delivery unique identifier", "type": "integer", "example": 10 }, "number": { "description": "The delivery note number", "type": "string", "example": "ZESZE2019392490YQ" }, "delivery_date": { "description": "The delivery date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } } }, "provider": { "description": "The delivery provider information", "type": "object", "properties": { "id": { "description": "The delivery provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The delivery provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" } } }, "price": { "description": "The server price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The server nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse_status": { "description": "Warehouse server status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `in_chassis` - The server in chassis * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "in_chassis", "written_off", "reserved", "under_repair", "broken" ] }, "warehouse_status_info": { "type": "object" }, "barcode": { "description": "Barcode of server", "type": "string" }, "exploitation_status": { "description": "Exploitation status", "type": "string", "enum": [ "in_exploitation", "not_in_exploitation" ] }, "warehouse": { "properties": { "id": { "description": "The warehouse identifier", "nullable": true, "example": 1, "type": "integer" }, "name": { "description": "The warehouse name", "nullable": true, "example": "Warehouse London", "type": "string" } }, "type": "object" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving warehouse servers list", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about servers in warehouse", "tags": [ "server", "warehouse" ] } }, "/warehouse/{warehouse_id}/server": { "get": { "operationId": "warehouse_id_server_get", "parameters": [ { "description": "Warehouse unique identifier", "in": "path", "name": "warehouse_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Servers in warehouse have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "id": { "type": "integer" }, "configuration": { "type": "string", "description": "Automatically generated server configuration" }, "location_id": { "type": "integer", "description": "Location identifier" }, "mac": { "type": "string" }, "name": { "type": "string" }, "platform": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "type": { "type": "string" } }, "type": "object" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "chassis": { "properties": { "id": { "description": "Chassis identifier", "type": "integer" }, "name": { "description": "Chassis name", "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "server_slot_count": { "description": "Number of slots in chassis for blade servers", "type": "integer" } }, "type": "object" }, "slot": { "description": "Starting slot where blade server is located", "type": "integer" }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery information", "type": "object", "properties": { "id": { "description": "The delivery unique identifier", "type": "integer", "example": 10 }, "number": { "description": "The delivery note number", "type": "string", "example": "ZESZE2019392490YQ" }, "delivery_date": { "description": "The delivery date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } } }, "provider": { "description": "The delivery provider information", "type": "object", "properties": { "id": { "description": "The delivery provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The delivery provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" } } }, "price": { "description": "The server price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The server nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse_status": { "description": "Warehouse server status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `in_chassis` - The server in chassis * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "in_chassis", "written_off", "reserved", "under_repair", "broken" ] }, "warehouse_status_info": { "type": "object" }, "barcode": { "description": "Barcode of server", "type": "string" }, "exploitation_status": { "description": "Exploitation status", "type": "string", "enum": [ "in_exploitation", "not_in_exploitation" ] }, "warehouse": { "properties": { "id": { "description": "The warehouse identifier", "nullable": true, "example": 1, "type": "integer" }, "name": { "description": "The warehouse name", "nullable": true, "example": "Warehouse London", "type": "string" } }, "type": "object" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving warehouse servers list", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about servers in warehouse", "tags": [ "server", "warehouse" ] }, "post": { "operationId": "warehouse_id_server_post", "parameters": [ { "description": "Warehouse unique identifier", "in": "path", "name": "warehouse_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "required": [ "name", "platform" ], "type": "object", "properties": { "mac": { "description": "MAC address", "example": "AA:BB:CC:DD:EE:FF", "nullable": true, "type": "string", "pattern": "^(([A-F0-9a-f]){2}(:|-)){5}([A-F0-9a-f]){2}$" }, "name": { "description": "Server name", "example": "Server 1", "minLength": 1, "maxLength": 255, "type": "string" }, "note": { "description": "Comment", "type": "string" }, "platform": { "description": "Server platforms ID", "minimum": 1, "type": "integer" }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The server price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The server nomenclature", "example": "00000001679845", "type": "string" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse_status": { "description": "Warehouse server status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `in_chassis` - The server in chassis * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "in_chassis", "written_off", "reserved", "under_repair", "broken" ] }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "responses": { "200": { "description": "Server has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving server", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create server in warehouse", "tags": [ "server", "warehouse" ] } }, "/warehouse/server/{server_id}": { "post": { "operationId": "warehouse_server_id_post", "parameters": [ { "description": "Server unique identifier or UUID", "in": "path", "name": "server_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "domain": { "description": "Hostname", "example": "my.server", "format": "hostname", "minLength": 1, "type": "string" }, "mac": { "description": "MAC address", "example": "AA:BB:CC:DD:EE:FF", "nullable": true, "type": "string", "pattern": "^(([A-F0-9a-f]){2}(:|-)){5}([A-F0-9a-f]){2}$" }, "name": { "description": "Server name", "example": "my key name", "pattern": "^[^ ]", "type": "string" }, "note": { "description": "Comment", "type": "string" }, "user_note": { "description": "User comments", "type": "string" }, "custom_configuration": { "type": "string", "description": "Server configuration entered manually" }, "is_custom_configuration": { "type": "boolean", "description": "Should we display configuration entered manually" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "slot": { "description": "Starting slot where blade server is located", "maximum": 99, "minimum": 1, "type": "integer" }, "main_ipv4": { "description": "Primary IPv4 address of the server", "minimum": 1, "type": "integer" }, "main_ipv6": { "description": "Primary IPv6 address of the server", "minimum": 1, "type": "integer" }, "platform": { "type": "integer", "description": "The platform identifier" }, "rack": { "description": "Rack unique identifier", "example": "1", "type": "integer" }, "location": { "description": "Location unique identifier", "example": "1", "type": "integer" }, "settings": { "description": "The server settings", "type": "object", "properties": { "efi": { "description": "Run operations with EFI feature for this server", "type": "boolean" }, "boot_mode": { "description": "Run operations with specified boot mode (pxe/ipxe etc.) for this server", "type": "string", "enum": [ "auto", "pxe", "ipxe" ] } } }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The server price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The server nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse": { "description": "Warehouse unique identifier", "type": "integer" }, "warehouse_status": { "description": "Warehouse server status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `in_chassis` - The server in chassis * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "in_chassis", "written_off", "reserved", "under_repair", "broken" ] }, "chassis": { "description": "Chassis", "example": 1, "type": "integer" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Server has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "default": { "description": "Error saving server", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit server in warehouse", "tags": [ "server", "warehouse" ] }, "get": { "operationId": "warehouse_server_id_get", "parameters": [ { "description": "Server unique identifier or UUID", "in": "path", "name": "server_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Warehouse server has been received", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "configuration": { "type": "string", "description": "Automatically generated server configuration" }, "location_id": { "type": "integer", "description": "Location identifier" }, "mac": { "type": "string" }, "name": { "type": "string" }, "platform": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "type": { "type": "string" } }, "type": "object" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "chassis": { "properties": { "id": { "description": "Chassis identifier", "type": "integer" }, "name": { "description": "Chassis name", "type": "string" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "server_slot_count": { "description": "Number of slots in chassis for blade servers", "type": "integer" } }, "type": "object" }, "slot": { "description": "Starting slot where blade server is located", "type": "integer" }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery information", "type": "object", "properties": { "id": { "description": "The delivery unique identifier", "type": "integer", "example": 10 }, "number": { "description": "The delivery note number", "type": "string", "example": "ZESZE2019392490YQ" }, "delivery_date": { "description": "The delivery date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } } }, "provider": { "description": "The delivery provider information", "type": "object", "properties": { "id": { "description": "The delivery provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The delivery provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" } } }, "price": { "description": "The server price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The server nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse_status": { "description": "Warehouse server status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `in_chassis` - The server in chassis * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "in_chassis", "written_off", "reserved", "under_repair", "broken" ] }, "warehouse_status_info": { "type": "object" }, "barcode": { "description": "Barcode of server", "type": "string" }, "exploitation_status": { "description": "Exploitation status", "type": "string", "enum": [ "in_exploitation", "not_in_exploitation" ] }, "warehouse": { "properties": { "id": { "description": "The warehouse identifier", "nullable": true, "example": 1, "type": "integer" }, "name": { "description": "The warehouse name", "nullable": true, "example": "Warehouse London", "type": "string" } }, "type": "object" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" } } } }, "default": { "description": "Warehouse server not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive warehouse server information", "tags": [ "server", "warehouse" ] } }, "/warehouse/server/{server_id}/remove": { "post": { "operationId": "warehouse_server_id_remove_post", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "cause": { "description": "Reason for deleting a spare part", "type": "string" } }, "required": [ "cause" ] } } } }, "responses": { "200": { "description": "Server has been removed successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error removing server", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Remove server", "tags": [ "server", "warehouse" ] } }, "/server/{server_id}/error": { "get": { "operationId": "error_server_id_get", "summary": "Get list of server errors", "tags": [ "server_error" ], "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Server list errors has been received", "content": { "application/json": { "schema": { "properties": { "list": { "type": "array", "description": "List of server errors", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "Error unique identifier" }, "info": { "type": "object", "description": "Additional info about error" }, "server": { "type": "integer", "description": "Server unique identifier" }, "severity": { "type": "string", "enum": [ "warning", "error", "critical" ], "description": "Error severity" }, "type": { "type": "string", "enum": [ "operation", "state", "alert", "diag", "ip", "firmware", "warranty", "reserved" ], "description": "Error type" }, "creation_time": { "type": "string", "description": "Error creation time" }, "ignored": { "type": "boolean", "description": "Ignore server errors" } } } }, "size": { "type": "integer", "description": "Errors count" } }, "type": "object" } } } }, "default": { "description": "Error receiving server list errors", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "post": { "operationId": "error_server_id_post", "summary": "Add a server error", "tags": [ "server_error" ], "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "info": { "type": "object", "description": "Additional info about error" }, "severity": { "type": "string", "enum": [ "warning", "error", "critical" ], "description": "Error severity" }, "type": { "type": "string", "enum": [ "operation", "state", "alert", "diag", "ip", "firmware", "warranty", "reserved" ], "description": "Error type" } }, "required": [ "info", "severity", "type" ] } } } }, "responses": { "200": { "description": "Server error has been added successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error adding server error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/server/{server_id}/error/{error_id}": { "get": { "operationId": "error_server_id_error_id_get", "summary": "Recive information about server error", "tags": [ "server_error" ], "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } }, { "description": "Error unique identifier", "in": "path", "name": "error_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Server error information received", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer", "description": "Error unique identifier" }, "info": { "type": "object", "description": "Additional info about error" }, "server": { "type": "integer", "description": "Server unique identifier" }, "severity": { "type": "string", "enum": [ "warning", "error", "critical" ], "description": "Error severity" }, "type": { "type": "string", "enum": [ "operation", "state", "alert", "diag", "ip", "firmware", "warranty", "reserved" ], "description": "Error type" }, "creation_time": { "type": "string", "description": "Error creation time" }, "ignored": { "type": "boolean", "description": "Ignore server errors" } } } } } }, "default": { "description": "Error deleting server", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "post": { "operationId": "error_server_id_error_id_post", "summary": "Editing a server error", "tags": [ "server_error" ], "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } }, { "description": "Error unique identifier", "in": "path", "name": "error_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "severity": { "type": "string", "enum": [ "warning", "error", "critical" ], "description": "Error severity" }, "type": { "type": "string", "enum": [ "operation", "state", "alert", "diag", "ip", "firmware", "warranty", "reserved" ], "description": "Error type" } } } } } }, "responses": { "200": { "description": "Server error has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error editing server error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "delete": { "operationId": "error_server_id_error_id_delete", "summary": "Delete a server error", "tags": [ "server_error" ], "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } }, { "description": "Error unique identifier", "in": "path", "name": "error_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Server error has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting server error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/server/{server_id}/error/ignore_all": { "post": { "deprecated": true, "operationId": "error_server_ignore_all_post", "summary": "Ignore all server errors", "tags": [ "server_error", "server" ], "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Server errors were ignored", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Ignore error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/server/{server_id}/error/unignore_all": { "post": { "deprecated": true, "operationId": "error_server_unignore_all_post", "summary": "Unignore all server errors", "tags": [ "server_error", "server" ], "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Server errors were unignored", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Unignor error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/type/cpu": { "post": { "operationId": "cpu_type_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "description": "CPU type name", "example": "Intel(R) Core CPU i7-7700K", "minLength": 1, "maxLength": 255, "type": "string" }, "alias": { "description": "Short name", "example": "i7-7700K", "maxLength": 255, "type": "string" }, "note": { "description": "Comment", "type": "string", "example": "Overclocked", "maxLength": 1500 }, "socket": { "description": "CPU socket type", "example": "FCBGA1356", "maxLength": 255, "type": "string" }, "scalability": { "description": "CPU scalability type", "example": "1s only", "maxLength": 255, "type": "string" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "required": [ "name" ], "type": "object" } } } }, "responses": { "200": { "description": "CPU type has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error creating CPU type", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Creating CPU type", "tags": [ "cpu_type", "warehouse" ] }, "get": { "operationId": "cpu_type_get", "responses": { "200": { "description": "CPU types have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "id": { "type": "integer", "description": "CPU type unique identifier" }, "name": { "type": "string", "description": "CPU type name" }, "alias": { "type": "string", "description": "CPU type short name" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "note": { "type": "string", "description": "Comment" }, "socket": { "description": "CPU socket type", "example": "FCBGA1356", "type": "string" }, "scalability": { "description": "CPU scalability type", "example": "1s only", "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving CPU types", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receiving all CPU types", "tags": [ "cpu_type", "warehouse" ] } }, "/type/cpu/{cpu_type_id}": { "delete": { "operationId": "cpu_type_id_delete", "parameters": [ { "description": "CPU type unique identifier", "in": "path", "name": "cpu_type_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "CPU type has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting cpu type", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete CPU type", "tags": [ "cpu_type", "warehouse" ] }, "get": { "operationId": "cpu_type_id_get", "parameters": [ { "description": "CPU type unique identifier", "in": "path", "name": "cpu_type_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "CPU type has been received", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "description": "CPU type unique identifier" }, "name": { "type": "string", "description": "CPU type name" }, "alias": { "type": "string", "description": "CPU type short name" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "note": { "type": "string", "description": "Comment" }, "socket": { "description": "CPU socket type", "example": "FCBGA1356", "type": "string" }, "scalability": { "description": "CPU scalability type", "example": "1s only", "type": "string" } }, "type": "object" } } } }, "default": { "description": "CPU type not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive CPU type", "tags": [ "cpu_type", "warehouse" ] }, "post": { "operationId": "cpu_type_id_post", "parameters": [ { "description": "CPU type unique identifier", "in": "path", "name": "cpu_type_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "description": "CPU type name", "example": "Intel(R) Core CPU i7-7700K", "minLength": 1, "maxLength": 255, "type": "string" }, "alias": { "description": "Short name", "example": "i7-7700K", "maxLength": 255, "type": "string" }, "note": { "description": "Comment", "type": "string", "example": "Overclocked", "maxLength": 1500 }, "socket": { "description": "CPU socket type", "example": "FCBGA1356", "maxLength": 255, "type": "string" }, "scalability": { "description": "CPU scalability type", "example": "1s only", "maxLength": 255, "type": "string" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "CPU type has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving CPU type", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit CPU type", "tags": [ "cpu_type", "warehouse" ] } }, "/supported_switch": { "get": { "operationId": "supported_switch_get", "responses": { "200": { "description": "List of supported switches has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "list": { "type": "array", "items": { "type": "object", "properties": { "name": { "description": "Device type", "type": "string", "example": "cisco_snmp" }, "protocol": { "description": "Protocols for device management", "type": "array", "items": { "type": "string" } }, "features": { "description": "Features is provided by the device", "type": "array", "items": { "type": "string", "enum": [ "port_aggregation" ] } } } } } } } } } }, "default": { "description": "Error receiving list of supported switches", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "List of supported switches", "tags": [ "switch" ] } }, "/switch": { "get": { "operationId": "switch_get", "responses": { "200": { "description": "Switches have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "type": "object", "properties": { "device": { "enum": [ "cisco_snmp", "snmp_common" ], "type": "string" }, "hostname": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "status": { "type": "string", "enum": [ "ok", "fail", "in_progress" ] }, "name": { "type": "string" }, "note": { "type": "string" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "location_id": { "type": "integer", "description": "Location identifier" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "last_update": { "description": "Date of the last device poll", "type": "string" }, "last_success_update": { "description": "Date of the last successful device poll", "type": "string" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "total_port": { "description": "Total number of switch ports", "type": "integer" }, "using_port": { "description": "Number of ports in use", "type": "integer" }, "server_connection": { "description": "List of switch ports connected to server", "type": "array", "items": { "type": "object", "properties": { "connection_id": { "type": "integer", "description": "Connection identifier" }, "server_id": { "type": "integer", "description": "Server identifier" }, "port_id": { "type": "integer", "description": "Port identifier" }, "port_if_index": { "type": "string", "description": "Port If-index" } } } }, "dependent": { "description": "Dependent switches identifiers for autocreate VLANs", "type": "array", "items": { "type": "integer", "description": "The unique identifier of the switch" } }, "snmp_params": { "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "Community", "type": "string" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } }, "ssh_params": { "description": "SSH connection parameters", "type": "object", "properties": { "password": { "description": "Password", "type": "string" }, "port": { "description": "SSH access ports", "example": 22, "maximum": 65535, "minimum": 1, "type": "integer" }, "user": { "description": "SSH access username", "example": "root", "minLength": 1, "pattern": "^[^ ]", "type": "string" } } }, "netconf_params": { "description": "NETCONF connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" }, "port": { "description": "NETCONF access ports", "example": 830, "maximum": 65535, "minimum": 1, "type": "integer" }, "device_params": { "description": "NETCONF device parameters", "type": "object", "properties": { "name": { "description": "OS name", "type": "string", "enum": [ "junos" ], "default": "junos" } } } } }, "nxapi_params": { "description": "NXAPI connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "pirozhok" }, "port": { "description": "Port to connect via API", "type": "integer", "example": 8080 }, "protocol": { "description": "Data transfer protocol", "type": "string", "enum": [ "http", "https" ], "default": "http", "example": "http" } } }, "eapi_params": { "description": "Arista Command eAPI connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" } } }, "mikrotik_params": { "description": "RouterOS API connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "port": { "description": "Port to connect via API", "type": "integer", "example": 8728 }, "ssl": { "description": "SSL usage", "type": "boolean" } } }, "custom_params": { "description": "Custom connection parameters", "type": "object" }, "additional_info": { "description": "Additional switch info", "type": "object" }, "aggregation_allowed": { "description": "Allows search for aggregation ports", "type": "boolean" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving list of switches", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about switches", "tags": [ "switch" ] }, "post": { "operationId": "switch_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "device": { "description": "Device", "type": "string" }, "ip": { "description": "Switch IP address", "example": "127.0.0.1", "format": "ipv4", "type": "string" }, "name": { "description": "Switch name", "example": "my key name", "pattern": "^[^ ]", "minLength": 1, "maxLength": 255, "type": "string" }, "note": { "description": "Comment", "maxLength": 1500, "type": "string" }, "rack": { "description": "Rack unique identifier", "example": "1", "type": "integer" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "dependent": { "description": "Dependent switches identifiers for autocreate VLANs", "type": "array", "items": { "type": "integer", "description": "The unique identifier of the switch" } }, "snmp_params": { "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "Community", "type": "string" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } }, "ssh_params": { "description": "SSH connection parameters", "type": "object", "properties": { "password": { "description": "Password", "type": "string" }, "port": { "description": "SSH access ports", "example": 22, "maximum": 65535, "minimum": 1, "type": "integer" }, "user": { "description": "SSH access username", "example": "root", "minLength": 1, "pattern": "^[^ ]", "type": "string" } } }, "netconf_params": { "description": "NETCONF connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" }, "port": { "description": "NETCONF access ports", "example": 830, "maximum": 65535, "minimum": 1, "type": "integer" }, "device_params": { "description": "NETCONF device parameters", "type": "object", "properties": { "name": { "description": "OS name", "type": "string", "enum": [ "junos" ], "default": "junos" } } } } }, "nxapi_params": { "description": "NXAPI connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "pirozhok" }, "port": { "description": "Port to connect via API", "type": "integer", "example": 8080 }, "protocol": { "description": "Data transfer protocol", "type": "string", "enum": [ "http", "https" ], "default": "http", "example": "http" } } }, "eapi_params": { "description": "Arista Command eAPI connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" } } }, "mikrotik_params": { "description": "RouterOS API connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "port": { "description": "Port to connect via API", "type": "integer", "example": 8728 }, "ssl": { "description": "SSL usage", "type": "boolean" } } }, "custom_params": { "description": "Custom connection parameters", "type": "object" }, "aggregation_allowed": { "description": "Allows search for aggregation ports", "type": "boolean" }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The switch price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The switch nomenclature", "example": "00000001679845", "type": "string" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse": { "description": "Warehouse unique identifier", "type": "integer" }, "model": { "description": "Type or model", "maxLength": 255, "example": "Cisco Catalyst 2960", "type": "string" }, "warehouse_port_count": { "description": "Total number of switch ports", "nullable": true, "type": "integer", "minimum": 0, "maximum": 65535 }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "required": [ "name", "ip", "device", "rack", "unit", "size" ], "type": "object" } } } }, "responses": { "200": { "description": "Switch has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create switch", "tags": [ "switch" ] } }, "/switch/{switch_id}": { "delete": { "operationId": "switch_id_delete", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Switch has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete switch", "tags": [ "switch" ] }, "get": { "operationId": "switch_id_get", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Switch has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "device": { "enum": [ "cisco_snmp", "snmp_common" ], "type": "string" }, "hostname": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "status": { "type": "string", "enum": [ "ok", "fail", "in_progress" ] }, "name": { "type": "string" }, "note": { "type": "string" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "location_id": { "type": "integer", "description": "Location identifier" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "last_update": { "description": "Date of the last device poll", "type": "string" }, "last_success_update": { "description": "Date of the last successful device poll", "type": "string" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "total_port": { "description": "Total number of switch ports", "type": "integer" }, "using_port": { "description": "Number of ports in use", "type": "integer" }, "server_connection": { "description": "List of switch ports connected to server", "type": "array", "items": { "type": "object", "properties": { "connection_id": { "type": "integer", "description": "Connection identifier" }, "server_id": { "type": "integer", "description": "Server identifier" }, "port_id": { "type": "integer", "description": "Port identifier" }, "port_if_index": { "type": "string", "description": "Port If-index" } } } }, "dependent": { "description": "Dependent switches identifiers for autocreate VLANs", "type": "array", "items": { "type": "integer", "description": "The unique identifier of the switch" } }, "snmp_params": { "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "Community", "type": "string" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } }, "ssh_params": { "description": "SSH connection parameters", "type": "object", "properties": { "password": { "description": "Password", "type": "string" }, "port": { "description": "SSH access ports", "example": 22, "maximum": 65535, "minimum": 1, "type": "integer" }, "user": { "description": "SSH access username", "example": "root", "minLength": 1, "pattern": "^[^ ]", "type": "string" } } }, "netconf_params": { "description": "NETCONF connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" }, "port": { "description": "NETCONF access ports", "example": 830, "maximum": 65535, "minimum": 1, "type": "integer" }, "device_params": { "description": "NETCONF device parameters", "type": "object", "properties": { "name": { "description": "OS name", "type": "string", "enum": [ "junos" ], "default": "junos" } } } } }, "nxapi_params": { "description": "NXAPI connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "pirozhok" }, "port": { "description": "Port to connect via API", "type": "integer", "example": 8080 }, "protocol": { "description": "Data transfer protocol", "type": "string", "enum": [ "http", "https" ], "default": "http", "example": "http" } } }, "eapi_params": { "description": "Arista Command eAPI connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" } } }, "mikrotik_params": { "description": "RouterOS API connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "port": { "description": "Port to connect via API", "type": "integer", "example": 8728 }, "ssl": { "description": "SSL usage", "type": "boolean" } } }, "custom_params": { "description": "Custom connection parameters", "type": "object" }, "additional_info": { "description": "Additional switch info", "type": "object" }, "aggregation_allowed": { "description": "Allows search for aggregation ports", "type": "boolean" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "default": { "description": "Switch not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about switch", "tags": [ "switch" ] }, "post": { "operationId": "switch_id_post", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "ip": { "description": "Switch IP address", "example": "127.0.0.1", "format": "ipv4", "type": "string" }, "name": { "description": "Switch name", "example": "my key name", "pattern": "^[^ ]", "minLength": 1, "maxLength": 255, "type": "string" }, "note": { "description": "Comment", "maxLength": 1500, "type": "string" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "rack": { "description": "Rack unique identifier", "example": "1", "type": "integer" }, "dependent": { "description": "Dependent switches identifiers for autocreate VLANs", "type": "array", "items": { "type": "integer", "description": "The unique identifier of the switch" } }, "snmp_params": { "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "Community", "type": "string" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } }, "ssh_params": { "description": "SSH connection parameters", "type": "object", "properties": { "password": { "description": "Password", "type": "string" }, "port": { "description": "SSH access ports", "example": 22, "maximum": 65535, "minimum": 1, "type": "integer" }, "user": { "description": "SSH access username", "example": "root", "minLength": 1, "pattern": "^[^ ]", "type": "string" } } }, "netconf_params": { "description": "NETCONF connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" }, "port": { "description": "NETCONF access ports", "example": 830, "maximum": 65535, "minimum": 1, "type": "integer" }, "device_params": { "description": "NETCONF device parameters", "type": "object", "properties": { "name": { "description": "OS name", "type": "string", "enum": [ "junos" ], "default": "junos" } } } } }, "nxapi_params": { "description": "NXAPI connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "pirozhok" }, "port": { "description": "Port to connect via API", "type": "integer", "example": 8080 }, "protocol": { "description": "Data transfer protocol", "type": "string", "enum": [ "http", "https" ], "default": "http", "example": "http" } } }, "eapi_params": { "description": "Arista Command eAPI connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" } } }, "mikrotik_params": { "description": "RouterOS API connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "port": { "description": "Port to connect via API", "type": "integer", "example": 8728 }, "ssl": { "description": "SSL usage", "type": "boolean" } } }, "custom_params": { "description": "Custom connection parameters", "type": "object" }, "aggregation_allowed": { "description": "Allows search for aggregation ports", "type": "boolean" }, "device": { "description": "Device(Only if not already set)", "type": "string" }, "warehouse_status": { "description": "Warehouse device status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "written_off", "reserved", "under_repair", "broken" ] }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Switch has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit switch", "tags": [ "switch" ] } }, "/switch/{switch_id}/info": { "post": { "operationId": "switch_id_info_post", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "additional_info": { "description": "Additional switch info", "type": "object" }, "vlans": { "type": "array", "description": "Vlan list", "items": { "type": "object", "properties": { "vlan_id": { "description": "Vlan ID", "type": "integer" }, "vlan_name": { "description": "Vlan name", "type": "string" } } } }, "ports": { "type": "array", "items": { "type": "object", "properties": { "name": { "description": "Switch name", "example": "my key name", "pattern": "^[^ ]", "type": "string" }, "note": { "description": "Comment", "type": "string" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "vlan_id": { "type": "integer", "description": "The VLAN identifier (if is_trunk is true, then it is native VLAN)", "example": 571, "minimum": 1, "maximum": 4094 }, "is_trunk": { "type": "boolean", "description": "If equal true, then port work in trunk mode, else access mode" }, "trunk_members": { "description": "Trunk members array", "type": "array", "items": { "type": "object", "properties": { "vlan_id": { "description": "The VLAN identifier", "type": "integer" }, "vlan_name": { "description": "The VLAN name", "type": "string" } } } }, "snmp_params": { "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "Community", "type": "string" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } }, "ssh_params": { "description": "SSH connection parameters", "type": "object", "properties": { "password": { "description": "Password", "type": "string" }, "port": { "description": "SSH access ports", "example": 22, "maximum": 65535, "minimum": 1, "type": "integer" }, "user": { "description": "SSH access username", "example": "root", "minLength": 1, "pattern": "^[^ ]", "type": "string" } } }, "netconf_params": { "description": "NETCONF connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" }, "port": { "description": "NETCONF access ports", "example": 830, "maximum": 65535, "minimum": 1, "type": "integer" }, "device_params": { "description": "NETCONF device parameters", "type": "object", "properties": { "name": { "description": "OS name", "type": "string", "enum": [ "junos" ], "default": "junos" } } } } }, "nxapi_params": { "description": "NXAPI connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "pirozhok" }, "port": { "description": "Port to connect via API", "type": "integer", "example": 8080 }, "protocol": { "description": "Data transfer protocol", "type": "string", "enum": [ "http", "https" ], "default": "http", "example": "http" } } }, "eapi_params": { "description": "Arista Command eAPI connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" } } }, "mikrotik_params": { "description": "RouterOS API connection parameters", "type": "object", "properties": { "username": { "description": "Username", "type": "string", "example": "root" }, "password": { "description": "Password", "type": "string", "example": "password" }, "port": { "description": "Port to connect via API", "type": "integer", "example": 8728 }, "ssl": { "description": "SSL usage", "type": "boolean" } } }, "custom_params": { "description": "Custom connection parameters", "type": "object" }, "aggregation_allowed": { "description": "Allows search for aggregation ports", "type": "boolean" } } } }, "switch_error": { "type": "object", "description": "The switch error description", "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } } } }, "type": "object" } } } }, "responses": { "200": { "description": "Switch port data have been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving switch port data", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit switch port information (internal only)", "tags": [ "switch" ] } }, "/switch/{switch_id}/port": { "get": { "operationId": "switch_port_get", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Switch ports have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "duplex": { "enum": [ "unknown", "half", "full", "disagree", "auto" ], "type": "string" }, "id": { "type": "integer" }, "if_index": { "type": "string" }, "speed": { "enum": [ "unknown", "auto", "auto_10_100M", "10M", "100M", "1G", "10G", "16G", "40G" ], "type": "string" }, "speed_type": { "enum": [ "unknown", "10M", "100M", "1G", "10G" ], "type": "string" }, "switch": { "type": "integer" }, "admin_status": { "enum": [ "up", "down", "testing", "unknown" ], "type": "string" }, "oper_status": { "enum": [ "up", "down", "testing", "unknown", "dormant", "notpresent", "lowerlayerdown" ], "type": "string" }, "connection_type": { "enum": [ "free", "connected", "other" ], "type": "string" }, "connection_type_info": { "type": "string" }, "description": { "type": "string", "description": "Port description on switch", "example": "GigabitEthernet3/0/10" }, "connection_id": { "type": "string", "description": "Connection identifier" }, "note": { "type": "string", "description": "Notes with information", "example": "Don't use 10G!" }, "server": { "type": "object", "properties": { "id": { "type": "integer" }, "rack": { "type": "integer" }, "domain": { "type": "string" }, "name": { "type": "string" } } }, "vlan_id": { "type": "integer", "description": "The VLAN identifier (if is_trunk is true, then it is native VLAN)", "example": 571, "minimum": 1, "maximum": 4094 }, "vlan_owner": { "type": "integer", "nullable": true, "description": "Owner of the VLAN" }, "is_trunk": { "type": "boolean", "description": "If equal true, then port work in trunk mode, else access mode" }, "trunk_members": { "description": "The VLAN identifiers and names", "type": "array", "items": { "type": "integer" } }, "do_not_collect_traffic": { "description": "Do not collect traffic passing through the switch port", "type": "boolean" }, "is_uplink": { "type": "boolean", "description": "Does port work in uplink mode. If the port is in uplink mode, it cannot be edited and connected to other devices" }, "is_service": { "type": "boolean", "description": "Does port work in service mode. If the port is service, it cannot be connected to other devices" }, "mac_list": { "description": "List of MAC addresses on the switch port", "type": "array", "items": { "type": "string" } }, "is_ipmi_connection": { "type": "boolean", "description": "Is this connection to IPMI device" }, "is_aggregation": { "type": "boolean", "description": "Is aggregation interface" }, "aggregation_port_id": { "type": "integer", "description": "Identifier of parent aggregation port (Reference to switch port)" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of switch ports", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive switch ports information", "tags": [ "switch" ] } }, "/switch/{switch_id}/port/{port_id}": { "get": { "operationId": "switch_port_id_get", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } }, { "description": "Switch port unique identifier", "in": "path", "name": "port_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Switch port has been received", "content": { "application/json": { "schema": { "properties": { "duplex": { "enum": [ "unknown", "half", "full", "disagree", "auto" ], "type": "string" }, "id": { "type": "integer" }, "if_index": { "type": "string" }, "speed": { "enum": [ "unknown", "auto", "auto_10_100M", "10M", "100M", "1G", "10G", "16G", "40G" ], "type": "string" }, "speed_type": { "enum": [ "unknown", "10M", "100M", "1G", "10G" ], "type": "string" }, "switch": { "type": "integer" }, "admin_status": { "enum": [ "up", "down", "testing", "unknown" ], "type": "string" }, "oper_status": { "enum": [ "up", "down", "testing", "unknown", "dormant", "notpresent", "lowerlayerdown" ], "type": "string" }, "connection_type": { "enum": [ "free", "connected", "other" ], "type": "string" }, "connection_type_info": { "type": "string" }, "description": { "type": "string", "description": "Port description on switch", "example": "GigabitEthernet3/0/10" }, "connection_id": { "type": "string", "description": "Connection identifier" }, "note": { "type": "string", "description": "Notes with information", "example": "Don't use 10G!" }, "server": { "type": "object", "properties": { "id": { "type": "integer" }, "rack": { "type": "integer" }, "domain": { "type": "string" }, "name": { "type": "string" } } }, "vlan_id": { "type": "integer", "description": "The VLAN identifier (if is_trunk is true, then it is native VLAN)", "example": 571, "minimum": 1, "maximum": 4094 }, "vlan_owner": { "type": "integer", "nullable": true, "description": "Owner of the VLAN" }, "is_trunk": { "type": "boolean", "description": "If equal true, then port work in trunk mode, else access mode" }, "trunk_members": { "description": "The VLAN identifiers and names", "type": "array", "items": { "type": "integer" } }, "do_not_collect_traffic": { "description": "Do not collect traffic passing through the switch port", "type": "boolean" }, "is_uplink": { "type": "boolean", "description": "Does port work in uplink mode. If the port is in uplink mode, it cannot be edited and connected to other devices" }, "is_service": { "type": "boolean", "description": "Does port work in service mode. If the port is service, it cannot be connected to other devices" }, "mac_list": { "description": "List of MAC addresses on the switch port", "type": "array", "items": { "type": "string" } }, "is_ipmi_connection": { "type": "boolean", "description": "Is this connection to IPMI device" }, "is_aggregation": { "type": "boolean", "description": "Is aggregation interface" }, "aggregation_port_id": { "type": "integer", "description": "Identifier of parent aggregation port (Reference to switch port)" } }, "type": "object" } } } }, "default": { "description": "Switch port not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about switch port", "tags": [ "switch" ] }, "post": { "operationId": "switch_port_id_post", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } }, { "description": "Switch port unique identifier", "in": "path", "name": "port_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "duplex": { "enum": [ "unknown", "half", "full", "disagree", "auto" ], "type": "string" }, "speed": { "enum": [ "unknown", "auto", "auto_10_100M", "10M", "100M", "1G", "10G", "16G", "40G" ], "type": "string" }, "note": { "type": "string", "description": "Notes with information", "example": "Don't use 10G!" }, "vlan_id": { "type": "integer", "description": "The VLAN identifier (if is_trunk is true, then it is native VLAN)", "example": 571, "minimum": 1, "maximum": 4094 }, "is_trunk": { "type": "boolean", "description": "If equal true, then port work in trunk mode, else access mode" }, "trunk_members": { "description": "The VLAN identifiers", "type": "array", "items": { "type": "integer" } }, "is_uplink": { "type": "boolean", "description": "Does port work in uplink mode. If the port is in uplink mode, it cannot be edited and connected to other devices" }, "is_service": { "type": "boolean", "description": "Does port work in service mode. If the port is service, it cannot be connected to other devices" } } } } } }, "responses": { "200": { "description": "Switch port has been changed successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving switch port", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit switch port", "tags": [ "switch" ] } }, "/switch/{switch_id}/port/{port_id}/down": { "post": { "operationId": "switch_port_down_post", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } }, { "description": "Switch port ID", "in": "path", "name": "port_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Switch port has been powered off successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error powering off switch port", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Power off switch port", "tags": [ "switch" ] } }, "/switch/{switch_id}/port/{port_id}/up": { "post": { "operationId": "switch_port_up_post", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } }, { "description": "Switch port ID", "in": "path", "name": "port_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Switch port has been powered on successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error powering on switch port", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Power on switch port", "tags": [ "switch" ] } }, "/switch/{switch_id}/refresh": { "post": { "operationId": "switch_id_refresh", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Switch has been polled successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error polling switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Switch poll", "tags": [ "switch" ] } }, "/switch/{switch_id}/status": { "post": { "operationId": "switch_id_status", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Switch has been polled successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error polling switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Switch poll", "tags": [ "switch" ] } }, "/switch/{switch_id}/port/{port_id}/connect": { "post": { "operationId": "switch_id_port_id_connect", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } }, { "description": "Switch port ID", "in": "path", "name": "port_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "required": [ "connection_type" ], "type": "object", "properties": { "connection_type": { "enum": [ "free", "connected", "other" ], "type": "string", "description": "Type of connection" }, "do_not_collect_traffic": { "description": "Do not collect traffic passing through the switch port", "type": "boolean" }, "server_id": { "type": "integer", "description": "Server identifier" }, "connection_type_info": { "type": "string", "description": "Information of connection" }, "is_ipmi_connection": { "type": "boolean", "description": "Mark as an IPMI connection" } } } } } }, "responses": { "200": { "description": "Swtich port connection has been updated successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error connect switch port", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Connect switch port", "tags": [ "switch" ] } }, "/switch_port/{port_id}": { "post": { "operationId": "switch_port_port_id_post", "parameters": [ { "description": "The port unique identifier", "in": "path", "name": "port_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "vlan_id": { "type": "integer", "description": "The VLAN identifier", "example": 571, "minimum": 1, "maximum": 4094 }, "note": { "type": "string", "description": "The user notes with information", "example": "Don't use 10G!" } }, "type": "object" } } } }, "responses": { "200": { "description": "Switch port connection has been changed successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error while editing switch port connection", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit switch port connection", "tags": [ "switch" ] }, "get": { "operationId": "switch_port_port_id_get", "parameters": [ { "description": "The port unique identifier", "in": "path", "name": "port_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Switch port has been received", "content": { "application/json": { "schema": { "properties": { "id": { "description": "The switch port unique identifier", "type": "integer" }, "admin_status": { "enum": [ "up", "down", "testing", "unknown" ], "type": "string" }, "oper_status": { "enum": [ "up", "down", "testing", "unknown", "dormant", "notpresent", "lowerlayerdown" ], "type": "string" }, "note": { "type": "string", "description": "Notes with information", "example": "Don't use 10G!" }, "vlan_id": { "type": "integer", "description": "The VLAN identifier (if is_trunk is true, then it is native VLAN)", "example": 571, "minimum": 1, "maximum": 4094 }, "vlan_name": { "type": "string", "description": "The VLAN name" } } } } } }, "default": { "description": "Switch port not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about switch port", "tags": [ "switch" ] } }, "/warehouse/switch": { "get": { "operationId": "warehouse_switch_get", "responses": { "200": { "description": "Switches in warehouse have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "type": "object", "properties": { "device": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "note": { "type": "string" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "location_id": { "type": "integer", "description": "Location identifier" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "model": { "description": "Type or model", "example": "Cisco Catalyst 2960", "type": "string" }, "warehouse_port_count": { "description": "Total number of switch ports", "nullable": true, "type": "integer", "minimum": 0, "maximum": 65535 }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "serial_number": { "description": "Serial number", "type": "string", "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery information", "type": "object", "properties": { "id": { "description": "The delivery unique identifier", "type": "integer", "example": 10 }, "number": { "description": "The delivery note number", "type": "string", "example": "ZESZE2019392490YQ" }, "delivery_date": { "description": "The delivery date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } } }, "provider": { "description": "The delivery provider information", "type": "object", "properties": { "id": { "description": "The delivery provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The delivery provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" } } }, "price": { "description": "The switch price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The switch nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31" }, "warehouse_status": { "description": "Warehouse device status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "written_off", "reserved", "under_repair", "broken" ] }, "warehouse_status_info": { "type": "object", "description": "Warehouse status info" }, "barcode": { "description": "Barcode of switch", "type": "string" }, "exploitation_status": { "description": "Exploitation status", "type": "string", "enum": [ "in_exploitation", "not_in_exploitation" ] }, "warehouse": { "properties": { "id": { "description": "The warehouse identifier", "nullable": true, "example": 1, "type": "integer" }, "name": { "description": "The warehouse name", "nullable": true, "example": "Warehouse London", "type": "string" } }, "type": "object" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving warehouse switches list", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about switches in warehouse", "tags": [ "switch", "warehouse" ] } }, "/warehouse/{warehouse_id}/switch": { "get": { "operationId": "warehouse_id_switch_get", "parameters": [ { "description": "Warehouse unique identifier", "in": "path", "name": "warehouse_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Switchs in warehouse have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "type": "object", "properties": { "device": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "note": { "type": "string" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "location_id": { "type": "integer", "description": "Location identifier" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "model": { "description": "Type or model", "example": "Cisco Catalyst 2960", "type": "string" }, "warehouse_port_count": { "description": "Total number of switch ports", "nullable": true, "type": "integer", "minimum": 0, "maximum": 65535 }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "serial_number": { "description": "Serial number", "type": "string", "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery information", "type": "object", "properties": { "id": { "description": "The delivery unique identifier", "type": "integer", "example": 10 }, "number": { "description": "The delivery note number", "type": "string", "example": "ZESZE2019392490YQ" }, "delivery_date": { "description": "The delivery date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } } }, "provider": { "description": "The delivery provider information", "type": "object", "properties": { "id": { "description": "The delivery provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The delivery provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" } } }, "price": { "description": "The switch price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The switch nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31" }, "warehouse_status": { "description": "Warehouse device status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "written_off", "reserved", "under_repair", "broken" ] }, "warehouse_status_info": { "type": "object", "description": "Warehouse status info" }, "barcode": { "description": "Barcode of switch", "type": "string" }, "exploitation_status": { "description": "Exploitation status", "type": "string", "enum": [ "in_exploitation", "not_in_exploitation" ] }, "warehouse": { "properties": { "id": { "description": "The warehouse identifier", "nullable": true, "example": 1, "type": "integer" }, "name": { "description": "The warehouse name", "nullable": true, "example": "Warehouse London", "type": "string" } }, "type": "object" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving warehouse switches list", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive information about switches in warehouse", "tags": [ "switch", "warehouse" ] }, "post": { "operationId": "warehouse_id_switch_post", "parameters": [ { "description": "Warehouse unique identifier", "in": "path", "name": "warehouse_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "model", "name" ], "properties": { "name": { "description": "Switch name", "example": "my key name", "pattern": "^[^ ]", "minLength": 1, "maxLength": 255, "type": "string" }, "note": { "description": "Comment", "maxLength": 1500, "type": "string" }, "model": { "description": "Type or model", "maxLength": 255, "example": "Cisco Catalyst 2960", "type": "string" }, "warehouse_port_count": { "description": "Total number of switch ports", "nullable": true, "type": "integer", "minimum": 0, "maximum": 65535, "example": 48 }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The switch price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The switch nomenclature", "example": "00000001679845", "type": "string" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse_status": { "description": "Warehouse device status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "written_off", "reserved", "under_repair", "broken" ] }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "responses": { "200": { "description": "Switch has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create switch in warehouse", "tags": [ "switch", "warehouse" ] } }, "/warehouse/switch/{switch_id}": { "post": { "operationId": "warehouse_switch_id_post", "parameters": [ { "description": "Switch unique identifier or UUID", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "name": { "description": "Switch name", "example": "my key name", "pattern": "^[^ ]", "minLength": 1, "maxLength": 255, "type": "string" }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The switch price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The switch nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse": { "description": "Warehouse unique identifier", "type": "integer" }, "warehouse_status": { "description": "Warehouse device status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "written_off", "reserved", "under_repair", "broken" ] }, "model": { "description": "Type or model", "maxLength": 255, "example": "Cisco Catalyst 2960", "type": "string" }, "warehouse_port_count": { "description": "Total number of switch ports", "nullable": true, "type": "integer", "minimum": 0, "maximum": 65535 }, "note": { "description": "Comment", "maxLength": 1500, "type": "string" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "responses": { "200": { "description": "Switch has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "default": { "description": "Error saving switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit switch in warehouse", "tags": [ "switch", "warehouse" ] }, "get": { "operationId": "warehouse_switch_id_get", "parameters": [ { "description": "Switch unique identifier or UUID", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Warehouse switch has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "device": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "note": { "type": "string" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "location_id": { "type": "integer", "description": "Location identifier" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "model": { "description": "Type or model", "example": "Cisco Catalyst 2960", "type": "string" }, "warehouse_port_count": { "description": "Total number of switch ports", "nullable": true, "type": "integer", "minimum": 0, "maximum": 65535 }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "serial_number": { "description": "Serial number", "type": "string", "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery information", "type": "object", "properties": { "id": { "description": "The delivery unique identifier", "type": "integer", "example": 10 }, "number": { "description": "The delivery note number", "type": "string", "example": "ZESZE2019392490YQ" }, "delivery_date": { "description": "The delivery date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } } }, "provider": { "description": "The delivery provider information", "type": "object", "properties": { "id": { "description": "The delivery provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The delivery provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" } } }, "price": { "description": "The switch price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The switch nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31" }, "warehouse_status": { "description": "Warehouse device status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "written_off", "reserved", "under_repair", "broken" ] }, "warehouse_status_info": { "type": "object", "description": "Warehouse status info" }, "barcode": { "description": "Barcode of switch", "type": "string" }, "exploitation_status": { "description": "Exploitation status", "type": "string", "enum": [ "in_exploitation", "not_in_exploitation" ] }, "warehouse": { "properties": { "id": { "description": "The warehouse identifier", "nullable": true, "example": 1, "type": "integer" }, "name": { "description": "The warehouse name", "nullable": true, "example": "Warehouse London", "type": "string" } }, "type": "object" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "default": { "description": "Warehouse switch not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive warehouse switch information", "tags": [ "switch", "warehouse" ] } }, "/warehouse/switch/{switch_id}/remove": { "post": { "operationId": "warehouse_switch_id_remove_post", "parameters": [ { "description": "Switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "cause": { "description": "Reason for deleting a spare part", "type": "string" } }, "required": [ "cause" ] } } } }, "responses": { "200": { "description": "Switch has been removed successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error removing switch", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Remove switch", "tags": [ "switch", "warehouse" ] } }, "/warehouse/pci": { "get": { "operationId": "warehouse_pci_get", "responses": { "200": { "description": "PCIs have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "type": "object", "properties": { "id": { "description": "Spare part unique identifier", "type": "integer" }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "dci_server_uuid": { "description": "Server UUID from DCImanager", "type": "string" }, "barcode": { "description": "Barcode to find spare part", "type": "string" }, "type": { "description": "Spare part type info", "oneOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "allOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "type": "object", "properties": { "socket": { "description": "CPU socket", "type": "string" }, "scalability": { "description": "CPU scalability", "type": "string" } } } ] }, { "allOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "type": "object", "properties": { "size": { "description": "Storage size", "type": "integer" }, "drive_type": { "description": "Storage drive type", "type": "string" }, "protocol": { "description": "Storage protocol", "type": "string" }, "drive_interface": { "description": "Storage drive interface", "type": "string" }, "form_factor": { "description": "Storage form factor", "type": "string" } } } ] }, { "allOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "type": "object", "properties": { "size": { "description": "RAM size", "type": "integer" }, "frequency": { "description": "RAM frequency", "type": "integer" }, "manufacturer": { "description": "RAM manufacturer", "type": "string" }, "ram_type": { "description": "RAM type", "type": "string" }, "ecc": { "description": "Is RAM with ECC (error-correcting code)", "type": "boolean" }, "registered": { "description": "Is RAM registered (Registered Memory)", "type": "boolean" }, "low_profile": { "description": "Is RAM with low profile", "type": "boolean" } } } ] } ] }, "serial_number": { "description": "Serial number", "type": "string" }, "delivery": { "description": "The delivery information", "type": "object", "properties": { "id": { "description": "The delivery unique identifier", "type": "integer", "example": 10 }, "number": { "description": "The delivery note number", "type": "string", "example": "ZESZE2019392490YQ" }, "delivery_date": { "description": "The delivery date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } } }, "provider": { "description": "The delivery provider information", "type": "object", "properties": { "id": { "description": "The delivery provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The delivery provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" } } }, "price": { "description": "The detail price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The detail nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "type": "string" }, "warehouse_status": { "description": "Spare part status. Statuses: * `in_warehouse` - The spare part is in the warehouse * `in_server` - The spare part is in the server * `written_off` - The spare part has been written off * `reserved` - The spare part is reserved * `under_repair` - The spare part under repair * `in_laboratory` - The spare part in laboratory * `broken` - The spare part is broken\n", "type": "string", "enum": [ "in_warehouse", "in_server", "written_off", "reserved", "under_repair", "in_laboratory", "broken" ] }, "note": { "description": "Comment", "type": "string" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "warehouse": { "properties": { "id": { "description": "The warehouse identifier", "nullable": true, "example": 1, "type": "integer" }, "name": { "description": "The warehouse name", "nullable": true, "example": "Warehouse London", "type": "string" } }, "type": "object" } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving list of PCIs", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive all PCIs", "tags": [ "pci", "warehouse" ] } }, "/warehouse/{warehouse_id}/pci": { "post": { "operationId": "pci_post", "parameters": [ { "description": "Warehouse unique identifier", "in": "path", "name": "warehouse_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "dci_server_uuid": { "description": "Server UUID from DCImanager", "type": "string", "minLength": 1, "example": "ee790db5-562b-4bc5-a4ff-18d94a53c240" }, "barcode": { "description": "Barcode to find spare part", "type": "string", "minLength": 1, "maxLength": 255, "example": "cpu_518771aeb9" }, "type": { "description": "Spare part type unique identifier", "type": "integer", "example": 12 }, "serial_number": { "description": "Serial number", "type": "string", "minLength": 1, "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The detail price", "example": 2345.5, "type": "number", "format": "double", "nullable": true }, "nomenclature": { "description": "The detail nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "note": { "description": "Comment", "type": "string", "example": "Warranty expired", "maxLength": 1500 }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "warehouse_status": { "description": "Spare part status. Statuses: * `in_warehouse` - The spare part is in the warehouse * `in_server` - The spare part is in the server * `written_off` - The spare part has been written off * `reserved` - The spare part is reserved * `under_repair` - The spare part under repair * `in_laboratory` - The spare part in laboratory * `broken` - The spare part is broken\n", "type": "string", "enum": [ "in_warehouse", "in_server", "written_off", "reserved", "under_repair", "in_laboratory", "broken" ] } }, "required": [ "barcode", "type", "warehouse_status" ] } } } }, "responses": { "200": { "description": "PCI has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving PCI", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create PCI", "tags": [ "pci", "warehouse" ] }, "get": { "operationId": "pci_get", "parameters": [ { "description": "Warehouse unique identifier", "in": "path", "name": "warehouse_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "PCIs have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "type": "object", "properties": { "id": { "description": "Spare part unique identifier", "type": "integer" }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "dci_server_uuid": { "description": "Server UUID from DCImanager", "type": "string" }, "barcode": { "description": "Barcode to find spare part", "type": "string" }, "type": { "description": "Spare part type info", "oneOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "allOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "type": "object", "properties": { "socket": { "description": "CPU socket", "type": "string" }, "scalability": { "description": "CPU scalability", "type": "string" } } } ] }, { "allOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "type": "object", "properties": { "size": { "description": "Storage size", "type": "integer" }, "drive_type": { "description": "Storage drive type", "type": "string" }, "protocol": { "description": "Storage protocol", "type": "string" }, "drive_interface": { "description": "Storage drive interface", "type": "string" }, "form_factor": { "description": "Storage form factor", "type": "string" } } } ] }, { "allOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "type": "object", "properties": { "size": { "description": "RAM size", "type": "integer" }, "frequency": { "description": "RAM frequency", "type": "integer" }, "manufacturer": { "description": "RAM manufacturer", "type": "string" }, "ram_type": { "description": "RAM type", "type": "string" }, "ecc": { "description": "Is RAM with ECC (error-correcting code)", "type": "boolean" }, "registered": { "description": "Is RAM registered (Registered Memory)", "type": "boolean" }, "low_profile": { "description": "Is RAM with low profile", "type": "boolean" } } } ] } ] }, "serial_number": { "description": "Serial number", "type": "string" }, "delivery": { "description": "The delivery information", "type": "object", "properties": { "id": { "description": "The delivery unique identifier", "type": "integer", "example": 10 }, "number": { "description": "The delivery note number", "type": "string", "example": "ZESZE2019392490YQ" }, "delivery_date": { "description": "The delivery date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } } }, "provider": { "description": "The delivery provider information", "type": "object", "properties": { "id": { "description": "The delivery provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The delivery provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" } } }, "price": { "description": "The detail price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The detail nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "type": "string" }, "warehouse_status": { "description": "Spare part status. Statuses: * `in_warehouse` - The spare part is in the warehouse * `in_server` - The spare part is in the server * `written_off` - The spare part has been written off * `reserved` - The spare part is reserved * `under_repair` - The spare part under repair * `in_laboratory` - The spare part in laboratory * `broken` - The spare part is broken\n", "type": "string", "enum": [ "in_warehouse", "in_server", "written_off", "reserved", "under_repair", "in_laboratory", "broken" ] }, "note": { "description": "Comment", "type": "string" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "warehouse": { "properties": { "id": { "description": "The warehouse identifier", "nullable": true, "example": 1, "type": "integer" }, "name": { "description": "The warehouse name", "nullable": true, "example": "Warehouse London", "type": "string" } }, "type": "object" } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving list of PCIs", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive all PCIs", "tags": [ "pci", "warehouse" ] } }, "/pci/{pci_id}": { "get": { "operationId": "pci_id_get", "parameters": [ { "description": "PCI unique identifier or UUID", "in": "path", "name": "pci_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "PCI has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "description": "Spare part unique identifier", "type": "integer" }, "uuid": { "description": "Universally unique identifier", "type": "string" }, "dci_server_uuid": { "description": "Server UUID from DCImanager", "type": "string" }, "barcode": { "description": "Barcode to find spare part", "type": "string" }, "type": { "description": "Spare part type info", "oneOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "allOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "type": "object", "properties": { "socket": { "description": "CPU socket", "type": "string" }, "scalability": { "description": "CPU scalability", "type": "string" } } } ] }, { "allOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "type": "object", "properties": { "size": { "description": "Storage size", "type": "integer" }, "drive_type": { "description": "Storage drive type", "type": "string" }, "protocol": { "description": "Storage protocol", "type": "string" }, "drive_interface": { "description": "Storage drive interface", "type": "string" }, "form_factor": { "description": "Storage form factor", "type": "string" } } } ] }, { "allOf": [ { "type": "object", "properties": { "id": { "description": "Type unique identifier", "type": "integer" }, "name": { "description": "Type name", "type": "string" }, "alias": { "description": "Short name", "type": "string" } } }, { "type": "object", "properties": { "size": { "description": "RAM size", "type": "integer" }, "frequency": { "description": "RAM frequency", "type": "integer" }, "manufacturer": { "description": "RAM manufacturer", "type": "string" }, "ram_type": { "description": "RAM type", "type": "string" }, "ecc": { "description": "Is RAM with ECC (error-correcting code)", "type": "boolean" }, "registered": { "description": "Is RAM registered (Registered Memory)", "type": "boolean" }, "low_profile": { "description": "Is RAM with low profile", "type": "boolean" } } } ] } ] }, "serial_number": { "description": "Serial number", "type": "string" }, "delivery": { "description": "The delivery information", "type": "object", "properties": { "id": { "description": "The delivery unique identifier", "type": "integer", "example": 10 }, "number": { "description": "The delivery note number", "type": "string", "example": "ZESZE2019392490YQ" }, "delivery_date": { "description": "The delivery date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } } }, "provider": { "description": "The delivery provider information", "type": "object", "properties": { "id": { "description": "The delivery provider unique identifier", "example": 1, "type": "integer" }, "name": { "description": "The delivery provider name", "example": "My provider", "type": "string" }, "identifier_number": { "description": "The provider identifier number (VAT or TIN)", "example": 123123123123123, "type": "string" } } }, "price": { "description": "The detail price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The detail nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "type": "string" }, "warehouse_status": { "description": "Spare part status. Statuses: * `in_warehouse` - The spare part is in the warehouse * `in_server` - The spare part is in the server * `written_off` - The spare part has been written off * `reserved` - The spare part is reserved * `under_repair` - The spare part under repair * `in_laboratory` - The spare part in laboratory * `broken` - The spare part is broken\n", "type": "string", "enum": [ "in_warehouse", "in_server", "written_off", "reserved", "under_repair", "in_laboratory", "broken" ] }, "note": { "description": "Comment", "type": "string" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" }, "warehouse": { "properties": { "id": { "description": "The warehouse identifier", "nullable": true, "example": 1, "type": "integer" }, "name": { "description": "The warehouse name", "nullable": true, "example": "Warehouse London", "type": "string" } }, "type": "object" } } } } } }, "default": { "description": "PCI not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive pci", "tags": [ "pci", "warehouse" ] }, "post": { "operationId": "pci_id_post", "parameters": [ { "description": "PCI unique identifier or UUID", "in": "path", "name": "pci_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "dci_server_uuid": { "description": "Server UUID from DCImanager", "type": "string", "minLength": 1, "example": "ee790db5-562b-4bc5-a4ff-18d94a53c240" }, "barcode": { "description": "Barcode to find spare part", "type": "string", "minLength": 1, "maxLength": 255, "example": "cpu_518771aeb9" }, "type": { "description": "Spare part type unique identifier", "type": "integer", "example": 12 }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The detail price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The detail nomenclature", "example": "00000001679845", "type": "string" }, "reserved_to_date": { "description": "Reserved to date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse_status": { "description": "Spare part status. Statuses: * `in_warehouse` - The spare part is in the warehouse * `in_server` - The spare part is in the server * `written_off` - The spare part has been written off * `reserved` - The spare part is reserved * `under_repair` - The spare part under repair * `in_laboratory` - The spare part in laboratory * `broken` - The spare part is broken\n", "type": "string", "enum": [ "in_warehouse", "in_server", "written_off", "reserved", "under_repair", "in_laboratory", "broken" ] }, "warehouse": { "description": "Warehouse unique identifier", "type": "integer", "example": 1 }, "note": { "description": "Comment", "type": "string", "example": "Warranty expired", "maxLength": 1500 }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "responses": { "200": { "description": "PCI has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving PCI", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit PCI", "tags": [ "pci", "warehouse" ] } }, "/pci/{pci_id}/remove": { "post": { "operationId": "pci_id_remove_post", "parameters": [ { "description": "Pci unique identifier", "in": "path", "name": "pci_id", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "cause": { "description": "Reason for deleting a spare part", "type": "string" } }, "required": [ "cause" ] } } } }, "responses": { "200": { "description": "Pci has been removed successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error removing Pci", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Remove Pci", "tags": [ "pci", "warehouse" ] } }, "/location/{location_id}/rack": { "post": { "operationId": "location_id_rack_post", "parameters": [ { "description": "Location unique identifier", "in": "path", "name": "location_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "description": "Rack name", "example": "my key name", "type": "string" }, "note": { "description": "Comment", "type": "string" }, "size": { "description": "Rack size", "maximum": 99, "minimum": 1, "type": "integer" }, "public_pool": { "description": "IP pool for server dedicating", "nullable": true, "type": "integer" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "required": [ "name", "size" ], "type": "object" } } } }, "responses": { "200": { "description": "Rack has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving rack", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create rack", "tags": [ "rack" ] } }, "/rack": { "get": { "operationId": "rack_get", "responses": { "200": { "description": "Racks have been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "id": { "type": "integer" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "name": { "type": "string" }, "reserved": { "description": "Number of reserved units", "type": "integer" }, "service": { "description": "Number of service units", "type": "integer" }, "size": { "type": "integer" }, "used": { "description": "Number of units in use", "format": "float", "type": "number" }, "total_used": { "description": "Total count of used units plus reserved and service units", "format": "float", "type": "number" }, "total_devices": { "description": "Total devices count in the rack", "type": "integer" }, "free": { "description": "Number of free units", "format": "float", "type": "number" }, "device_server": { "description": "Servers installed into the rack", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } }, "type": "object" }, "type": "array" }, "device_switch": { "description": "List of switches", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "Switch identifier" }, "name": { "type": "string", "description": "Switch name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "device_pdu": { "description": "List of PDU", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "PDU identifier" }, "name": { "type": "string", "description": "PDU name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "device_ups": { "description": "List of UPS", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "UPS identifier" }, "name": { "type": "string", "description": "UPS name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "device_chassis": { "description": "List of Chassis", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "Chassis identifier" }, "name": { "type": "string", "description": "Chassis name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "device_service": { "description": "List of service devices", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "Service device identifier" }, "name": { "type": "string", "description": "Service device name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "device_reserved": { "description": "List of reserved devices", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "Reserved device identifier" }, "name": { "type": "string", "description": "Reserved device name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "reserve_expire": { "type": "string", "description": "Date the reserve expires" } } } }, "device_other": { "description": "List of other devices from warehouse", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "Other device identifier" }, "name": { "type": "string", "description": "Other device name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "public_pool": { "description": "IP pool for server dedicating", "nullable": true, "type": "integer" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving list of racks", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive all racks", "tags": [ "rack" ] } }, "/rack/{rack_id}": { "delete": { "operationId": "rack_id_delete", "parameters": [ { "description": "Rack unique identifier", "in": "path", "name": "rack_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Rack has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting rack", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete rack", "tags": [ "rack" ] }, "get": { "operationId": "rack_id_get", "parameters": [ { "description": "Rack unique identifier", "in": "path", "name": "rack_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Rack has been received", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "name": { "type": "string" }, "reserved": { "description": "Number of reserved units", "type": "integer" }, "service": { "description": "Number of service units", "type": "integer" }, "size": { "type": "integer" }, "used": { "description": "Number of units in use", "format": "float", "type": "number" }, "total_used": { "description": "Total count of used units plus reserved and service units", "format": "float", "type": "number" }, "total_devices": { "description": "Total devices count in the rack", "type": "integer" }, "free": { "description": "Number of free units", "format": "float", "type": "number" }, "device_server": { "description": "Servers installed into the rack", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } }, "type": "object" }, "type": "array" }, "device_switch": { "description": "List of switches", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "Switch identifier" }, "name": { "type": "string", "description": "Switch name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "device_pdu": { "description": "List of PDU", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "PDU identifier" }, "name": { "type": "string", "description": "PDU name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "device_ups": { "description": "List of UPS", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "UPS identifier" }, "name": { "type": "string", "description": "UPS name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "device_chassis": { "description": "List of Chassis", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "Chassis identifier" }, "name": { "type": "string", "description": "Chassis name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "device_service": { "description": "List of service devices", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "Service device identifier" }, "name": { "type": "string", "description": "Service device name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "device_reserved": { "description": "List of reserved devices", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "Reserved device identifier" }, "name": { "type": "string", "description": "Reserved device name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "reserve_expire": { "type": "string", "description": "Date the reserve expires" } } } }, "device_other": { "description": "List of other devices from warehouse", "type": "array", "items": { "properties": { "id": { "type": "integer", "description": "Other device identifier" }, "name": { "type": "string", "description": "Other device name" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true } } } }, "public_pool": { "description": "IP pool for server dedicating", "nullable": true, "type": "integer" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" } } } }, "default": { "description": "Rack not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive rack", "tags": [ "rack" ] }, "post": { "operationId": "rack_id_post", "parameters": [ { "description": "Rack unique identifier", "in": "path", "name": "rack_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "name": { "description": "Rack name", "example": "my key name", "type": "string" }, "note": { "description": "Comment", "type": "string" }, "public_pool": { "description": "IP pool for server dedicating", "nullable": true, "type": "integer" }, "size": { "description": "The rack size in units", "maximum": 99, "minimum": 1, "type": "integer" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Rack has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving rack", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit rack", "tags": [ "rack" ] } }, "/rack/{rack_id}/unit": { "get": { "operationId": "rack_id_get_units", "parameters": [ { "description": "Rack unique identifier", "in": "path", "name": "rack_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of rack units has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "list": { "type": "array", "description": "List of rack units with devices and sizes", "items": { "type": "object", "properties": { "unit": { "type": "integer", "nullable": true, "description": "Unit number" }, "busy_space": { "format": "float", "type": "number", "description": "How much space is occupied in unit, 0.0 - unit available, 1.0 - unit is in use\n" }, "devices": { "type": "array", "items": { "type": "object", "description": "Device that occupies the unit", "properties": { "id": { "type": "integer", "description": "Device id that occupies the unit" }, "name": { "type": "string", "description": "Device name", "example": "Server 2568" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "type": { "type": "string", "description": "Device type that occupies the unit", "example": "dci_server" }, "extra": { "type": "object", "description": "Device extra info", "example": "{\"status\": \"reserved\", \"reserve_expire\": \"2021-12-12\"}" } } } } } } } } } } } }, "default": { "description": "Error receiving a list of rack units", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive a list of rack units", "tags": [ "rack" ] } }, "/rack/{rack_id}/unit/{unit_id}/unit_helper": { "post": { "operationId": "unit_helper_post", "parameters": [ { "description": "Rack unique identifier", "in": "path", "name": "rack_id", "required": true, "schema": { "type": "integer" } }, { "description": "Unit unique identifier", "in": "path", "name": "unit_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "name": { "description": "Comment", "maxLength": 1500, "type": "string" }, "status": { "description": "Statuses: * reserved - reserved until a certain time * service - used for service tasks\n", "enum": [ "reserved", "service" ], "type": "string" }, "status_info": { "type": "object", "description": "Detailed status description" }, "reserve_expire": { "description": "Reserve expiration date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } }, "required": [ "size", "status" ], "type": "object" } } } }, "responses": { "200": { "description": "Unit helper has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving unit helper", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create unit helper. It is used to mark a server as reserved or service.", "tags": [ "unit_helper" ] } }, "/unit_helper/{unit_helper_id}": { "post": { "operationId": "unit_helper_id_post", "parameters": [ { "description": "Unit helper unique identifier", "in": "path", "name": "unit_helper_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "rack": { "description": "Rack unique identifier", "example": 1, "type": "integer" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "name": { "description": "Comment", "maxLength": 1500, "type": "string" }, "status": { "description": "Statuses: * reserved - reserved until a certain time * service - used for service tasks\n", "enum": [ "reserved", "service" ], "type": "string" }, "status_info": { "type": "object", "description": "Detailed status description" }, "reserve_expire": { "description": "Reserve expiration date", "example": "2020-10-31", "nullable": true, "type": "string", "format": "date" } } } } } }, "responses": { "200": { "description": "Unit helper has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving unit helper", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit unit helper", "tags": [ "unit_helper" ] }, "delete": { "operationId": "unit_helper_id_delete", "parameters": [ { "description": "Unit helper unique identifier", "in": "path", "name": "unit_helper_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Unit helper has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting unit helper", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delte unit helper", "tags": [ "unit_helper" ] } }, "/module/rack_view/enable": { "post": { "operationId": "rack_view_module_enable", "summary": "Enable rack view module", "tags": [ "rack" ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Rack view module enabled successfully", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string" }, "status_info": { "type": "object" } }, "type": "object" } } } }, "default": { "description": "Rack view module enable error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/module/rack_view/disable": { "post": { "operationId": "rack_view_module_disable", "summary": "Disable rack view module", "tags": [ "rack" ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "Rack view module disabled successfully", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string" }, "status_info": { "type": "object" } }, "type": "object" } } } }, "default": { "description": "Rack view module disabled error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/module/rack_view/status": { "get": { "operationId": "rack_view_module_status", "responses": { "200": { "description": "Rack view module status has been received", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string" }, "status_info": { "type": "object" } }, "type": "object" } } } }, "default": { "description": "Error receiving rack view module status", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Rack view module status", "tags": [ "rack" ] } }, "/server/{server_id}/ip": { "get": { "operationId": "server_id_ip_get", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of server IP addresses has been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "domain": { "type": "string" }, "family": { "enum": [ "ipv4", "ipv6" ], "type": "string" }, "gateway": { "type": "string" }, "first": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "network": { "type": "string" }, "server": { "type": "string" }, "temporary": { "type": "boolean", "description": "Address is temporary" }, "status": { "enum": [ "allocating", "ok", "fail", "allocation_fail", "in_progress", "deleting" ], "type": "string" }, "status_info": { "type": "object" }, "type": { "enum": [ "common", "vpu" ], "type": "string", "default": "common", "description": "The IP-address type" }, "vpu_net": { "type": "integer", "description": "The unique VPU network identifier to which the IP-address belongs" }, "vpu_vlan": { "type": "integer", "description": "The VLAN identifier of the VPU network" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of server IP addresses", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive a list of server IP addresses", "tags": [ "ip" ] }, "post": { "operationId": "server_id_ip_post", "parameters": [ { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": false, "properties": { "domain": { "description": "Hostname", "format": "hostname", "minLength": 1, "type": "string" }, "family": { "description": "Address type", "enum": [ "ipv4", "ipv6" ], "type": "string" }, "ip_name": { "format": "ipnet", "description": "IP address or subnet that will be allocated", "type": "string" }, "ip_net": { "description": "Network ID in IPmanager 6", "type": "integer" }, "temporary": { "description": "Address is temporary", "type": "boolean" }, "set_as_main_ip": { "description": "Set IP as the primary IP address of the server", "type": "boolean" }, "set_as_main_ipv4": { "description": "Set IP as the primary IP address of the server", "type": "boolean", "deprecated": true } }, "required": [ "family", "ip_net", "ip_name" ], "type": "object" }, { "additionalProperties": false, "properties": { "domain": { "description": "Hostname", "format": "hostname", "minLength": 1, "type": "string" }, "family": { "description": "Address type", "enum": [ "ipv4", "ipv6" ], "type": "string" }, "ip_name": { "format": "ipnet", "description": "IP address or subnet that will be allocated", "type": "string" }, "userspace": { "description": "Userspace ID in IPmanager 6", "type": "integer" }, "prefix": { "description": "The allocated subnet prefix", "type": "integer", "example": 32, "minimum": 25, "maximum": 128 }, "temporary": { "description": "Address is temporary", "type": "boolean" }, "set_as_main_ip": { "description": "Set IP as the primary IP address of the server", "type": "boolean" }, "set_as_main_ipv4": { "description": "Set IP as the primary IP address of the server", "type": "boolean", "deprecated": true } }, "required": [ "family", "ip_name" ], "type": "object" }, { "additionalProperties": false, "properties": { "domain": { "description": "Hostname", "format": "hostname", "minLength": 1, "type": "string" }, "family": { "description": "Address type", "enum": [ "ipv4", "ipv6" ], "type": "string" }, "ip_pool": { "description": "IP pool in IPmanager 6", "type": "integer" }, "prefix": { "description": "The allocated subnet prefix", "type": "integer", "example": 32, "minimum": 25, "maximum": 128 }, "temporary": { "description": "Address is temporary", "type": "boolean" }, "set_as_main_ip": { "description": "Set IP as the primary IP address of the server", "type": "boolean" }, "set_as_main_ipv4": { "description": "Set IP as the primary IP address of the server", "type": "boolean", "deprecated": true } }, "required": [ "family", "ip_pool" ], "type": "object" }, { "additionalProperties": false, "properties": { "domain": { "description": "Hostname", "format": "hostname", "minLength": 1, "type": "string" }, "vpu_net": { "description": "VPU network unique identifier", "type": "integer" }, "temporary": { "description": "Address is temporary", "type": "boolean" } }, "required": [ "vpu_net" ], "type": "object" } ] } } } }, "responses": { "200": { "description": "IP has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving IP", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Create IP", "tags": [ "ip" ] } }, "/server/{server_id}/ip/{ip_id}": { "delete": { "operationId": "server_id_ip_id_delete", "parameters": [ { "description": "Ip address unique identifier", "in": "path", "name": "ip_id", "required": true, "schema": { "type": "integer" } }, { "description": "Server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "IP address has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting IP address", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete IP address", "tags": [ "ip" ] } }, "/ip": { "get": { "operationId": "ip_get", "responses": { "200": { "description": "List of IP addresses has been received", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "properties": { "domain": { "type": "string" }, "family": { "enum": [ "ipv4", "ipv6" ], "type": "string" }, "gateway": { "type": "string" }, "first": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "network": { "type": "string" }, "server": { "type": "string" }, "temporary": { "type": "boolean", "description": "Address is temporary" }, "status": { "enum": [ "allocating", "ok", "fail", "allocation_fail", "in_progress", "deleting" ], "type": "string" }, "status_info": { "type": "object" }, "type": { "enum": [ "common", "vpu" ], "type": "string", "default": "common", "description": "The IP-address type" }, "vpu_net": { "type": "integer", "description": "The unique VPU network identifier to which the IP-address belongs" }, "vpu_vlan": { "type": "integer", "description": "The VLAN identifier of the VPU network" } }, "type": "object" }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Error receiving a list of IP addresses", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive a list of IP addresses", "tags": [ "ip" ] } }, "/ip/{ip_id}": { "delete": { "operationId": "ip_id_delete", "parameters": [ { "description": "IP address unique identifier", "in": "path", "name": "ip_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Ip address has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting IP address", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete IP address", "tags": [ "ip" ] }, "get": { "operationId": "ip_id_get", "parameters": [ { "description": "IP address unique identifier", "in": "path", "name": "ip_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "IP has been received", "content": { "application/json": { "schema": { "properties": { "domain": { "type": "string" }, "family": { "enum": [ "ipv4", "ipv6" ], "type": "string" }, "gateway": { "type": "string" }, "first": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "network": { "type": "string" }, "server": { "type": "string" }, "temporary": { "type": "boolean", "description": "Address is temporary" }, "status": { "enum": [ "allocating", "ok", "fail", "allocation_fail", "in_progress", "deleting" ], "type": "string" }, "status_info": { "type": "object" }, "type": { "enum": [ "common", "vpu" ], "type": "string", "default": "common", "description": "The IP-address type" }, "vpu_net": { "type": "integer", "description": "The unique VPU network identifier to which the IP-address belongs" }, "vpu_vlan": { "type": "integer", "description": "The VLAN identifier of the VPU network" } }, "type": "object" } } } }, "default": { "description": "Error receiving IP address", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Receive IP address", "tags": [ "ip" ] }, "post": { "operationId": "ip_id_post", "parameters": [ { "description": "IP address unique identifier", "in": "path", "name": "ip_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "domain": { "description": "Hostname", "format": "hostname", "minLength": 1, "type": "string" }, "temporary": { "description": "Address is temporary", "type": "boolean" } }, "type": "object" } } } }, "responses": { "200": { "description": "IP has been saved successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving IP address", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit IP", "tags": [ "ip" ] } }, "/supported_pdu": { "get": { "operationId": "supported_pdu_get", "summary": "List of supported PDU", "tags": [ "pdu" ], "responses": { "200": { "description": "List of supported PDU has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "list": { "type": "array", "items": { "type": "object", "properties": { "name": { "description": "Device type", "type": "string", "example": "cisco_snmp" }, "protocol": { "description": "Protocols for device management", "type": "array", "items": { "type": "string" } }, "features": { "description": "Features is provided by the device", "type": "array", "items": { "type": "string", "enum": [ "port_aggregation" ] } } } } } } } } } }, "default": { "description": "Error receiving a list of supported PDU", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/pdu": { "post": { "operationId": "pdu_post", "summary": "Create PDU", "tags": [ "pdu" ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "required": [ "name", "ip", "device", "rack" ], "type": "object", "properties": { "device": { "description": "Device handler", "type": "string" }, "ip": { "description": "PDU IP address", "example": "127.0.0.1", "format": "ipv4", "type": "string" }, "name": { "description": "PDU name", "example": "my key name", "pattern": "^[^ ]", "type": "string" }, "note": { "description": "Comment", "type": "string" }, "rack": { "description": "Rack unique identifier", "example": "1", "type": "integer" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "snmp_params": { "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "Community", "type": "string" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } }, "custom_params": { "description": "Custom connection parameters", "type": "object" }, "serial_number": { "description": "Serial number", "type": "string", "maxLength": 255, "example": "CVPF636659YC450RMD" }, "delivery": { "description": "The delivery unique identifier", "type": "integer", "example": 10, "nullable": true }, "price": { "description": "The PDU price", "example": 2345.5, "nullable": true, "type": "number", "format": "double" }, "nomenclature": { "description": "The PDU nomenclature", "example": "00000001679845", "type": "string" }, "warranty": { "description": "Warranty expiration date", "example": "2022-10-31", "nullable": true, "type": "string", "format": "date" }, "warehouse": { "description": "Warehouse unique identifier", "type": "integer" }, "model": { "description": "Type or model", "maxLength": 255, "example": "ATS", "type": "string" }, "warehouse_port_count": { "description": "Total number of PDU sockets", "type": "integer", "minimum": 0, "maximum": 65535, "nullable": true }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "responses": { "200": { "description": "PDU has been created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error creating PDU", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "get": { "operationId": "pdu_get", "summary": "PDU list", "tags": [ "pdu" ], "responses": { "200": { "description": "PDU list", "content": { "application/json": { "schema": { "type": "object", "properties": { "list": { "type": "array", "items": { "type": "object", "properties": { "id": { "description": "PDU device identifier", "type": "integer" }, "device": { "description": "PDU handler type", "type": "string" }, "ip": { "description": "PDU IP address", "type": "string" }, "status": { "type": "string", "description": "Device status: * ok - device is ok * fail - lost connection with device * process_status - device poll in progress\n", "enum": [ "ok", "fail", "process_status" ] }, "status_info": { "type": "object", "description": "Detailed description of issues with device" }, "name": { "description": "Device name", "type": "string" }, "note": { "description": "Comment", "type": "string" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "location_id": { "type": "integer", "description": "Location identifier" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "last_update": { "description": "Date of the last device poll", "type": "string" }, "last_success_update": { "description": "Date of the last successful device poll", "type": "string" }, "total_port": { "description": "Total number of device ports", "type": "integer" }, "using_port": { "description": "Ports in use", "type": "integer" }, "snmp_params": { "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "Community", "type": "string" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } }, "custom_params": { "description": "Custom connection parameters", "type": "object" }, "additional_info": { "description": "Additional PDU info", "type": "object" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } } } } }, "default": { "description": "Error receiving PDU list", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/pdu/{pdu_id}": { "get": { "operationId": "pdu_id_get", "summary": "PDU", "parameters": [ { "description": "PDU unique identifier", "in": "path", "name": "pdu_id", "required": true, "schema": { "type": "integer" } } ], "tags": [ "pdu" ], "responses": { "200": { "description": "PDU", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "description": "PDU device identifier", "type": "integer" }, "device": { "description": "PDU handler type", "type": "string" }, "ip": { "description": "PDU IP address", "type": "string" }, "status": { "type": "string", "description": "Device status: * ok - device is ok * fail - lost connection with device * process_status - device poll in progress\n", "enum": [ "ok", "fail", "process_status" ] }, "status_info": { "type": "object", "description": "Detailed description of issues with device" }, "name": { "description": "Device name", "type": "string" }, "note": { "description": "Comment", "type": "string" }, "rack": { "properties": { "id": { "description": "Rack identifier", "type": "integer" }, "name": { "description": "Rack name", "type": "string" }, "size": { "description": "Rack size", "type": "integer" } }, "type": "object" }, "location": { "properties": { "geolocation": { "description": "Location address", "example": "1st Street, 25", "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "userspace": { "description": "Userspace ID in IPmgr6 for pools and networks of this location", "type": "integer" } }, "type": "object" }, "location_id": { "type": "integer", "description": "Location identifier" }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "last_update": { "description": "Date of the last device poll", "type": "string" }, "last_success_update": { "description": "Date of the last successful device poll", "type": "string" }, "total_port": { "description": "Total number of device ports", "type": "integer" }, "using_port": { "description": "Ports in use", "type": "integer" }, "snmp_params": { "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "Community", "type": "string" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } }, "custom_params": { "description": "Custom connection parameters", "type": "object" }, "additional_info": { "description": "Additional PDU info", "type": "object" }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "default": { "description": "Error receiving PDU", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "delete": { "operationId": "pdu_id_delete", "summary": "Delete PDU", "tags": [ "pdu" ], "parameters": [ { "description": "PDU unique identifier", "in": "path", "name": "pdu_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "PDU has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting PDU", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "post": { "operationId": "pdu_id_post", "summary": "Edit PDU", "tags": [ "pdu" ], "parameters": [ { "description": "PDU unique identifier", "in": "path", "name": "pdu_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "ip": { "description": "PDU IP address", "example": "127.0.0.1", "format": "ipv4", "type": "string" }, "name": { "description": "PDU name", "example": "my key name", "pattern": "^[^ ]", "type": "string" }, "note": { "description": "Comment", "type": "string" }, "unit": { "description": "Starting unit of an entity in the rack", "type": "number", "multipleOf": 0.5, "minimum": 1, "maximum": 99, "example": "1", "nullable": true }, "size": { "description": "Size of an entity in the rack in units", "type": "number", "multipleOf": 0.5, "minimum": 0, "maximum": 99, "example": "1", "nullable": true }, "rack": { "description": "Rack unique identifier", "example": "1", "type": "integer" }, "snmp_params": { "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "Community", "type": "string" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } }, "custom_params": { "description": "Custom connection parameters", "type": "object" }, "device": { "description": "Device(Only if not already set)", "type": "string" }, "warehouse_status": { "description": "Warehouse device status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_rack` - The server is in the rack * `written_off` - The server has been written off * `reserved` - The server is reserved * `under_repair` - The server under repair * `broken` - The server is broken\n", "type": "string", "enum": [ "in_warehouse", "in_rack", "written_off", "reserved", "under_repair", "broken" ] }, "custom_field": { "description": "Custom fields of the entity", "type": "object" } } } } } }, "responses": { "200": { "description": "PDU has been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error editing PDU", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/pdu/{pdu_id}/info": { "post": { "operationId": "pdu_id_info_post", "parameters": [ { "description": "The pdu unique identifier", "in": "path", "name": "pdu_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "ports": { "type": "array", "items": { "type": "object", "properties": { "identity": { "description": "The unique identity of PDU port from device", "type": "string" }, "power_status": { "description": "PDU port status: * up - port enabled * down - port disabled * unknown - unknown port status (does not correspond to up/down)\n", "enum": [ "unknown", "up", "down" ], "type": "string" } } } }, "additional_info": { "description": "Additional PDU info", "type": "object" }, "pdu_error": { "type": "object", "description": "The pdu error description", "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } } } } } } } }, "responses": { "200": { "description": "Pdu port data have been edited successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error saving pdu port data", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Edit pdu port information (internal only)", "tags": [ "pdu" ] } }, "/pdu/{pdu_id}/status": { "post": { "operationId": "pdu_id_status", "summary": "Poll PDU", "tags": [ "pdu" ], "parameters": [ { "description": "PDU unique identifier", "in": "path", "name": "pdu_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": {}, "type": "object" } } } }, "responses": { "200": { "description": "PDU poll task has been registered", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "task": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error creating PDU poll task", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/pdu/{pdu_id}/port": { "get": { "operationId": "pdu_port_get", "parameters": [ { "description": "PDU unique identifier", "in": "path", "name": "pdu_id", "required": true, "schema": { "type": "integer" } } ], "summary": "List of PDU ports", "tags": [ "pdu" ], "responses": { "200": { "description": "Ports list has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "list": { "type": "array", "items": { "properties": { "id": { "description": "Port identifier", "type": "integer" }, "identity": { "description": "Port identifier in PDU", "type": "integer" }, "pdu": { "description": "PDU identifier", "type": "integer" }, "power_status": { "description": "PDU port status: * up - port enabled * down - port disabled * unknown - unknown port status (does not correspond to up/down)\n", "enum": [ "unknown", "up", "down" ], "type": "string" }, "connection_type": { "description": "Port connection status * free - available * connected - connected to server * service - service port\n", "enum": [ "free", "connected", "service" ], "type": "string" }, "connection_type_info": { "description": "Additional information about service connections", "type": "string" }, "note": { "description": "Comment to port", "type": "string" }, "server": { "type": "object", "description": "Server connected to port", "properties": { "id": { "description": "Server identifier", "type": "integer" }, "name": { "description": "Server name", "type": "string" }, "rack": { "description": "Rack where server is located", "type": "integer" }, "connection_id": { "description": "Connection identifier", "type": "integer" } } } }, "type": "object" } } } } } } }, "default": { "description": "Error receiving list of ports", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/pdu/{pdu_id}/port/{port_id}": { "get": { "operationId": "pdu_port_get_id", "parameters": [ { "description": "PDU unique i