PDF
Download PDF
Download page DCImanager 6 API.
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": "list",
"description": "Common lightweight list handler"
},
{
"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,
"type": "object",
"required": [
"name",
"size",
"server_slot_count",
"unit"
],
"properties": {
"name": {
"description": "Chassis name",
"type": "string",
"minLength": 1,
"maxLength": 255,
"example": "Multix4DE5"
},
"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",
"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"
},
"warehouse": {
"description": "The warehouse unique identifier",
"type": "integer",
"example": 1
},
"delivery": {
"description": "The delivery unique identifier",
"type": "integer",
"example": 10,
"nullable": true
},
"serial_number": {
"description": "Serial number",
"type": "string",
"maxLength": 255,
"example": "CVPF636659YC450RMD"
},
"nomenclature": {
"description": "The chassis nomenclature",
"example": 1679845,
"type": "string"
},
"price": {
"description": "The chassis price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"model": {
"description": "Type or model",
"maxLength": 255,
"example": "RSV-L4412U",
"type": "string"
},
"warranty": {
"description": "Warranty expiration date",
"example": "2022-10-31",
"nullable": true,
"type": "string",
"format": "date"
}
}
}
}
}
},
"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"
},
"created_at": {
"description": "Chassis creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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
},
"exploitation_status": {
"description": "Exploitation status",
"type": "string",
"enum": [
"in_exploitation",
"not_in_exploitation"
]
},
"used": {
"description": "Number of slots in use",
"type": "integer"
},
"model": {
"description": "Type or model",
"maxLength": 255,
"example": "RSV-L4412U",
"type": "string"
},
"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_slot": {
"get": {
"operationId": "chassis_slots",
"responses": {
"200": {
"description": "List of chassis slots has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"chassis_id": {
"type": "integer",
"description": "Unique chassis identifier"
},
"slots": {
"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"
}
}
}
}
}
}
}
}
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"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"
]
}
},
"/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"
},
"created_at": {
"description": "Chassis creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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
},
"exploitation_status": {
"description": "Exploitation status",
"type": "string",
"enum": [
"in_exploitation",
"not_in_exploitation"
]
},
"used": {
"description": "Number of slots in use",
"type": "integer"
},
"model": {
"description": "Type or model",
"maxLength": 255,
"example": "RSV-L4412U",
"type": "string"
},
"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"
},
"warehouse_status": {
"description": "Warehouse chassis status. Statuses: * `in_warehouse` - The chassis is in the warehouse * `in_rack` - The chassis is in the rack * `written_off` - The chassis has been written off * `reserved` - The chassis is reserved * `under_repair` - The chassis under repair * 'in_laboratory' - The chassis in laboratory * `broken` - The chassis is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"written_off",
"reserved",
"under_repair",
"in_laboratory",
"broken"
]
},
"model": {
"description": "Type or model",
"maxLength": 255,
"example": "RSV-L4412U",
"type": "string"
}
}
}
}
}
},
"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"
]
}
},
"/warehouse/chassis": {
"get": {
"operationId": "warehouse_chassis_get",
"responses": {
"200": {
"description": "Chassis in warehouse have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"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
},
"note": {
"type": "string"
},
"server_slot_count": {
"type": "integer"
},
"model": {
"description": "Type or model",
"example": "RSV-L4412U",
"type": "string"
},
"uuid": {
"description": "Universally unique identifier",
"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"
},
"unit": {
"description": "Starting unit of an entity in the rack",
"type": "number",
"multipleOf": 0.5,
"minimum": 1,
"maximum": 99,
"example": "1",
"nullable": true
},
"exploitation_status": {
"description": "Exploitation status",
"type": "string",
"enum": [
"in_exploitation",
"not_in_exploitation"
]
},
"serial_number": {
"description": "Serial number",
"type": "string",
"example": "CVPF636659YC450RMD"
},
"barcode": {
"description": "Barcode of chassis",
"type": "string",
"example": "chassis_518957bd95"
},
"created_at": {
"description": "Creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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 chassis price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The chassis nomenclature",
"example": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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"
},
"warehouse": {
"description": "The warehouse unique identifier",
"type": "integer",
"example": 1
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving warehouse chassis 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 chassis in warehouse",
"tags": [
"chassis",
"warehouse"
]
}
},
"/warehouse/{warehouse_id}/chassis": {
"get": {
"operationId": "warehouse_id_chassis_get",
"parameters": [
{
"description": "Warehouse unique identifier",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Chassis in warehouse have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"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
},
"note": {
"type": "string"
},
"server_slot_count": {
"type": "integer"
},
"model": {
"description": "Type or model",
"example": "RSV-L4412U",
"type": "string"
},
"uuid": {
"description": "Universally unique identifier",
"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"
},
"unit": {
"description": "Starting unit of an entity in the rack",
"type": "number",
"multipleOf": 0.5,
"minimum": 1,
"maximum": 99,
"example": "1",
"nullable": true
},
"exploitation_status": {
"description": "Exploitation status",
"type": "string",
"enum": [
"in_exploitation",
"not_in_exploitation"
]
},
"serial_number": {
"description": "Serial number",
"type": "string",
"example": "CVPF636659YC450RMD"
},
"barcode": {
"description": "Barcode of chassis",
"type": "string",
"example": "chassis_518957bd95"
},
"created_at": {
"description": "Creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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 chassis price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The chassis nomenclature",
"example": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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"
},
"warehouse": {
"description": "The warehouse unique identifier",
"type": "integer",
"example": 1
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving warehouse chassis 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 chassis in warehouse",
"tags": [
"chassis",
"warehouse"
]
},
"post": {
"operationId": "warehouse_id_chassis_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",
"server_slot_count"
],
"type": "object",
"properties": {
"name": {
"description": "Chassis name",
"type": "string",
"minLength": 1,
"maxLength": 255,
"example": "Multix4DE5"
},
"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"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
},
"warehouse_status": {
"description": "Warehouse chassis status. Statuses: * `in_warehouse` - The chassis is in the warehouse * `in_rack` - The chassis is in the rack * `written_off` - The chassis has been written off * `reserved` - The chassis is reserved * `under_repair` - The chassis under repair * 'in_laboratory' - The chassis in laboratory * `broken` - The chassis is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"written_off",
"reserved",
"under_repair",
"in_laboratory",
"broken"
]
},
"delivery": {
"description": "The delivery unique identifier",
"type": "integer",
"example": 10,
"nullable": true
},
"serial_number": {
"description": "Serial number",
"type": "string",
"maxLength": 255,
"example": "CVPF636659YC450RMD"
},
"nomenclature": {
"description": "The chassis nomenclature",
"example": 1679845,
"type": "string"
},
"price": {
"description": "The chassis price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"model": {
"description": "Type or model",
"maxLength": 255,
"example": "RSV-L4412U",
"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"
}
}
}
}
}
},
"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",
"warehouse"
]
}
},
"/warehouse/chassis/{chassis_id}": {
"get": {
"operationId": "warehouse_chassis_id_get",
"parameters": [
{
"description": "Chassis unique identifier or UUID",
"in": "path",
"name": "chassis_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Warehouse chassis has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"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
},
"note": {
"type": "string"
},
"server_slot_count": {
"type": "integer"
},
"model": {
"description": "Type or model",
"example": "RSV-L4412U",
"type": "string"
},
"uuid": {
"description": "Universally unique identifier",
"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"
},
"unit": {
"description": "Starting unit of an entity in the rack",
"type": "number",
"multipleOf": 0.5,
"minimum": 1,
"maximum": 99,
"example": "1",
"nullable": true
},
"exploitation_status": {
"description": "Exploitation status",
"type": "string",
"enum": [
"in_exploitation",
"not_in_exploitation"
]
},
"serial_number": {
"description": "Serial number",
"type": "string",
"example": "CVPF636659YC450RMD"
},
"barcode": {
"description": "Barcode of chassis",
"type": "string",
"example": "chassis_518957bd95"
},
"created_at": {
"description": "Creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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 chassis price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The chassis nomenclature",
"example": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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"
},
"warehouse": {
"description": "The warehouse unique identifier",
"type": "integer",
"example": 1
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
}
}
}
},
"default": {
"description": "Warehouse 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 information about chassis in warehouse",
"tags": [
"chassis",
"warehouse"
]
},
"post": {
"operationId": "warehouse_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"
},
"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"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
},
"warehouse": {
"description": "The warehouse unique identifier",
"type": "integer",
"example": 1
},
"warehouse_status": {
"description": "Warehouse chassis status. Statuses: * `in_warehouse` - The chassis is in the warehouse * `in_rack` - The chassis is in the rack * `written_off` - The chassis has been written off * `reserved` - The chassis is reserved * `under_repair` - The chassis under repair * 'in_laboratory' - The chassis in laboratory * `broken` - The chassis is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"written_off",
"reserved",
"under_repair",
"in_laboratory",
"broken"
]
},
"delivery": {
"description": "The delivery unique identifier",
"type": "integer",
"example": 10,
"nullable": true
},
"serial_number": {
"description": "Serial number",
"type": "string",
"maxLength": 255,
"example": "CVPF636659YC450RMD"
},
"nomenclature": {
"description": "The chassis nomenclature",
"example": 1679845,
"type": "string"
},
"price": {
"description": "The chassis price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"warranty": {
"description": "Warranty expiration date",
"example": "2022-10-31",
"nullable": true,
"type": "string",
"format": "date"
},
"reserved_to_date": {
"description": "Reserved to date",
"example": "2020-10-31",
"nullable": true,
"type": "string",
"format": "date"
},
"model": {
"description": "Type or model",
"maxLength": 255,
"example": "RSV-L4412U",
"type": "string"
}
}
}
}
}
},
"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"
]
}
},
"/warehouse/chassis/{chassis_id}/remove": {
"post": {
"operationId": "warehouse_chassis_id_remove_post",
"parameters": [
{
"description": "Chassis unique identifier",
"in": "path",
"name": "chassis_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": "Chassis has been removed successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error removing chassis",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Removes chassis",
"tags": [
"chassis",
"warehouse"
]
}
},
"/firmware": {
"post": {
"operationId": "firmware_post",
"summary": "Create firmware file record",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"description": "Firmware file name",
"type": "string"
},
"url": {
"description": "URL for download firmware",
"type": "string"
},
"type": {
"description": "Firmware file type",
"type": "string",
"enum": [
"bios",
"bmc"
]
},
"version": {
"description": "Firmware version",
"type": "string",
"default": ""
},
"available_platforms": {
"description": "List of platforms the firmware installed on",
"type": "array",
"minItems": 1,
"items": {
"type": "integer",
"description": "The platform identifier"
}
},
"note": {
"description": "Firmware note",
"type": "string",
"default": ""
}
},
"required": [
"type",
"name",
"available_platforms"
]
}
}
}
},
"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"
]
},
"get": {
"operationId": "firmware_get",
"summary": "Get info about all firmware",
"responses": {
"200": {
"description": "Firmware`s received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"created_at": {
"description": "Firmware file create datetime",
"type": "string"
},
"id": {
"description": "Firmware file ID",
"type": "integer"
},
"name": {
"description": "Firmware file name",
"type": "string"
},
"path": {
"description": "Firmware file path",
"type": "string"
},
"version": {
"description": "Firmware version",
"type": "string"
},
"available_platforms": {
"description": "List of platforms the firmware could be installed on",
"type": "array",
"items": {
"type": "object",
"description": "The platform information",
"properties": {
"id": {
"type": "integer",
"description": "The platform identifier"
},
"name": {
"type": "integer",
"description": "The platform name"
}
}
}
},
"note": {
"description": "Firmware note",
"type": "string"
},
"status": {
"type": "string",
"description": "Status of the firmware * `created` - the firmware is waiting for uploading * `uploading` - the firmware is uploading * `uploaded` - the firmware has been uploaded * `upload_failed` - failed to upload the firmware. Look into `status_info` for details * `removing` - the firmware is removing * `remove_failed` - failed to remove the firmware. Look into `status_info` for details\n",
"enum": [
"created",
"uploading",
"uploaded",
"upload_failed",
"removing",
"remove_failed"
]
},
"status_info": {
"description": "Firmware file current status information",
"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 list of firmware",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"tags": [
"firmware"
]
}
},
"/firmware/{firmware_id}": {
"post": {
"operationId": "firmware_firmare_id_post",
"summary": "Edit firmware file record",
"parameters": [
{
"description": "Firmware unique identifier",
"in": "path",
"name": "firmware_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"description": "Firmware file name",
"type": "string"
},
"version": {
"description": "Firmware version",
"type": "string"
},
"note": {
"description": "Firmware note",
"type": "string"
},
"available_platforms": {
"description": "List of platforms the firmware installed on",
"type": "array",
"minItems": 1,
"items": {
"type": "integer",
"description": "The platform identifier"
}
},
"status": {
"type": "string",
"description": "Status of the firmware * `created` - the firmware is waiting for uploading * `uploading` - the firmware is uploading * `uploaded` - the firmware has been uploaded * `upload_failed` - failed to upload the firmware. Look into `status_info` for details * `removing` - the firmware is removing * `remove_failed` - failed to remove the firmware. Look into `status_info` for details\n",
"enum": [
"created",
"uploading",
"uploaded",
"upload_failed",
"removing",
"remove_failed"
]
},
"status_info": {
"description": "Firmware status information",
"type": "object",
"nullable": true
}
}
}
}
}
},
"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"
]
},
"delete": {
"operationId": "firmware_firmware_id_delete",
"summary": "Delete firmware file record",
"parameters": [
{
"description": "Firmware unique identifier",
"in": "path",
"name": "firmware_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Firmware file has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting 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"
]
},
"get": {
"operationId": "firmware_firmare_id_get",
"summary": "Getting information about firmware",
"parameters": [
{
"description": "Firmware unique identifier",
"in": "path",
"name": "firmware_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Firmware received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"created_at": {
"description": "Firmware file create datetime",
"type": "string"
},
"id": {
"description": "Firmware file ID",
"type": "integer"
},
"name": {
"description": "Firmware file name",
"type": "string"
},
"path": {
"description": "Firmware file path",
"type": "string"
},
"version": {
"description": "Firmware version",
"type": "string"
},
"available_platforms": {
"description": "List of platforms the firmware could be installed on",
"type": "array",
"items": {
"type": "object",
"description": "The platform information",
"properties": {
"id": {
"type": "integer",
"description": "The platform identifier"
},
"name": {
"type": "integer",
"description": "The platform name"
}
}
}
},
"note": {
"description": "Firmware note",
"type": "string"
},
"status": {
"type": "string",
"description": "Status of the firmware * `created` - the firmware is waiting for uploading * `uploading` - the firmware is uploading * `uploaded` - the firmware has been uploaded * `upload_failed` - failed to upload the firmware. Look into `status_info` for details * `removing` - the firmware is removing * `remove_failed` - failed to remove the firmware. Look into `status_info` for details\n",
"enum": [
"created",
"uploading",
"uploaded",
"upload_failed",
"removing",
"remove_failed"
]
},
"status_info": {
"description": "Firmware file current status information",
"oneOf": [
{
"type": "object"
},
{
"type": "string"
}
]
},
"type": {
"description": "Firmware file type",
"type": "string",
"enum": [
"bios",
"bmc"
]
}
}
}
}
}
},
"default": {
"description": "Error receiving firmware information",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"tags": [
"firmware"
]
}
},
"/firmware/{firmware_id}/location/{location_id}/upload": {
"post": {
"operationId": "firmware_firmare_id_location_location_id_upload_post",
"summary": "Upload firmware to location",
"parameters": [
{
"description": "Firmware unique identifier",
"in": "path",
"name": "firmware_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"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": "Firmware file uploading to location",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error while try send file to location",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"tags": [
"firmware"
]
}
},
"/firmware/{firmware_id}/cancel": {
"post": {
"operationId": "firmware_firmare_id_cancel_post",
"summary": "Cancel firmware operation",
"parameters": [
{
"description": "Firmware unique identifier",
"in": "path",
"name": "firmware_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "All operations with firmware canceled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error while try cancel firmware operation",
"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": {
"additionalProperties": false,
"type": "object",
"properties": {
"bmc_id": {
"description": "Bmc unique identifier",
"type": "integer"
},
"type": {
"description": "Firmware file type",
"type": "string",
"enum": [
"bios",
"bmc"
]
}
},
"required": [
"bmc_id",
"type"
]
}
}
}
},
"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"
]
}
},
"/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"
]
}
},
"/intel_amt_connection_info": {
"get": {
"operationId": "intel_amt_connection_info_get",
"responses": {
"200": {
"description": "List of IntelAmt connections info 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 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 IntelAmt connections",
"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"
]
}
},
"/intel_amt_status_info": {
"post": {
"operationId": "intel_amt_status_info_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"entities": {
"items": {
"type": "integer"
},
"description": "List of unique identifiers of IntelAmt 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": "IntelAmt status info have been edited successfully",
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving IntelAmt 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 IntelAmt 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"
},
"os_info": {
"type": "string",
"description": "OS and version on the server-location"
}
},
"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"
},
"os_info": {
"type": "string",
"description": "OS and version on the server-location"
}
},
"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
},
"ip_filter": {
"description": "Addresses that will not be taken into account in statistics",
"type": "array",
"items": {
"example": "172.31.41.41/24",
"type": "string"
},
"minItems": 0,
"default": []
}
},
"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/userspace/sync": {
"post": {
"operationId": "location_sync_userspace_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"userspace": {
"items": {
"type": "object",
"properties": {
"old_id": {
"type": "integer",
"description": "Old userspace id (local ipmgr)"
},
"new_id": {
"type": "integer",
"description": "New userspace id (remote ipmgr)"
}
}
},
"type": "array"
}
},
"required": [
"userspace"
]
}
}
}
},
"responses": {
"200": {
"description": "Location userspaces has been synchronized successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error synchronizing location userspaces",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Synchronize location userspaces",
"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"
}
}
}
}
}
}
},
"/bios_attr_operation": {
"get": {
"operationId": "bios_attr_operation",
"responses": {
"200": {
"description": "List of bios attribures operation has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"id": {
"description": "Bios attribure operation unique identifier",
"type": "integer"
},
"ipmi": {
"description": "Ipmi unique identifier",
"type": "integer"
},
"server_id": {
"description": "Server unique identifier",
"type": "integer"
},
"server_name": {
"description": "Server name",
"type": "string"
},
"status": {
"description": "Bios attribure operation status",
"enum": [
"ok",
"waiting",
"running",
"failed"
],
"type": "string"
},
"status_info": {
"description": "Bios attribure operation status_info",
"type": "object"
},
"attributes": {
"description": "Bios attributes",
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of bios attribures operation",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Getting list of bios attribures operation",
"tags": [
"ipmi"
]
}
},
"/bios_attr_operation/{operation_id}": {
"get": {
"operationId": "bios_attr_operation_operation_id",
"parameters": [
{
"description": "Bios attribures operation unique identifier",
"in": "path",
"name": "operation_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Bios attribures operation has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"description": "Bios attribure operation unique identifier",
"type": "integer"
},
"ipmi": {
"description": "Ipmi unique identifier",
"type": "integer"
},
"server_id": {
"description": "Server unique identifier",
"type": "integer"
},
"server_name": {
"description": "Server name",
"type": "string"
},
"status": {
"description": "Bios attribure operation status",
"enum": [
"ok",
"waiting",
"running",
"failed"
],
"type": "string"
},
"status_info": {
"description": "Bios attribure operation status_info",
"type": "object"
},
"attributes": {
"description": "Bios attributes",
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving bios attribures operation",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Getting bios attribures operation",
"tags": [
"ipmi"
]
}
},
"/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"
}
},
"bios_attributes": {
"description": "BIOS attributes",
"type": "object"
}
},
"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"
}
},
"bios_attributes": {
"description": "BIOS attributes",
"type": "object"
}
},
"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",
"minLength": 1,
"maxLength": 255
},
"type": {
"description": "IPMI type",
"enum": [
"IPMI v1.5/v2",
"IPMI v2(lanplus)",
"lan",
"lanplus",
"redfish_v1"
],
"type": "string"
},
"user": {
"description": "Username",
"maxLength": 255,
"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}/bios_attr": {
"get": {
"operationId": "ipmi_id_bios_attr_get",
"parameters": [
{
"description": "IPMI unique identifier",
"in": "path",
"name": "ipmi_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Bios menu schema has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"bios_layout": {
"description": "Bios layout schema",
"type": "object"
}
},
"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 bios menu schema",
"tags": [
"ipmi"
]
},
"post": {
"operationId": "ipmi_id_bios_attr_post",
"parameters": [
{
"description": "IPMI unique identifier",
"in": "path",
"name": "ipmi_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"attributes": {
"description": "Bios attribures",
"type": "object"
}
},
"type": "object",
"required": [
"attributes"
]
}
}
}
},
"responses": {
"200": {
"description": "Bios attributes has been saved successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving bios attributes",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Saving bios attributes",
"tags": [
"ipmi"
]
}
},
"/ipmi/{ipmi_id}/last_bios_attr_operation": {
"get": {
"operationId": "ipmi_id_last_bios_attr_operation",
"parameters": [
{
"description": "IPMI unique identifier",
"in": "path",
"name": "ipmi_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Last bios attribures operation has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"description": "Bios attribure operation unique identifier",
"type": "integer"
},
"ipmi": {
"description": "Ipmi unique identifier",
"type": "integer"
},
"server_id": {
"description": "Server unique identifier",
"type": "integer"
},
"server_name": {
"description": "Server name",
"type": "string"
},
"status": {
"description": "Bios attribure operation status",
"enum": [
"ok",
"waiting",
"running",
"failed"
],
"type": "string"
},
"status_info": {
"description": "Bios attribure operation status_info",
"type": "object"
},
"attributes": {
"description": "Bios attributes",
"type": "object"
}
},
"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 last bios attribures operation",
"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": 255,
"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": 255,
"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}/bmc_reset": {
"post": {
"operationId": "ipmi_id_bmc_reset",
"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": {
"type": "object",
"properties": {
"reset_type": {
"description": "The BMC reset type",
"type": "string",
"enum": [
"soft",
"hard"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "BMC has been successfully reseted",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error resetting BMC",
"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",
"minLength": 1,
"maxLength": 255
},
"type": {
"description": "IPMI type",
"enum": [
"IPMI v1.5/v2",
"IPMI v2(lanplus)",
"lan",
"lanplus",
"redfish_v1"
],
"type": "string"
},
"user": {
"description": "Username",
"maxLength": 255,
"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"
},
"mc_info": {
"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_bios_attributes": {
"post": {
"operationId": "ipmi_bios_settings_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"entities": {
"items": {
"type": "integer"
},
"description": "List of unique identifiers of BMC devices",
"type": "array"
},
"manufacturer": {
"type": "string",
"description": "Manufacturer of BIOS"
},
"bios_version": {
"type": "string",
"description": "BIOS version"
},
"attributes": {
"items": {
"type": "object"
},
"type": "array",
"description": "BIOS attributes"
}
},
"type": "object",
"required": [
"entities",
"manufacturer",
"bios_version"
]
}
}
}
},
"responses": {
"200": {
"description": "IPMI BIOS settings have been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving IPMI BIOS settings",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit IPMI BIOS settings (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"
},
"profile_id": {
"description": "Unique identifier of the profile that underwent the operation.",
"type": "integer"
},
"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"
}
}
},
"hardware": {
"description": "Server configuration field",
"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",
"nullable": true,
"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_address": {
"description": "LDAP/AD server address",
"type": "string"
},
"port": {
"description": "LDAP server port",
"type": "integer"
},
"bind_dn": {
"description": "LDAP/AD bind DN or username",
"type": "string"
},
"bind_password": {
"description": "LDAP/AD bind password or plain password",
"type": "string"
},
"base_dn": {
"description": "LDAP/AD base DN or search domain name",
"type": "string"
},
"user_dn": {
"description": "AD user domain name or LDAP attribute",
"type": "string"
},
"group_attr": {
"description": "LDAP group attribute",
"type": "string"
},
"username_attr": {
"description": "LDAP username attribute",
"type": "string"
},
"base_distinguished_names": {
"description": "LDAP base distinguished names",
"type": "array",
"items": {
"type": "string"
}
},
"domain_controller_addr": {
"description": "AD domain controller server addresses",
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Service status flag",
"type": "boolean",
"default": true
},
"encryption_type": {
"description": "Encryption type",
"type": "string",
"enum": [
"none",
"ssl",
"starttls"
]
},
"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"
},
"remote_user": {
"description": "Name of the remote LDAP user",
"type": "string"
}
}
}
},
"cert": {
"description": "The certificate",
"type": "string"
},
"cert_ca": {
"description": "CA of the certificate",
"type": "string"
},
"cert_key": {
"description": "The certificate key",
"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",
"nullable": true,
"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",
"nullable": true,
"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"
}
}
}
},
"dns": {
"description": "DNS server list",
"type": "array",
"items": {
"type": "string",
"description": "DNS server"
}
},
"bios_attributes": {
"description": "Bios attributes",
"type": "object",
"nullable": true
}
}
},
"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"
},
"created_at": {
"description": "Server creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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"
},
"status": {
"type": "string",
"description": "Address status"
}
},
"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"
},
"components_state": {
"description": "Components binding state",
"type": "string",
"enum": [
"ok",
"bind_error"
]
},
"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"
]
}
}
},
"se_health": {
"type": "object",
"description": "Server health error information",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the server error"
},
"severity": {
"type": "string",
"description": "Severity of the error"
},
"info": {
"type": "object",
"description": "Additional information about the error"
}
}
},
"maintenance": {
"type": "boolean",
"description": "Server maintenance mode"
}
},
"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": 1679845,
"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"
},
"maintenance": {
"type": "boolean",
"description": "Server maintenance mode"
}
}
},
{
"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": 1000,
"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": 1679845,
"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"
},
"maintenance": {
"type": "boolean",
"description": "Server maintenance mode"
}
}
}
]
}
}
}
},
"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, UUID, barcode or serial_number",
"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"
},
"profile_id": {
"description": "Unique identifier of the profile that underwent the operation.",
"type": "integer"
},
"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"
}
}
},
"hardware": {
"description": "Server configuration field",
"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",
"nullable": true,
"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_address": {
"description": "LDAP/AD server address",
"type": "string"
},
"port": {
"description": "LDAP server port",
"type": "integer"
},
"bind_dn": {
"description": "LDAP/AD bind DN or username",
"type": "string"
},
"bind_password": {
"description": "LDAP/AD bind password or plain password",
"type": "string"
},
"base_dn": {
"description": "LDAP/AD base DN or search domain name",
"type": "string"
},
"user_dn": {
"description": "AD user domain name or LDAP attribute",
"type": "string"
},
"group_attr": {
"description": "LDAP group attribute",
"type": "string"
},
"username_attr": {
"description": "LDAP username attribute",
"type": "string"
},
"base_distinguished_names": {
"description": "LDAP base distinguished names",
"type": "array",
"items": {
"type": "string"
}
},
"domain_controller_addr": {
"description": "AD domain controller server addresses",
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Service status flag",
"type": "boolean",
"default": true
},
"encryption_type": {
"description": "Encryption type",
"type": "string",
"enum": [
"none",
"ssl",
"starttls"
]
},
"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"
},
"remote_user": {
"description": "Name of the remote LDAP user",
"type": "string"
}
}
}
},
"cert": {
"description": "The certificate",
"type": "string"
},
"cert_ca": {
"description": "CA of the certificate",
"type": "string"
},
"cert_key": {
"description": "The certificate key",
"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",
"nullable": true,
"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",
"nullable": true,
"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"
}
}
}
},
"dns": {
"description": "DNS server list",
"type": "array",
"items": {
"type": "string",
"description": "DNS server"
}
},
"bios_attributes": {
"description": "Bios attributes",
"type": "object",
"nullable": true
}
}
},
"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"
},
"created_at": {
"description": "Server creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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"
},
"status": {
"type": "string",
"description": "Address status"
}
},
"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"
},
"components_state": {
"description": "Components binding state",
"type": "string",
"enum": [
"ok",
"bind_error"
]
},
"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"
]
}
}
},
"se_health": {
"type": "object",
"description": "Server health error information",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the server error"
},
"severity": {
"type": "string",
"description": "Severity of the error"
},
"info": {
"type": "object",
"description": "Additional information about the error"
}
}
},
"maintenance": {
"type": "boolean",
"description": "Server maintenance mode"
}
},
"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": 1000,
"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": 1679845,
"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"
},
"maintenance": {
"type": "boolean",
"description": "Server maintenance mode"
}
},
"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"
},
"profile_id": {
"description": "Unique identifier of the profile that underwent the operation.",
"type": "integer"
},
"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"
}
}
},
"hardware": {
"description": "Server configuration field",
"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",
"nullable": true,
"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_address": {
"description": "LDAP/AD server address",
"type": "string"
},
"port": {
"description": "LDAP server port",
"type": "integer"
},
"bind_dn": {
"description": "LDAP/AD bind DN or username",
"type": "string"
},
"bind_password": {
"description": "LDAP/AD bind password or plain password",
"type": "string"
},
"base_dn": {
"description": "LDAP/AD base DN or search domain name",
"type": "string"
},
"user_dn": {
"description": "AD user domain name or LDAP attribute",
"type": "string"
},
"group_attr": {
"description": "LDAP group attribute",
"type": "string"
},
"username_attr": {
"description": "LDAP username attribute",
"type": "string"
},
"base_distinguished_names": {
"description": "LDAP base distinguished names",
"type": "array",
"items": {
"type": "string"
}
},
"domain_controller_addr": {
"description": "AD domain controller server addresses",
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Service status flag",
"type": "boolean",
"default": true
},
"encryption_type": {
"description": "Encryption type",
"type": "string",
"enum": [
"none",
"ssl",
"starttls"
]
},
"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"
},
"remote_user": {
"description": "Name of the remote LDAP user",
"type": "string"
}
}
}
},
"cert": {
"description": "The certificate",
"type": "string"
},
"cert_ca": {
"description": "CA of the certificate",
"type": "string"
},
"cert_key": {
"description": "The certificate key",
"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",
"nullable": true,
"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",
"nullable": true,
"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"
}
}
}
},
"dns": {
"description": "DNS server list",
"type": "array",
"items": {
"type": "string",
"description": "DNS server"
}
},
"bios_attributes": {
"description": "Bios attributes",
"type": "object",
"nullable": true
}
}
},
"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"
},
"created_at": {
"description": "Server creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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"
},
"status": {
"type": "string",
"description": "Address status"
}
},
"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"
},
"components_state": {
"description": "Components binding state",
"type": "string",
"enum": [
"ok",
"bind_error"
]
},
"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"
]
}
}
},
"se_health": {
"type": "object",
"description": "Server health error information",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the server error"
},
"severity": {
"type": "string",
"description": "Severity of the error"
},
"info": {
"type": "object",
"description": "Additional information about the error"
}
}
},
"maintenance": {
"type": "boolean",
"description": "Server maintenance mode"
}
},
"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"
},
"created_at": {
"description": "Server creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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"
},
"created_at": {
"description": "Server creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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": 1679845,
"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": 1000,
"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": 1679845,
"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"
},
"maintenance": {
"type": "boolean",
"description": "Server maintenance mode"
}
},
"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"
},
"created_at": {
"description": "Server creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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",
"ip_allocation",
"ip_fail"
],
"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",
"ip_allocation",
"ip_fail"
],
"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",
"ip_allocation",
"ip_fail"
],
"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",
"ip_allocation",
"ip_fail"
],
"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"
}
}
}
}
}
}
},
"/server/component/assemble": {
"post": {
"operationId": "server_assemble_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Server assemble parameters",
"required": [
"server",
"spare_part"
],
"properties": {
"server": {
"type": "string",
"description": "Serial nubmer or barcode(name) of the server"
},
"spare_part": {
"type": "array",
"items": {
"type": "string",
"description": "Serial nubmer or barcode of the spare_part to assemble"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Servers has been assembled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the server"
},
"spare_part_errors": {
"type": "array",
"description": "List of the spare part that can not be replaced",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the spare part"
},
"status": {
"type": "string",
"description": "Status of the spare part"
},
"warehouse": {
"type": "object",
"description": "The warehouse where spare part is placed",
"properties": {
"id": {
"type": "integer",
"description": "The warehouse unique identifier"
},
"name": {
"type": "string",
"description": "The warehouse name"
}
}
},
"reserved_to_date": {
"type": "string",
"description": "Date of reservation for \"reserved\" status"
},
"server": {
"type": "object",
"description": "Server information if spare part in another server",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the server"
},
"name": {
"type": "string",
"description": "Name of the server"
}
}
}
}
}
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error assembling server",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
}
},
"summary": "Assembling details to the server",
"tags": [
"server"
]
}
},
"/server/component/disassemble": {
"post": {
"operationId": "server_disassemble_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Server disassemble parameters",
"required": [
"warehouse",
"server",
"spare_part"
],
"properties": {
"warehouse": {
"type": "integer",
"description": "Unique identifier of the warehouse for the details placement"
},
"server": {
"type": "string",
"description": "Serial nubmer or barcode(name) of the server"
},
"spare_part": {
"type": "array",
"items": {
"type": "string",
"description": "Serial nubmer or barcode of the spare_part to disassemble"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Servers has been disassembled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the server"
},
"spare_part_errors": {
"type": "array",
"description": "List of the spare part that can not be replaced",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the spare part"
},
"status": {
"type": "string",
"description": "Status of the spare part"
},
"warehouse": {
"type": "object",
"description": "The warehouse where spare part is placed",
"properties": {
"id": {
"type": "integer",
"description": "The warehouse unique identifier"
},
"name": {
"type": "string",
"description": "The warehouse name"
}
}
},
"reserved_to_date": {
"type": "string",
"description": "Date of reservation for \"reserved\" status"
},
"server": {
"type": "object",
"description": "Server information if spare part in another server",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the server"
},
"name": {
"type": "string",
"description": "Name of the server"
}
}
}
}
}
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error disassembling server",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
}
},
"summary": "Disassembling details of the server",
"tags": [
"server"
]
}
},
"/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": {
"example": "snmp_common",
"type": "string"
},
"hostname": {
"type": "string"
},
"id": {
"type": "integer"
},
"created_at": {
"description": "Switch creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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"
}
}
},
"http_params": {
"description": "Http 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"
},
"ssl": {
"description": "SSL usage",
"type": "boolean",
"default": false
},
"port": {
"description": "http service port",
"type": "integer",
"example": 443
}
}
},
"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"
}
}
},
"http_params": {
"description": "Http 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"
},
"ssl": {
"description": "SSL usage",
"type": "boolean",
"default": false
},
"port": {
"description": "http service port",
"type": "integer",
"example": 443
}
}
},
"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": 1679845,
"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": {
"example": "snmp_common",
"type": "string"
},
"hostname": {
"type": "string"
},
"id": {
"type": "integer"
},
"created_at": {
"description": "Switch creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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"
}
}
},
"http_params": {
"description": "Http 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"
},
"ssl": {
"description": "SSL usage",
"type": "boolean",
"default": false
},
"port": {
"description": "http service port",
"type": "integer",
"example": 443
}
}
},
"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"
}
}
},
"http_params": {
"description": "Http 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"
},
"ssl": {
"description": "SSL usage",
"type": "boolean",
"default": false
},
"port": {
"description": "http service port",
"type": "integer",
"example": 443
}
}
},
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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"
}
}
},
"http_params": {
"description": "Http 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"
},
"ssl": {
"description": "SSL usage",
"type": "boolean",
"default": false
},
"port": {
"description": "http service port",
"type": "integer",
"example": 443
}
}
},
"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"
},
"created_at": {
"description": "Switch creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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"
},
"created_at": {
"description": "Switch creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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"
},
"created_at": {
"description": "Switch creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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": 1679845,
"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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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": 1679845,
"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_unit": {
"get": {
"operationId": "rack_unit",
"responses": {
"200": {
"description": "List of rack units has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"rack_id": {
"type": "integer",
"description": "Unique rack identifier"
},
"unit_info": {
"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\"}"
}
}
}
}
}
}
}
}
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"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}": {
"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"
},
"set_as_main_ip": {
"description": "Set IP as the primary IP address of the server",
"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_connection_info": {
"get": {
"operationId": "pdu_connection_info_get",
"responses": {
"200": {
"description": "List of PDU connections info has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"description": "PDU device identifier",
"type": "integer"
},
"device": {
"description": "PDU handler type",
"type": "string"
},
"location": {
"type": "integer",
"description": "Location identifier"
},
"last_update": {
"description": "Date of the last device poll",
"type": "string"
},
"last_success_update": {
"description": "Date of the last successful device poll"
},
"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"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving a list of PDU 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 PDU connections",
"tags": [
"pdu"
]
}
},
"/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": 1679845,
"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"
},
"created_at": {
"description": "PDU creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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"
},
"created_at": {
"description": "PDU creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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": "string"
},
"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 identifier",
"in": "path",
"name": "pdu_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "PDU port unique identifier",
"in": "path",
"name": "port_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"summary": "Information about PDU port",
"tags": [
"pdu"
],
"responses": {
"200": {
"description": "Port information has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"description": "Port identifier",
"type": "integer"
},
"identity": {
"description": "Port identifier in PDU",
"type": "string"
},
"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 port information",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"post": {
"operationId": "pdu_port_id_post",
"parameters": [
{
"description": "PDU unique identifier",
"in": "path",
"name": "pdu_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "PDU port unique identifier",
"in": "path",
"name": "port_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"note": {
"description": "Comment",
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "PDU port information has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving PDU port information",
"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",
"tags": [
"pdu"
]
}
},
"/pdu/{pdu_id}/port/{port_id}/down": {
"post": {
"operationId": "pdu_port_down_post",
"summary": "PDU port power off",
"tags": [
"pdu"
],
"parameters": [
{
"description": "PDU unique identifier",
"in": "path",
"name": "pdu_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "PDU port unique identifier",
"in": "path",
"name": "port_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Task for PDU port power off has been registered",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating a task for PDU port power off",
"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}/up": {
"post": {
"operationId": "pdu_port_up_post",
"summary": "PDU port power off",
"tags": [
"pdu"
],
"parameters": [
{
"description": "PDU unique identifier",
"in": "path",
"name": "pdu_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "PDU port unique identifier",
"in": "path",
"name": "port_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Task for PDU port power on has been registered",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating a task for PDU port power on",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/pdu_status_info": {
"post": {
"operationId": "pdu_status_info_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"required": [
"status",
"status_info"
],
"properties": {
"entities": {
"items": {
"type": "integer"
},
"description": "List of unique identifiers of PDU devices",
"type": "array"
},
"status": {
"type": "string",
"description": "Empty or 'fail' status of the PDU"
},
"status_info": {
"description": "Additional information of the status",
"type": "object"
},
"ports": {
"type": "array",
"default": [],
"description": "List of ports of the PDU",
"items": {
"type": "object",
"properties": {
"identity": {
"description": "Identity of the port",
"type": "string"
},
"power_status": {
"description": "Power status of the port",
"type": "string"
}
}
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "PDU status info have been edited successfully",
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving PDU 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 PDU information (internal only)",
"tags": [
"pdu"
]
}
},
"/warehouse/pdu": {
"get": {
"operationId": "warehouse_pdu_get",
"responses": {
"200": {
"description": "PDU in warehouse have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"created_at": {
"description": "PDU creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"device": {
"description": "PDU handler type",
"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": "ATS",
"type": "string"
},
"warehouse_port_count": {
"description": "Total number of PDU sockets",
"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 PDU price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The PDU nomenclature",
"example": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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 PDU",
"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 pdu 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 pdu in warehouse",
"tags": [
"pdu",
"warehouse"
]
}
},
"/warehouse/{warehouse_id}/pdu": {
"get": {
"operationId": "warehouse_id_pdu_get",
"parameters": [
{
"description": "Warehouse unique identifier",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "PDU in warehouse have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"created_at": {
"description": "PDU creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"device": {
"description": "PDU handler type",
"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": "ATS",
"type": "string"
},
"warehouse_port_count": {
"description": "Total number of PDU sockets",
"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 PDU price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The PDU nomenclature",
"example": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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 PDU",
"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 pdu 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 pdu in warehouse",
"tags": [
"pdu",
"warehouse"
]
},
"post": {
"operationId": "warehouse_id_pdu_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": "Pdu 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": "ATS",
"type": "string"
},
"warehouse_status": {
"description": "Warehouse device status. Statuses: * `in_warehouse` - The device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"written_off",
"reserved",
"under_repair",
"broken"
]
},
"warehouse_port_count": {
"description": "Total number of PDU sockets",
"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 PDU price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The PDU nomenclature",
"example": 1679845,
"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"
},
"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 saving pdu",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create pdu in warehouse",
"tags": [
"pdu",
"warehouse"
]
}
},
"/warehouse/pdu/{pdu_id}": {
"post": {
"operationId": "warehouse_pdu_id_post",
"parameters": [
{
"description": "PDU unique identifier or UUID",
"in": "path",
"name": "pdu_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"description": "Pdu 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 PDU price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The PDU nomenclature",
"example": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"written_off",
"reserved",
"under_repair",
"broken"
]
},
"model": {
"description": "Type or model",
"maxLength": 255,
"example": "ATS",
"type": "string"
},
"warehouse_port_count": {
"description": "Total number of PDU sockets",
"nullable": true,
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"note": {
"description": "Comment",
"maxLength": 1500,
"type": "string"
},
"barcode": {
"description": "Barcode of PDU",
"type": "string",
"minLength": 1,
"maxLength": 255,
"example": "pdu_518957bd95"
},
"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": "array",
"items": {
"type": "integer"
}
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving pdu",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit pdu in warehouse",
"tags": [
"pdu",
"warehouse"
]
},
"get": {
"operationId": "warehouse_pdu_id_get",
"parameters": [
{
"description": "Pdu unique identifier or UUID",
"in": "path",
"name": "pdu_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Warehouse pdu has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"created_at": {
"description": "PDU creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"device": {
"description": "PDU handler type",
"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": "ATS",
"type": "string"
},
"warehouse_port_count": {
"description": "Total number of PDU sockets",
"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 PDU price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The PDU nomenclature",
"example": 1679845,
"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 device is in the warehouse * `in_rack` - The device is in the rack * `written_off` - The device has been written off * `reserved` - The device is reserved * `under_repair` - The device under repair * `broken` - The device 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 PDU",
"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 pdu 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 pdu information",
"tags": [
"pdu",
"warehouse"
]
}
},
"/warehouse/pdu/{pdu_id}/remove": {
"post": {
"operationId": "warehouse_pdu_id_remove_post",
"parameters": [
{
"description": "PDU unique identifier",
"in": "path",
"name": "pdu_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": "PDU has been removed successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error removing PDU",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Remove PDU",
"tags": [
"pdu",
"warehouse"
]
}
},
"/server/{server_id}/power_off": {
"post": {
"operationId": "server_id_power_off_post",
"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 has been powered off successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error powering off server",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Server power on",
"tags": [
"server",
"power"
]
}
},
"/server/{server_id}/power_on": {
"post": {
"operationId": "server_id_power_on_post",
"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 has been powered on successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error powering on server",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Server power on",
"tags": [
"server",
"power"
]
}
},
"/server/{server_id}/power_reset": {
"post": {
"operationId": "server_id_power_reset_post",
"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 has been restarted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error restarting server",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Server restart",
"tags": [
"server",
"power"
]
}
},
"/setting/{name}": {
"post": {
"operationId": "setting_name_post",
"summary": "Modify the setting value",
"tags": [
"common"
],
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"description": "The setting name:\n * `speed_threshold` - Minimal allowed local connection speed for diagnostics (default 80 Mbps).\n * `operation_change_boot_order` - Automatically change server boot order via IPMI before operation started (true/false)\n * `power_pdu_only` - Disables server power management for all devices except PDU\n * `ipmi_default_user` - Name of default BMC user with admin rights\n * `ipmi_default_owner_user` - Name of optional BMC user with operator rights\n * `diag_final_action` - Diagnostic operation final action (reboot/shutdown)\n * `global_macro` - Global macros dictionary\n * `disable_vpu_vlan_setup` - Disable VPU VLAN setup on port while run server operation (true/false)\n * `barcode_gen_length` - Length of the generated barcode\n",
"schema": {
"type": "string",
"enum": [
"speed_threshold",
"operation_change_boot_order",
"os_templates_path",
"power_pdu_only",
"ipmi_default_user",
"ipmi_default_owner_user",
"diag_final_action",
"global_macro",
"bios_layout",
"disable_vpu_vlan_setup",
"barcode_gen_length"
]
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true,
"properties": {
"value": {
"type": "string",
"description": "New value for the setting"
}
}
}
}
}
},
"responses": {
"200": {
"description": "The setting value has been succesfully changed",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "The result is a key-value pair where the key is the setting name and the value is the setting value",
"properties": {}
}
}
}
},
"default": {
"description": "Error changing the setting value",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"get": {
"operationId": "setting_name_get",
"summary": "Getting the setting value",
"tags": [
"common"
],
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"description": "The setting name:\n * `speed_threshold` - Minimal allowed local connection speed for diagnostics (default 80 Mbps).\n * `operation_change_boot_order` - Automatically change server boot order via IPMI before operation started (true/false)\n * `power_pdu_only` - Disables server power management for all devices except PDU\n * `ipmi_default_user` - Name of default BMC user with admin rights\n * `ipmi_default_owner_user` - Name of optional BMC user with operator rights\n * `diag_final_action` - Diagnostic operation final action (reboot/shutdown)\n * `global_macro` - Global macros dictionary\n * `disable_vpu_vlan_setup` - Disable VPU VLAN setup on port while run server operation (true/false)\n * `barcode_gen_length` - Length of the generated barcode\n",
"schema": {
"type": "string",
"enum": [
"speed_threshold",
"operation_change_boot_order",
"os_templates_path",
"power_pdu_only",
"ipmi_default_user",
"ipmi_default_owner_user",
"diag_final_action",
"global_macro",
"bios_layout",
"disable_vpu_vlan_setup",
"barcode_gen_length"
]
}
}
],
"responses": {
"200": {
"description": "Got the setting value",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "The result is a key-value pair where the key is the setting name and the value is the setting value",
"properties": {}
}
}
}
},
"default": {
"description": "Error getting the setting value",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/setting/ssh/pubkey": {
"get": {
"operationId": "setting_ssh_pubkey_get",
"summary": "Getting the SSH public key",
"tags": [
"common"
],
"responses": {
"200": {
"description": "Got the setting value",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "The platform public key",
"properties": {
"pubkey": {
"type": "string",
"description": "SSH public key"
}
}
}
}
}
},
"default": {
"description": "Error getting the setting value",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/setting/ssh/privkey": {
"get": {
"operationId": "setting_ssh_privkey_get",
"summary": "Getting the SSH private key (internal purpose only)",
"tags": [
"internal"
],
"responses": {
"200": {
"description": "Got the setting value",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "The platform private key",
"properties": {
"privkey": {
"type": "string",
"description": "SSH private key"
}
}
}
}
}
},
"default": {
"description": "Error getting the setting value",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/server/{server_id}/pdu_connection": {
"get": {
"operationId": "server_id_pdu_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 PDUs has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"server": {
"type": "integer",
"description": "The server identifier",
"example": 25
},
"id": {
"type": "integer",
"description": "The connection identifier",
"example": 42
},
"pdu": {
"type": "integer",
"description": "The PDU identifier",
"example": 33
},
"pdu_port": {
"type": "integer",
"description": "The PDU port identifier",
"example": 15
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving a list of server connections to PDUs",
"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 PDUs",
"tags": [
"server",
"pdu_connection"
]
}
},
"/pdu_connection": {
"post": {
"operationId": "pdu_connection_post",
"summary": "Server connection to PDU",
"tags": [
"pdu_connection"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"required": [
"server_id",
"pdu_port_id"
],
"properties": {
"server_id": {
"description": "The server identifier",
"example": 13,
"type": "integer"
},
"pdu_port_id": {
"description": "PDU port identifier",
"example": 2,
"type": "integer"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Server has been successfully connected to PDU",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error connecting server to PDU",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/pdu_connection/{pdu_connection_id}": {
"get": {
"tags": [
"pdu_connection"
],
"summary": "Receive information about the server connection to pdu",
"operationId": "pdu_connection_id_get",
"parameters": [
{
"name": "pdu_connection_id",
"in": "path",
"required": true,
"description": "The unique identifier of server connection to pdu",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Information about server connection to pdu has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"server": {
"type": "integer",
"description": "The server identifier",
"example": 25
},
"id": {
"type": "integer",
"description": "The connection identifier",
"example": 42
},
"pdu": {
"type": "integer",
"description": "The PDU identifier",
"example": 33
},
"pdu_port": {
"type": "integer",
"description": "The PDU port identifier",
"example": 15
}
}
}
}
}
},
"default": {
"description": "Error receiving information about server connection to pdu",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"delete": {
"operationId": "pdu_connection_id_delete",
"summary": "Delete connection of server to PDU",
"tags": [
"pdu_connection"
],
"parameters": [
{
"name": "pdu_connection_id",
"description": "Unique identifier of server connection to PDU",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Server connection to PDU has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting server connection to PDU",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/server/{server_id}/operation_cancel": {
"post": {
"operationId": "server_id_operation_cancel",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"reason": {
"type": "object",
"description": "The operation cancel reason",
"example": "{\"reason\": \"timeout\"}"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Operation has been cancelled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error cancelling operation",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Cancel operation",
"tags": [
"server",
"operation"
]
}
},
"/server/{server_id}/operation_finish": {
"post": {
"operationId": "server_id_operation_finish",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"hardware_info": {
"description": "Server configuration information",
"type": "object"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Operation has been completed successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error completing operation",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Complete operation",
"tags": [
"server",
"operation"
]
}
},
"/server/{server_id}/operation_fail": {
"post": {
"operationId": "server_id_operation_fail",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"reason": {
"description": "Server configuration information",
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Operation failed",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error failing operation",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Fail operation",
"tags": [
"server",
"operation"
]
}
},
"/server/{server_id}/operation_os": {
"post": {
"operationId": "server_id_operation_os",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"hdd_raid": {
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
],
"type": "string"
},
"os_template_id": {
"description": "Template identifier",
"type": "integer"
},
"password": {
"example": "password",
"pattern": "^[^ ]",
"type": "string"
},
"ssh_pub_keys": {
"type": "array",
"description": "Public ssh keys",
"items": {
"type": "string",
"format": "sshkey"
}
},
"recipe_id": {
"description": "The unique recipe identifier. This recipe will be run on the server after OS installation",
"type": "integer"
},
"disk_layout": {
"type": "array",
"description": "List of disk layouts",
"items": {
"type": "object",
"properties": {
"os_install": {
"type": "boolean",
"description": "Indicates that layout uses for OS installation"
},
"type": {
"type": "string",
"description": "Type of layout",
"enum": [
"no_raid",
"hw_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"disk": {
"description": "Disk list of current layout",
"type": "array",
"items": {
"type": "string"
}
},
"partition": {
"type": "array",
"description": "List of partition in current layout",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"description": "Partition mountpoint",
"type": "string"
},
"type": {
"description": "Type of partition",
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"ufs",
"zfs",
"xfs"
]
},
"size": {
"type": "integer",
"description": "Size of partition in megabytes"
}
}
}
}
}
}
},
"remove_temporary_ip": {
"type": "boolean",
"description": "Remove temporary IP from server after operation done",
"default": false
}
},
"required": [
"os_template_id",
"password"
],
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Operation has been started successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error starting operation",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Start operation",
"tags": [
"server",
"operation"
]
}
},
"/server/{server_id}/operation_diag": {
"post": {
"operationId": "server_id_operation_diag",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"os_template_id",
"clear_hdd"
],
"properties": {
"setup_ipmi": {
"type": "boolean",
"description": "Option allows to configure IPMI",
"default": false
},
"ipmi_pool": {
"type": "integer",
"description": "IP pool for IPMI IP allocation (from IPmgr)"
},
"os_template_id": {
"type": "integer",
"description": "Diagnostics template identifier"
},
"clear_hdd": {
"type": "string",
"description": "Disk cleanup type: * none - without cleanup * simple - quick cleanup * full - full cleanup\n",
"enum": [
"none",
"simple",
"full"
]
},
"remove_temporary_ip": {
"type": "boolean",
"description": "Remove temporary IP from server after operation done",
"default": false
},
"final_action": {
"type": "string",
"enum": [
"reboot",
"shutdown"
],
"nullable": true,
"description": "Diagnostic operation final action"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Diagnostics has been started successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error starting diagnostics",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Start diagnostics",
"tags": [
"server",
"operation"
]
}
},
"/server/{server_id}/operation_rescue": {
"post": {
"operationId": "server_id_operation_rescue",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"os_template_id",
"password"
],
"properties": {
"os_template_id": {
"type": "integer",
"description": "Rescue template identifier"
},
"password": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Rescue has been started successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error starting rescue",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Start rescue",
"tags": [
"server",
"operation"
]
}
},
"/server/{server_id}/operation_rescue_ready": {
"post": {
"operationId": "server_id_operation_rescue_ready",
"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": "Operation rescue has been ready",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error rescue ready operation",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Handler does the last restore operation to the ready status",
"tags": [
"server",
"operation"
]
}
},
"/server/{server_id}/operation_iso": {
"post": {
"operationId": "server_id_operation_iso",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"iso_id"
],
"properties": {
"iso_id": {
"type": "integer",
"description": "ISO image unique identifier"
}
}
}
}
}
},
"responses": {
"200": {
"description": "ISO operation has been started successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error starting ISO operation",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Start ISO operation",
"tags": [
"server",
"operation",
"iso"
]
}
},
"/server/{server_id}/operation_iso_mount": {
"post": {
"operationId": "server_id_operation_iso_mount",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"iso_id"
],
"properties": {
"iso_id": {
"type": "integer",
"description": "ISO image unique identifier"
}
}
}
}
}
},
"responses": {
"200": {
"description": "ISO mount operation has been started successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error starting ISO mount operation",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Start ISO operation",
"tags": [
"server",
"operation",
"iso"
]
}
},
"/operation": {
"get": {
"operationId": "operation_get",
"summary": "Recieving operations list",
"tags": [
"operation"
],
"responses": {
"200": {
"description": "Operations list has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"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": "Error getting operations list",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/operation/{operation_id}": {
"get": {
"operationId": "operation_id_get",
"parameters": [
{
"description": "Operation unique identifier",
"in": "path",
"name": "operation_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 operation information",
"tags": [
"operation"
]
}
},
"/server/{server_id}/operation_clear_hdd": {
"post": {
"operationId": "server_id_operation_clear_hdd",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"clear_hdd"
],
"properties": {
"clear_hdd": {
"type": "string",
"description": "Disk cleanup type: * none - without cleanup * simple - quick cleanup * full - full cleanup\n",
"enum": [
"none",
"simple",
"full"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Server disk cleanup has been started",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error starting server disk cleanup",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Start server disk cleanup",
"tags": [
"server",
"operation"
]
}
},
"/module/data_center/enable": {
"post": {
"operationId": "data_center_module_enable",
"summary": "Enable Data Center module",
"tags": [
"data_center"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Data Center module enabled successfully",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
},
{
"type": "object",
"properties": {
"status": {
"enum": [
"enabled"
]
}
}
}
]
}
}
}
},
"default": {
"description": "Data Center module enable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/data_center/disable": {
"post": {
"operationId": "data_center_module_disable",
"summary": "Disable Data Center module",
"tags": [
"data_center"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Data Center module disabled successfully",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
},
{
"type": "object",
"properties": {
"status": {
"enum": [
"disabled"
]
}
}
}
]
}
}
}
},
"default": {
"description": "Data Center module disable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/data_center/status": {
"get": {
"operationId": "data_center_module_status",
"responses": {
"200": {
"description": "Data Center module status has been received",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
},
{
"type": "object",
"properties": {
"status": {
"enum": [
"enabled",
"disabled"
]
}
}
}
]
}
}
}
},
"default": {
"description": "Error receiving Data Center module status",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Data Center module status",
"tags": [
"data_center"
]
}
},
"/dcmap/rack/{rack_id}": {
"post": {
"operationId": "dcmap_rack_rack_id_post",
"summary": "Edit rack on data center map",
"tags": [
"data_center"
],
"parameters": [
{
"description": "Rack unique identifier",
"in": "path",
"name": "rack_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"top_left_x": {
"description": "Top Left X point",
"type": "number",
"format": "double",
"example": 0.0
},
"top_left_y": {
"description": "Top Left Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_x": {
"description": "Bottom Right X point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_y": {
"description": "Bottom Right Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"rotate": {
"description": "Angle in 90 degrees increments",
"type": "integer",
"example": 0
}
}
}
]
}
}
}
},
"responses": {
"200": {
"description": "The rack map object has been edited successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rack_id": {
"description": "Rack unique identifier",
"type": "integer"
}
}
}
}
}
},
"default": {
"description": "Error when modifying the rack map object",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/dcmap/ups/{ups_id}": {
"post": {
"operationId": "dcmap_ups_ups_id_post",
"summary": "Edit ups on data center map",
"tags": [
"data_center"
],
"parameters": [
{
"description": "UPS unique identifier",
"in": "path",
"name": "ups_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"top_left_x": {
"description": "Top Left X point",
"type": "number",
"format": "double",
"example": 0.0
},
"top_left_y": {
"description": "Top Left Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_x": {
"description": "Bottom Right X point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_y": {
"description": "Bottom Right Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"rotate": {
"description": "Angle in 90 degrees increments",
"type": "integer",
"example": 0
}
}
}
]
}
}
}
},
"responses": {
"200": {
"description": "The ups map object has been edited successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ups_id": {
"description": "UPS unique identifier",
"type": "integer"
}
}
}
}
}
},
"default": {
"description": "Error when modifying the ups map object",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/dcmap/extra/{extra_id}": {
"post": {
"operationId": "dcmap_extra_extra_id_post",
"summary": "Edit the extra object on data center map",
"tags": [
"data_center"
],
"parameters": [
{
"description": "The Extra object unique identifier",
"in": "path",
"name": "extra_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"type": "object",
"properties": {
"top_left_x": {
"description": "Top Left X point",
"type": "number",
"format": "double",
"example": 0.0
},
"top_left_y": {
"description": "Top Left Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_x": {
"description": "Bottom Right X point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_y": {
"description": "Bottom Right Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"rotate": {
"description": "Angle in 90 degrees increments",
"type": "integer",
"example": 0
}
}
}
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Type of the extra map object",
"type": "string",
"enum": [
"door",
"wall",
"cold_aisles",
"hot_aisles"
]
}
}
}
]
}
}
}
},
"responses": {
"200": {
"description": "The extra map object has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error when modifying the extra map object",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"delete": {
"operationId": "dcmap_extra_extra_id_delete",
"summary": "Delete the extra object on data center map",
"tags": [
"data_center"
],
"parameters": [
{
"description": "The Extra object unique identifier",
"in": "path",
"name": "extra_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "The extra map object has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting the extra map object",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/dcmap/location/{location_id}/extra": {
"get": {
"operationId": "dcmap_location_location_id_extra_get",
"summary": "Receive information about an extra objects on the data center map",
"tags": [
"data_center"
],
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "The extra map objects have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"allOf": [
{
"type": "object",
"properties": {
"top_left_x": {
"description": "Top Left X point",
"type": "number",
"format": "double",
"example": 0.0
},
"top_left_y": {
"description": "Top Left Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_x": {
"description": "Bottom Right X point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_y": {
"description": "Bottom Right Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"rotate": {
"description": "Angle in 90 degrees increments",
"type": "integer",
"example": 0
}
}
},
{
"type": "object",
"properties": {
"id": {
"description": "Unique identifier of the extra object",
"type": "integer"
},
"location": {
"description": "Unique identifier of the location",
"type": "integer"
},
"type": {
"description": "Type of the extra map object",
"type": "string",
"enum": [
"door",
"wall",
"cold_aisles",
"hot_aisles"
]
}
}
}
]
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of extra map objects",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"post": {
"operationId": "dcmap_location_location_id_extra_post",
"summary": "Create extra object on the data center map",
"tags": [
"data_center"
],
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"type": "object",
"properties": {
"top_left_x": {
"description": "Top Left X point",
"type": "number",
"format": "double",
"example": 0.0
},
"top_left_y": {
"description": "Top Left Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_x": {
"description": "Bottom Right X point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_y": {
"description": "Bottom Right Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"rotate": {
"description": "Angle in 90 degrees increments",
"type": "integer",
"example": 0
}
}
}
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Type of the extra map object",
"type": "string",
"enum": [
"door",
"wall",
"cold_aisles",
"hot_aisles"
]
}
},
"required": [
"type"
]
}
]
}
}
}
},
"responses": {
"200": {
"description": "The extra map object has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error when modifying the extra map object",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/dcmap/location/{location_id}/extra/{extra_id}": {
"post": {
"operationId": "dcmap_location_location_id_extra_extra_id_post",
"summary": "Edit the extra object on data center map",
"tags": [
"data_center"
],
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "The Extra object unique identifier",
"in": "path",
"name": "extra_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"type": "object",
"properties": {
"top_left_x": {
"description": "Top Left X point",
"type": "number",
"format": "double",
"example": 0.0
},
"top_left_y": {
"description": "Top Left Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_x": {
"description": "Bottom Right X point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_y": {
"description": "Bottom Right Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"rotate": {
"description": "Angle in 90 degrees increments",
"type": "integer",
"example": 0
}
}
}
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Type of the extra map object",
"type": "string",
"enum": [
"door",
"wall",
"cold_aisles",
"hot_aisles"
]
}
}
}
]
}
}
}
},
"responses": {
"200": {
"description": "The extra map object has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error when modifying the extra map object",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/dcmap/location/{location_id}/ups": {
"get": {
"operationId": "dcmap_location_location_id_ups_get",
"summary": "Receive information about an UPS objects on the data center map",
"tags": [
"data_center"
],
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "The UPS objects have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"dc_map_ups": {
"description": "Data of the UPS map object",
"allOf": [
{
"type": "object",
"properties": {
"map_ups_id": {
"description": "Unique identifier of the map object UPS",
"type": "integer"
}
}
},
{
"type": "object",
"properties": {
"top_left_x": {
"description": "Top Left X point",
"type": "number",
"format": "double",
"example": 0.0
},
"top_left_y": {
"description": "Top Left Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_x": {
"description": "Bottom Right X point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_y": {
"description": "Bottom Right Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"rotate": {
"description": "Angle in 90 degrees increments",
"type": "integer",
"example": 0
}
}
}
]
},
"id": {
"description": "UPS device identifier",
"type": "integer"
},
"device": {
"description": "UPS handler type",
"type": "string"
},
"ip": {
"description": "UPS 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"
},
"rack": {
"properties": {
"id": {
"description": "Rack identifier",
"type": "integer"
},
"name": {
"description": "Rack name",
"type": "string"
},
"size": {
"description": "Rack size",
"type": "integer"
}
},
"type": "object"
},
"unit": {
"description": "Unit where device is located. Return null, if it is a 0-unit device",
"type": "integer",
"nullable": true
},
"charge_time": {
"description": "Charge time",
"type": "integer"
},
"load_percentage": {
"description": "Power load in percents",
"type": "integer"
},
"input_power": {
"description": "Input power",
"format": "double",
"type": "number"
},
"output_power": {
"description": "Output power",
"format": "double",
"type": "number"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of UPS objects",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/dcmap/location/{location_id}/rack": {
"get": {
"operationId": "dcmap_location_location_id_rack_get",
"summary": "Receive information about an Rack objects on the data center map",
"tags": [
"data_center"
],
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "The Rack objects have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"dc_map_rack": {
"description": "Data of the Rack map object",
"allOf": [
{
"type": "object",
"properties": {
"map_rack_id": {
"description": "Unique identifier of the map object Rack",
"type": "integer"
}
}
},
{
"type": "object",
"properties": {
"top_left_x": {
"description": "Top Left X point",
"type": "number",
"format": "double",
"example": 0.0
},
"top_left_y": {
"description": "Top Left Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_x": {
"description": "Bottom Right X point",
"type": "number",
"format": "double",
"example": 0.0
},
"bottom_right_y": {
"description": "Bottom Right Y point",
"type": "number",
"format": "double",
"example": 0.0
},
"rotate": {
"description": "Angle in 90 degrees increments",
"type": "integer",
"example": 0
}
}
}
]
},
"error_pdu": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Entity ID",
"type": "integer"
}
}
}
},
"size": {
"description": "Size of list with entity ID's",
"type": "integer"
}
}
},
"error_server": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Entity ID",
"type": "integer"
}
}
}
},
"size": {
"description": "Size of list with entity ID's",
"type": "integer"
}
}
},
"error_switch": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Entity ID",
"type": "integer"
}
}
}
},
"size": {
"description": "Size of list with entity ID's",
"type": "integer"
}
}
},
"error_ups": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Entity ID",
"type": "integer"
}
}
}
},
"size": {
"description": "Size of list with entity ID's",
"type": "integer"
}
}
},
"id": {
"description": "Rack unique identifier",
"type": "integer"
},
"free": {
"description": "Number of free units",
"format": "float",
"type": "number"
},
"name": {
"description": "The rack name",
"type": "string"
},
"reserved": {
"description": "Number of reserved units",
"type": "integer"
},
"service": {
"description": "Number of service units",
"type": "integer"
},
"size": {
"description": "Total units in rack",
"type": "integer"
},
"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"
},
"used": {
"description": "Number of units in use",
"format": "float",
"type": "number"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of Rack objects",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/data_extractor": {
"get": {
"operationId": "data_extractor_get",
"responses": {
"200": {
"description": "Statistics has been collected and sent successfully",
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"default": {
"description": "Error collecting and sending statistics",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Collect and send statistics",
"tags": [
"common"
]
}
},
"/delivery": {
"post": {
"operationId": "warehouse_delivery_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"number": {
"description": "The delivery waybill number",
"example": "My delivery",
"type": "string"
},
"delivery_date": {
"description": "The delivery date",
"example": "2020-10-31",
"type": "string"
},
"provider": {
"description": "The delivery provider unique identifier",
"example": 1,
"type": "integer"
},
"warehouse": {
"description": "The warehouse where the delivery has been arrived",
"example": 1,
"type": "integer"
},
"amount": {
"description": "The delivery amount",
"example": 255958.32,
"type": "number"
},
"note": {
"description": "Comment",
"example": "The best delivery we ever meet",
"type": "string"
}
},
"required": [
"number",
"delivery_date",
"provider",
"warehouse"
],
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "The delivery has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Failed to create a delivery",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create delivery",
"tags": [
"delivery"
]
},
"get": {
"operationId": "warehouse_delivery_get",
"responses": {
"200": {
"description": "Total list of deliveries",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"id": {
"description": "The delivery unique identifier",
"example": 1,
"type": "integer"
},
"number": {
"description": "The delivery waybill number",
"example": "My delivery",
"type": "string"
},
"delivery_date": {
"description": "The delivery date",
"example": "2020-10-31",
"type": "string"
},
"provider": {
"description": "The delivery provider information",
"type": "object",
"properties": {
"id": {
"description": "The delivery provider unique identifier",
"example": 1,
"type": "integer",
"nullable": true
},
"name": {
"description": "The delivery provider name",
"example": "My provider",
"type": "string",
"nullable": true
},
"identifier_number": {
"description": "The provider identifier number (VAT or TIN)",
"example": 123123123123123,
"type": "string",
"nullable": true
}
}
},
"warehouse": {
"description": "The warehouse where the delivery has been arrived",
"type": "object",
"properties": {
"id": {
"description": "The warehouse unique identifier",
"example": 1,
"type": "integer"
},
"name": {
"description": "The warehouse name",
"example": "Warehouse London",
"type": "string"
}
}
},
"device_count": {
"description": "The total count of devices connected to the delivery",
"example": 36,
"type": "integer"
},
"amount": {
"description": "The delivery amount",
"example": 255958.32,
"type": "number"
},
"note": {
"description": "Comment",
"example": "The best delivery we ever meet",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving a list of deliveries",
"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 deliveries",
"tags": [
"delivery"
]
}
},
"/delivery/{delivery_id}": {
"post": {
"operationId": "warehouse_delivery_id_post",
"parameters": [
{
"description": "The delivery unique identifier",
"in": "path",
"name": "delivery_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"number": {
"description": "The delivery waybill number",
"example": "My delivery",
"type": "string"
},
"delivery_date": {
"description": "The delivery date",
"example": "2020-10-31",
"type": "string"
},
"provider": {
"description": "The delivery provider unique identifier",
"example": 1,
"type": "integer"
},
"warehouse": {
"description": "The warehouse where the delivery has been arrived",
"example": 1,
"type": "integer"
},
"amount": {
"description": "The delivery amount",
"example": 255958.32,
"type": "number"
},
"note": {
"description": "Comment",
"example": "The best delivery we ever meet",
"type": "string"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "The delivery has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Failed to edit the delivery",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit the delivery",
"tags": [
"delivery"
]
},
"delete": {
"operationId": "warehouse_delivery_id_delete",
"parameters": [
{
"description": "The delivery unique identifier",
"in": "path",
"name": "delivery_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "The delivery has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Failed to delete the delivery",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete the delivery",
"tags": [
"delivery"
]
},
"get": {
"operationId": "warehouse_delivery_id_get",
"parameters": [
{
"description": "The delivery unique identifier",
"in": "path",
"name": "delivery_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "The delivery has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"description": "The delivery unique identifier",
"example": 1,
"type": "integer"
},
"number": {
"description": "The delivery waybill number",
"example": "My delivery",
"type": "string"
},
"delivery_date": {
"description": "The delivery date",
"example": "2020-10-31",
"type": "string"
},
"provider": {
"description": "The delivery provider information",
"type": "object",
"properties": {
"id": {
"description": "The delivery provider unique identifier",
"example": 1,
"type": "integer",
"nullable": true
},
"name": {
"description": "The delivery provider name",
"example": "My provider",
"type": "string",
"nullable": true
},
"identifier_number": {
"description": "The provider identifier number (VAT or TIN)",
"example": 123123123123123,
"type": "string",
"nullable": true
}
}
},
"warehouse": {
"description": "The warehouse where the delivery has been arrived",
"type": "object",
"properties": {
"id": {
"description": "The warehouse unique identifier",
"example": 1,
"type": "integer"
},
"name": {
"description": "The warehouse name",
"example": "Warehouse London",
"type": "string"
}
}
},
"device_count": {
"description": "The total count of devices connected to the delivery",
"example": 36,
"type": "integer"
},
"amount": {
"description": "The delivery amount",
"example": 255958.32,
"type": "number"
},
"note": {
"description": "Comment",
"example": "The best delivery we ever meet",
"type": "string"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "The delivery 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 delivery",
"tags": [
"delivery"
]
}
},
"/delivery/{delivery_id}/image/{image_id}": {
"delete": {
"operationId": "delivery_image_id_delete",
"parameters": [
{
"description": "The delivery unique identifier",
"in": "path",
"name": "delivery_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "The delivery image unique identifier",
"in": "path",
"name": "image_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Delivery image is deleted successfuly",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Delete delivery image error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete delivery image",
"tags": [
"delivery"
]
},
"get": {
"operationId": "delivery_image_id_get",
"parameters": [
{
"description": "The delivery unique identifier",
"in": "path",
"name": "delivery_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "The delivery image unique identifier",
"in": "path",
"name": "image_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "The delivery image has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"description": "The delivery image unique identifier",
"example": 1,
"type": "integer"
},
"delivery": {
"description": "The delivery unique identifier",
"example": 1,
"type": "integer"
},
"content": {
"description": "The delivery image content (base64 encoding format)",
"type": "string"
},
"filename": {
"description": "The delivery image real filename",
"example": "image.png",
"type": "string"
},
"content_type": {
"description": "The delivery image type",
"example": "image/png",
"type": "string"
}
}
}
}
}
},
"default": {
"description": "The delivery image 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 delivery image",
"tags": [
"delivery"
]
}
},
"/delivery/{delivery_id}/image": {
"post": {
"operationId": "delivery_id_image_post",
"parameters": [
{
"description": "The delivery unique identifier",
"in": "path",
"name": "delivery_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"upload": {
"description": "Multipart content",
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "File is uploaded successfuly",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "File upload error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Upload file",
"tags": [
"delivery"
]
},
"get": {
"operationId": "delivery_image_get",
"parameters": [
{
"description": "The delivery unique identifier",
"in": "path",
"name": "delivery_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Total list of delivery images",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"id": {
"description": "The delivery image unique identifier",
"example": 1,
"type": "integer"
},
"delivery": {
"description": "The delivery unique identifier",
"example": 1,
"type": "integer"
},
"content": {
"description": "The delivery image content (base64 encoding format)",
"type": "string"
},
"filename": {
"description": "The delivery image real filename",
"example": "image.png",
"type": "string"
},
"content_type": {
"description": "The delivery image type",
"example": "image/png",
"type": "string"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving a list of delivery images",
"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 delivery images",
"tags": [
"delivery"
]
}
},
"/update": {
"post": {
"operationId": "update",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Panel update has been started",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Failed to start panel update",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Panel update",
"tags": [
"update"
]
}
},
"/supported_ups": {
"get": {
"operationId": "supported_ups_get",
"summary": "List of supported UPS",
"tags": [
"ups"
],
"responses": {
"200": {
"description": "List of supported UPS 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 UPS",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/ups": {
"post": {
"operationId": "ups_post",
"summary": "Create UPS",
"tags": [
"ups"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"required": [
"name",
"ip",
"device"
],
"type": "object",
"properties": {
"device": {
"description": "Device handler",
"type": "string"
},
"ip": {
"description": "UPS IP address",
"example": "127.0.0.1",
"format": "ipv4",
"type": "string"
},
"name": {
"description": "UPS name",
"example": "my key name",
"pattern": "^[^ ]",
"type": "string"
},
"note": {
"description": "Comment",
"type": "string"
},
"location": {
"description": "Location unique identifier",
"example": "1",
"type": "integer"
},
"rack": {
"description": "Rack unique identifier",
"example": "1",
"type": "integer",
"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
},
"size": {
"description": "Size of an entity in the rack in units",
"type": "number",
"multipleOf": 0.5,
"minimum": 0,
"maximum": 99,
"example": "1",
"nullable": true
},
"connection_params": {
"description": "Connection params",
"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 UPS price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The UPS nomenclature",
"example": 1679845,
"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,
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Ups has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating Ups",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"get": {
"operationId": "ups_get",
"summary": "UPS list",
"tags": [
"ups"
],
"responses": {
"200": {
"description": "UPS list",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "UPS device identifier",
"type": "integer"
},
"created_at": {
"description": "UPS creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"device": {
"description": "UPS handler type",
"type": "string"
},
"ip": {
"description": "UPS 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"
},
"charge_time": {
"description": "Charge time",
"type": "integer"
},
"load_percentage": {
"description": "Power load in percents",
"type": "integer"
},
"input_power": {
"description": "Input power",
"format": "double",
"type": "number"
},
"output_power": {
"description": "Output power",
"format": "double",
"type": "number"
},
"connection_params": {
"description": "Connection params",
"type": "object"
},
"additional_info": {
"description": "Additional UPS info",
"type": "object"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving UPS list",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/ups/{ups_id}": {
"get": {
"operationId": "ups_id_get",
"summary": "UPS",
"parameters": [
{
"description": "UPS unique identifier",
"in": "path",
"name": "ups_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"tags": [
"ups"
],
"responses": {
"200": {
"description": "UPS",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"description": "UPS device identifier",
"type": "integer"
},
"created_at": {
"description": "UPS creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"device": {
"description": "UPS handler type",
"type": "string"
},
"ip": {
"description": "UPS 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"
},
"charge_time": {
"description": "Charge time",
"type": "integer"
},
"load_percentage": {
"description": "Power load in percents",
"type": "integer"
},
"input_power": {
"description": "Input power",
"format": "double",
"type": "number"
},
"output_power": {
"description": "Output power",
"format": "double",
"type": "number"
},
"connection_params": {
"description": "Connection params",
"type": "object"
},
"additional_info": {
"description": "Additional UPS info",
"type": "object"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
}
}
}
},
"default": {
"description": "Error receiving Ups",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"post": {
"operationId": "ups_id_post",
"summary": "Edit UPS",
"tags": [
"ups"
],
"parameters": [
{
"description": "UPS unique identifier",
"in": "path",
"name": "ups_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"ip": {
"description": "UPS IP address",
"example": "127.0.0.1",
"format": "ipv4",
"type": "string"
},
"name": {
"description": "UPS 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",
"nullable": true,
"type": "integer"
},
"location": {
"description": "Location unique identifier",
"example": "1",
"type": "integer"
},
"connection_params": {
"description": "Connection params",
"type": "object"
},
"device": {
"description": "Device(Only if not already set)",
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
},
"warehouse_status": {
"description": "Warehouse UPS status. Statuses: * `in_warehouse` - The UPS is in the warehouse * `in_rack` - The UPS is in the rack * `at_location` - The UPS is at location * `written_off` - The UPS has been written off * `reserved` - The UPS is reserved * `under_repair` - The UPS under repair * `broken` - The UPS is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"at_location",
"written_off",
"reserved",
"under_repair",
"broken"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "UPS has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error editing UPS",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"delete": {
"operationId": "ups_id_delete",
"summary": "Delete UPS",
"tags": [
"ups"
],
"parameters": [
{
"description": "UPS unique identifier",
"in": "path",
"name": "ups_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "UPS has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting UPS",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/ups/{ups_id}/info": {
"post": {
"operationId": "ups_id_info_post",
"summary": "Update UPS info",
"parameters": [
{
"description": "The ups unique identifier",
"in": "path",
"name": "ups_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"ups_error": {
"type": "object",
"description": "The UPS error description",
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"additional_info": {
"description": "Additional UPS info",
"type": "object"
},
"charge_time": {
"description": "Charge time of battery",
"type": "integer"
},
"load_percentage": {
"description": "Load percentage of UPS",
"type": "integer"
},
"input_power": {
"description": "Input power of UPS",
"format": "double",
"type": "number"
},
"output_power": {
"description": "Output power of UPS",
"format": "double",
"type": "number"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Ups port data have been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving ups port data",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"tags": [
"ups"
]
}
},
"/ups/{ups_id}/status": {
"post": {
"operationId": "ups_id_status",
"summary": "Poll UPS",
"tags": [
"ups"
],
"parameters": [
{
"description": "UPS unique identifier",
"in": "path",
"name": "ups_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "UPS poll task has been registered",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating UPS poll task",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/warehouse/ups": {
"get": {
"operationId": "warehouse_ups_get",
"responses": {
"200": {
"description": "UPS in warehouse have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"created_at": {
"description": "UPS creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"note": {
"type": "string"
},
"device": {
"description": "UPS handler type",
"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": "ATS",
"type": "string"
},
"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 UPS price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The UPS nomenclature",
"example": 1679845,
"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 UPS status. Statuses: * `in_warehouse` - The UPS is in the warehouse * `in_rack` - The UPS is in the rack * `at_location` - The UPS is at location * `written_off` - The UPS has been written off * `reserved` - The UPS is reserved * `under_repair` - The UPS under repair * `broken` - The UPS is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"at_location",
"written_off",
"reserved",
"under_repair",
"broken"
]
},
"warehouse_status_info": {
"type": "object",
"description": "Warehouse status info"
},
"barcode": {
"description": "Barcode of UPS",
"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"
},
"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 warehouse ups 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 ups in warehouse",
"tags": [
"ups",
"warehouse"
]
}
},
"/warehouse/{warehouse_id}/ups": {
"get": {
"operationId": "warehouse_id_ups_get",
"parameters": [
{
"description": "Warehouse unique identifier",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "UPS in warehouse have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"created_at": {
"description": "UPS creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"note": {
"type": "string"
},
"device": {
"description": "UPS handler type",
"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": "ATS",
"type": "string"
},
"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 UPS price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The UPS nomenclature",
"example": 1679845,
"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 UPS status. Statuses: * `in_warehouse` - The UPS is in the warehouse * `in_rack` - The UPS is in the rack * `at_location` - The UPS is at location * `written_off` - The UPS has been written off * `reserved` - The UPS is reserved * `under_repair` - The UPS under repair * `broken` - The UPS is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"at_location",
"written_off",
"reserved",
"under_repair",
"broken"
]
},
"warehouse_status_info": {
"type": "object",
"description": "Warehouse status info"
},
"barcode": {
"description": "Barcode of UPS",
"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"
},
"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 warehouse ups 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 ups in warehouse",
"tags": [
"ups",
"warehouse"
]
},
"post": {
"operationId": "warehouse_id_ups_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": "UPS 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,
"type": "string"
},
"warehouse_status": {
"description": "Warehouse UPS status. Statuses: * `in_warehouse` - The UPS is in the warehouse * `in_rack` - The UPS is in the rack * `at_location` - The UPS is at location * `written_off` - The UPS has been written off * `reserved` - The UPS is reserved * `under_repair` - The UPS under repair * `broken` - The UPS is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"at_location",
"written_off",
"reserved",
"under_repair",
"broken"
]
},
"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 UPS price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The UPS nomenclature",
"example": 1679845,
"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"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
}
}
}
},
"responses": {
"200": {
"description": "UPS has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving UPS",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create UPS in warehouse",
"tags": [
"ups",
"warehouse"
]
}
},
"/warehouse/ups/{ups_id}": {
"post": {
"operationId": "warehouse_ups_id_post",
"parameters": [
{
"description": "UPS unique identifier or UUID",
"in": "path",
"name": "ups_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"description": "UPS 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 UPS price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The UPS nomenclature",
"example": 1679845,
"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 UPS status. Statuses: * `in_warehouse` - The UPS is in the warehouse * `in_rack` - The UPS is in the rack * `at_location` - The UPS is at location * `written_off` - The UPS has been written off * `reserved` - The UPS is reserved * `under_repair` - The UPS under repair * `broken` - The UPS is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"at_location",
"written_off",
"reserved",
"under_repair",
"broken"
]
},
"model": {
"description": "Type or model",
"maxLength": 255,
"type": "string"
},
"note": {
"description": "Comment",
"maxLength": 1500,
"type": "string"
},
"barcode": {
"description": "Barcode of UPS",
"type": "string",
"minLength": 1,
"maxLength": 255,
"example": "ups_518957bd95"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Ups has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving ups",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit ups in warehouse",
"tags": [
"ups",
"warehouse"
]
},
"get": {
"operationId": "warehouse_ups_id_get",
"parameters": [
{
"description": "Ups unique identifier or UUID",
"in": "path",
"name": "ups_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Warehouse ups has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"created_at": {
"description": "UPS creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"note": {
"type": "string"
},
"device": {
"description": "UPS handler type",
"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": "ATS",
"type": "string"
},
"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 UPS price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The UPS nomenclature",
"example": 1679845,
"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 UPS status. Statuses: * `in_warehouse` - The UPS is in the warehouse * `in_rack` - The UPS is in the rack * `at_location` - The UPS is at location * `written_off` - The UPS has been written off * `reserved` - The UPS is reserved * `under_repair` - The UPS under repair * `broken` - The UPS is broken\n",
"type": "string",
"enum": [
"in_warehouse",
"in_rack",
"at_location",
"written_off",
"reserved",
"under_repair",
"broken"
]
},
"warehouse_status_info": {
"type": "object",
"description": "Warehouse status info"
},
"barcode": {
"description": "Barcode of UPS",
"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"
},
"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": "Warehouse ups 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 ups information",
"tags": [
"ups",
"warehouse"
]
}
},
"/warehouse/ups/{ups_id}/remove": {
"post": {
"operationId": "warehouse_ups_id_remove_post",
"parameters": [
{
"description": "UPS unique identifier",
"in": "path",
"name": "ups_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": "UPS has been removed successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error removing UPS",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Remove UPS",
"tags": [
"ups",
"warehouse"
]
}
},
"/module/warehouse/enable": {
"post": {
"operationId": "warehouse_module_enable",
"summary": "Enable Warehouse module",
"tags": [
"warehouse"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"currency": {
"description": "The module currency",
"type": "string",
"enum": [
"usd",
"eur",
"rub"
]
},
"location_to_warehouses": {
"description": "Locations to warehouses connections",
"type": "array",
"items": {
"description": "Location to warehouses object",
"type": "object",
"additionalProperties": false,
"properties": {
"location": {
"type": "integer",
"description": "The location unique identifier",
"example": 17
},
"warehouses": {
"type": "array",
"items": {
"type": "integer",
"description": "The warehouse unique identifier",
"example": 10
}
}
}
}
},
"spare_location_to_warehouse": {
"description": "Locations to warehouse connections for spare parts move",
"type": "array",
"example": "[{\"location\": 1, \"warehouse\": 3]}]",
"items": {
"description": "Location to warehouse object",
"type": "object",
"additionalProperties": false,
"properties": {
"location": {
"type": "integer"
},
"warehouse": {
"type": "integer"
}
}
}
},
"allow_spare_autobind": {
"description": "Allow bind the spare parts warehouse to server",
"type": "boolean"
},
"allow_spare_removing": {
"description": "Allow removing spare parts",
"type": "boolean"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Warehouse module enabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Warehouse module enable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/warehouse/disable": {
"post": {
"operationId": "warehouse_module_disable",
"summary": "Disable Warehouse module",
"tags": [
"warehouse"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Warehouse module disabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Warehouse module disabled error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/warehouse/status": {
"get": {
"operationId": "warehouse_module_status",
"responses": {
"200": {
"description": "Warehouse module status has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"description": "The current status of the module",
"example": "enabled",
"type": "string"
},
"allow_spare_autobind": {
"description": "Allow auto bind spare parts logic",
"example": false,
"type": "boolean"
},
"allow_spare_removing": {
"description": "Allow removing spare parts",
"example": false,
"type": "boolean"
},
"currency": {
"description": "The module currency",
"type": "string",
"enum": [
"usd",
"eur",
"rub"
]
},
"location_to_warehouses": {
"description": "Locations to warehouses connections",
"type": "array",
"items": {
"description": "Location to warehouses object",
"type": "object",
"additionalProperties": false,
"properties": {
"location": {
"type": "integer",
"description": "The location unique identifier",
"example": 17
},
"warehouses": {
"type": "array",
"items": {
"type": "integer",
"description": "The warehouse unique identifier",
"example": 10
}
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving Warehouse module status",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Warehouse module status",
"tags": [
"warehouse"
]
}
},
"/warehouse": {
"get": {
"operationId": "warehouse_get",
"responses": {
"200": {
"description": "Warehouses have been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"description": "Warehouse identifier",
"type": "integer"
},
"name": {
"description": "Warehouse name",
"type": "string"
},
"note": {
"description": "Note with information",
"type": "string"
},
"uuid": {
"description": "Universally unique identifier",
"type": "string"
},
"locations": {
"description": "Locations the warehouse is related to",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The location unique identifier",
"example": 10
},
"name": {
"type": "string",
"description": "The location name",
"example": "Location London"
}
}
}
}
}
},
"type": "array"
}
}
}
}
}
},
"default": {
"description": "Error receiving warehouses list",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receiving information about warehouses",
"tags": [
"warehouse"
]
},
"post": {
"operationId": "warehouse_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "Warehouse name",
"minLength": 1,
"maxLength": 255,
"type": "string"
},
"note": {
"description": "Note with information",
"type": "string"
},
"locations": {
"description": "Locations the warehouse is related to",
"type": "array",
"items": {
"type": "integer",
"description": "The location unique identifier",
"example": 10
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Warehouse has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating warehouse",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Creating warehouse",
"tags": [
"warehouse"
]
}
},
"/warehouse/{warehouse_id}": {
"delete": {
"operationId": "warehouse_id_delete",
"parameters": [
{
"description": "Warehouse unique identifier or UUID",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Warehouse has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting warehouse",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Deleting warehouse",
"tags": [
"warehouse"
]
},
"get": {
"operationId": "warehouse_id_get",
"parameters": [
{
"description": "Warehouse unique identifier or UUID",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Warehouse has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"description": "Warehouse identifier",
"type": "integer"
},
"name": {
"description": "Warehouse name",
"type": "string"
},
"note": {
"description": "Note with information",
"type": "string"
},
"uuid": {
"description": "Universally unique identifier",
"type": "string"
},
"locations": {
"description": "Locations the warehouse is related to",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The location unique identifier",
"example": 10
},
"name": {
"type": "string",
"description": "The location name",
"example": "Location London"
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving information about warehouse",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receiving information about warehouse",
"tags": [
"Warehouse"
]
},
"post": {
"operationId": "warehouse_id_post",
"parameters": [
{
"description": "Warehouse unique identifier or UUID",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Warehouse name",
"minLength": 1,
"maxLength": 255,
"type": "string"
},
"note": {
"description": "Comment",
"type": "string"
},
"locations": {
"description": "Locations the warehouse is related to",
"type": "array",
"items": {
"type": "integer",
"description": "The location unique identifier",
"example": 10
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Warehouse has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving warehouse",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Editing warehouse",
"tags": [
"warehouse"
]
}
},
"/warehouse/cpu": {
"get": {
"operationId": "warehouse_cpu_get",
"responses": {
"200": {
"description": "CPUs 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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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 CPUs",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all CPUs",
"tags": [
"cpu",
"warehouse"
]
}
},
"/warehouse/{warehouse_id}/cpu": {
"post": {
"operationId": "cpu_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": 1679845,
"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": "CPU has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving CPU",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create CPU",
"tags": [
"cpu",
"warehouse"
]
},
"get": {
"operationId": "cpu_get",
"parameters": [
{
"description": "Warehouse unique identifier",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "CPUs 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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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 CPUs",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all CPUs",
"tags": [
"cpu",
"warehouse"
]
}
},
"/cpu/{cpu_id}": {
"get": {
"operationId": "cpu_id_get",
"parameters": [
{
"description": "CPU unique identifier or UUID",
"in": "path",
"name": "cpu_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "CPU 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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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": "CPU 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",
"tags": [
"cpu",
"warehouse"
]
},
"post": {
"operationId": "cpu_id_post",
"parameters": [
{
"description": "CPU unique identifier or UUID",
"in": "path",
"name": "cpu_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": 1679845,
"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": "CPU has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving CPU",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit CPU",
"tags": [
"cpu",
"warehouse"
]
}
},
"/cpu/{cpu_id}/remove": {
"post": {
"operationId": "cpu_id_remove_post",
"parameters": [
{
"description": "CPU unique identifier",
"in": "path",
"name": "cpu_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": "CPU has been removed successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error removing CPU",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Remove CPU",
"tags": [
"cpu",
"warehouse"
]
}
},
"/type/pci": {
"post": {
"operationId": "pci_type_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"name": {
"description": "PCI type name",
"example": "Adaptec ASR-6805E SGL RAID",
"minLength": 1,
"maxLength": 255,
"type": "string"
},
"alias": {
"description": "Short name",
"example": "Adaptec ASR-6805E",
"maxLength": 255,
"type": "string"
},
"note": {
"description": "Comment",
"type": "string",
"example": "Favorite type",
"maxLength": 1500
},
"group_name": {
"description": "PCI group name. Groups: * `raid` - Hardware raid controller * `nic` - Network interface controller * `gpu` - Graphics processing unit * `adapter` - Any Adapters * `other` - Any other devices\n",
"type": "string",
"enum": [
"raid",
"nic",
"gpu",
"adapter",
"other"
],
"example": "gpu"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"required": [
"name",
"group_name"
],
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "PCI type has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating PCI type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Creating PCI type",
"tags": [
"pci_type",
"warehouse"
]
},
"get": {
"operationId": "pci_type_get",
"responses": {
"200": {
"description": "PCI types have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"id": {
"type": "integer",
"description": "PCI type unique identifier"
},
"name": {
"type": "string",
"description": "PCI type name"
},
"alias": {
"type": "string",
"description": "PCI type short name"
},
"note": {
"type": "string",
"description": "Comment"
},
"group_name": {
"type": "string",
"description": "PCI group name. Groups: * `raid` - Hardware raid controller * `nic` - Network interface controller * `gpu` - Graphics processing unit * `adapter` - Any Adapters * `other` - Any other devices\n"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving PCI types",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receiving all PCI types",
"tags": [
"pci_type",
"warehouse"
]
}
},
"/type/pci/{pci_type_id}": {
"delete": {
"operationId": "pci_type_id_delete",
"parameters": [
{
"description": "PCI type unique identifier",
"in": "path",
"name": "pci_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "PCI type has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting pci type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete PCI type",
"tags": [
"pci_type",
"warehouse"
]
},
"get": {
"operationId": "pci_type_id_get",
"parameters": [
{
"description": "PCI type unique identifier",
"in": "path",
"name": "pci_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "PCI type has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer",
"description": "PCI type unique identifier"
},
"name": {
"type": "string",
"description": "PCI type name"
},
"alias": {
"type": "string",
"description": "PCI type short name"
},
"note": {
"type": "string",
"description": "Comment"
},
"group_name": {
"type": "string",
"description": "PCI group name. Groups: * `raid` - Hardware raid controller * `nic` - Network interface controller * `gpu` - Graphics processing unit * `adapter` - Any Adapters * `other` - Any other devices\n"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "PCI 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 PCI type",
"tags": [
"pci_type",
"warehouse"
]
},
"post": {
"operationId": "pci_type_id_post",
"parameters": [
{
"description": "PCI type unique identifier",
"in": "path",
"name": "pci_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"name": {
"description": "PCI device name",
"example": "Adaptec ASR-6805E SGL RAID",
"minLength": 1,
"maxLength": 255,
"type": "string"
},
"alias": {
"description": "Short name",
"example": "Adaptec ASR-6805E",
"maxLength": 255,
"type": "string"
},
"note": {
"description": "Comment",
"type": "string",
"example": "Favorite type",
"maxLength": 1500
},
"group_name": {
"description": "PCI group name. Groups: * `raid` - Hardware raid controller * `nic` - Network interface controller * `gpu` - Graphics processing unit * `adapter` - Any Adapters * `other` - Any other devices\n",
"type": "string",
"enum": [
"raid",
"nic",
"gpu",
"adapter",
"other"
],
"example": "gpu"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "PCI type has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving PCI type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit PCI type",
"tags": [
"pci_type",
"warehouse"
]
}
},
"/module/vpu": {
"get": {
"operationId": "module_vpu_get",
"responses": {
"200": {
"description": "Information about VPU settings",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"description": "The VPU setting unique identifier",
"type": "integer",
"example": 10
},
"location": {
"description": "The location unique identifier",
"type": "integer",
"example": 1
},
"ip_pool": {
"description": "The pool unique identifier for default VPU networks allocation",
"type": "integer",
"example": 1
},
"ipmi_ip_pool": {
"description": "The unique identifier of pool for issuing VPU networks for IPMI",
"type": "integer",
"minimum": 0
},
"additional_ip_pool": {
"description": "The unique identifier of pool for additional IP-addresses of VPU networks",
"type": "integer",
"minimum": 0
},
"device": {
"description": "VPU device handler name",
"type": "string",
"example": "juniper_qfx"
},
"handler_params": {
"description": "VPU device handler custom params",
"type": "object"
},
"local_id_as": {
"description": "The unique identifier of local autonomous system",
"type": "integer",
"example": 121
},
"community": {
"description": "The comunity of local autonomous system",
"type": "string",
"example": "vpu"
},
"pref_isp": {
"description": "The list of provider networks",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"settings": {
"description": "The VPU module location settings",
"type": "object",
"properties": {
"router_info": {
"type": "object",
"description": "Router connection data",
"properties": {
"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"
}
}
}
}
}
}
}
}
},
"neighbors": {
"description": "BIRD neighbors information",
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"description": "The neighbor ip address",
"type": "string",
"format": "ipv4",
"example": "192.168.0.5"
},
"id_as": {
"description": "The unique identifier of neighbor autonomous system",
"type": "integer",
"example": 100
},
"description": {
"description": "The desctiption of neighbor",
"type": "string",
"example": "Router"
}
}
}
},
"note": {
"description": "The VPU setting additional information",
"maxLength": 1500,
"type": "string"
},
"status": {
"description": "The VPU setting status",
"enum": [
"ok",
"setup",
"setup_failed",
"deleting",
"delete_failed"
],
"type": "string",
"example": "ok"
},
"status_info": {
"description": "Information about VPU setting status",
"type": "object"
},
"net_count": {
"description": "Total count of VPU networks, that belongs provided VPU location setting",
"type": "integer"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving a VPU settings information",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive a information about VPU settings",
"tags": [
"vpu_module"
]
}
},
"/module/vpu/{vpu_id}": {
"get": {
"operationId": "module_vpu_id_get",
"parameters": [
{
"description": "The VPU setting unique identifier",
"in": "path",
"name": "vpu_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Information about VPU setting",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"description": "The VPU setting unique identifier",
"type": "integer",
"example": 10
},
"location": {
"description": "The location unique identifier",
"type": "integer",
"example": 1
},
"ip_pool": {
"description": "The pool unique identifier for default VPU networks allocation",
"type": "integer",
"example": 1
},
"ipmi_ip_pool": {
"description": "The unique identifier of pool for issuing VPU networks for IPMI",
"type": "integer",
"minimum": 0
},
"additional_ip_pool": {
"description": "The unique identifier of pool for additional IP-addresses of VPU networks",
"type": "integer",
"minimum": 0
},
"device": {
"description": "VPU device handler name",
"type": "string",
"example": "juniper_qfx"
},
"handler_params": {
"description": "VPU device handler custom params",
"type": "object"
},
"local_id_as": {
"description": "The unique identifier of local autonomous system",
"type": "integer",
"example": 121
},
"community": {
"description": "The comunity of local autonomous system",
"type": "string",
"example": "vpu"
},
"pref_isp": {
"description": "The list of provider networks",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"settings": {
"description": "The VPU module location settings",
"type": "object",
"properties": {
"router_info": {
"type": "object",
"description": "Router connection data",
"properties": {
"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"
}
}
}
}
}
}
}
}
},
"neighbors": {
"description": "BIRD neighbors information",
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"description": "The neighbor ip address",
"type": "string",
"format": "ipv4",
"example": "192.168.0.5"
},
"id_as": {
"description": "The unique identifier of neighbor autonomous system",
"type": "integer",
"example": 100
},
"description": {
"description": "The desctiption of neighbor",
"type": "string",
"example": "Router"
}
}
}
},
"note": {
"description": "The VPU setting additional information",
"maxLength": 1500,
"type": "string"
},
"status": {
"description": "The VPU setting status",
"enum": [
"ok",
"setup",
"setup_failed",
"deleting",
"delete_failed"
],
"type": "string",
"example": "ok"
},
"status_info": {
"description": "Information about VPU setting status",
"type": "object"
},
"net_count": {
"description": "Total count of VPU networks, that belongs provided VPU location setting",
"type": "integer"
}
}
}
}
}
},
"default": {
"description": "Error receiving a VPU setting information",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive a information about VPU setting",
"tags": [
"vpu_module"
]
},
"post": {
"operationId": "module_vpu_id_post",
"summary": "Edit VPU setting on location",
"tags": [
"vpu_module"
],
"parameters": [
{
"description": "The VPU setting unique identifier",
"in": "path",
"name": "vpu_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"ip_pool": {
"description": "The unique identifier of pool for issuing VPU networks",
"type": "integer",
"minimum": 0
},
"ipmi_ip_pool": {
"description": "The unique identifier of pool for issuing VPU networks for IPMI",
"type": "integer",
"minimum": 0
},
"additional_ip_pool": {
"description": "The unique identifier of pool for additional IP-addresses of VPU networks",
"type": "integer",
"minimum": 0
},
"device": {
"description": "Device handler for router management",
"type": "string"
},
"handler_params": {
"description": "VPU device handler custom params",
"type": "object"
},
"settings": {
"description": "The VPU module location settings",
"type": "object",
"properties": {
"router_info": {
"type": "object",
"description": "Router connection data",
"properties": {
"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"
}
}
}
}
}
},
"required": [
"netconf_params"
]
}
},
"required": [
"router_info"
]
},
"local_id_as": {
"description": "The unique identifier of local autonomous system",
"type": "integer",
"example": 121
},
"community": {
"description": "The comunity of local autonomous system",
"type": "string",
"example": "vpu"
},
"pref_isp": {
"description": "The list of provider networks",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"neighbors": {
"description": "BIRD neighbors data",
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"description": "The neighbor ip address",
"type": "string",
"format": "ipv4",
"example": "192.168.0.5"
},
"id_as": {
"description": "The unique identifier of neighbor autonomous system",
"type": "integer",
"example": 100
},
"description": {
"description": "The desctiption of neighbor",
"type": "string",
"example": "Router"
}
},
"required": [
"ip",
"id_as"
]
}
},
"with_ipv6": {
"description": "Means that setting must be with IPv6 parameters",
"type": "boolean",
"example": true
},
"pref_isp_v6": {
"description": "The list of provider's IPv6 networks",
"type": "array",
"items": {
"type": "string",
"example": "3a29:290:1::/48"
},
"minItems": 1
},
"local_id_as_v6": {
"description": "The unique identifier of local IPv6 autonomous system",
"type": "integer",
"example": 122
},
"community_v6": {
"description": "The IPv6 comunity of local autonomous system",
"type": "string",
"example": "1:0:0"
},
"neighbors_v6": {
"description": "BIRD IPv6 neighbors data",
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"description": "The neighbor IPv6 address",
"type": "string",
"format": "ipv6",
"example": "192.168.0.5"
},
"id_as": {
"description": "The unique identifier of neighbor autonomous system",
"type": "integer",
"example": 100
},
"description": {
"description": "The desctiption of neighbor",
"type": "string",
"example": "Router"
}
},
"required": [
"ip",
"id_as"
]
}
},
"note": {
"description": "The VPU setting additional information",
"maxLength": 1500,
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "VPU setting has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Failed to edit VPU setting",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/vpu/enable": {
"post": {
"operationId": "vpu_module_enable",
"summary": "Enable VPU module",
"tags": [
"vpu_module"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "VPU module enabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "VPU module enable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/vpu/disable": {
"post": {
"operationId": "vpu_module_disable",
"summary": "Disable VPU module",
"tags": [
"vpu_module"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "VPU module disabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "VPU module disabled error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/vpu/status": {
"get": {
"operationId": "vpu_module_status",
"responses": {
"200": {
"description": "VPU module status has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving VPU module status",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "VPU module status",
"tags": [
"vpu_module"
]
}
},
"/location/{location_id}/vpu": {
"post": {
"operationId": "location_id_vpu_post",
"summary": "Set up VPU module on location",
"tags": [
"vpu_module"
],
"parameters": [
{
"description": "The location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"ip_pool": {
"description": "The unique identifier of pool for issuing VPU networks",
"type": "integer",
"minimum": 0
},
"ipmi_ip_pool": {
"description": "The unique identifier of pool for issuing VPU networks for IPMI",
"type": "integer",
"minimum": 0
},
"additional_ip_pool": {
"description": "The unique identifier of pool for additional IP-addresses of VPU networks",
"type": "integer",
"minimum": 0
},
"device": {
"description": "Device handler for router management",
"type": "string"
},
"handler_params": {
"description": "VPU device handler custom params",
"type": "object"
},
"settings": {
"description": "The VPU module location settings",
"type": "object",
"properties": {
"router_info": {
"type": "object",
"description": "Router connection data",
"properties": {
"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"
}
}
}
}
}
}
}
},
"required": [
"router_info"
]
},
"local_id_as": {
"description": "The unique identifier of local autonomous system",
"type": "integer",
"example": 121
},
"community": {
"description": "The comunity of local autonomous system",
"type": "string",
"example": "vpu"
},
"pref_isp": {
"description": "The list of provider networks",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"neighbors": {
"description": "BIRD neighbors data",
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"description": "The neighbor ip address",
"type": "string",
"format": "ipv4",
"example": "192.168.0.5"
},
"id_as": {
"description": "The unique identifier of neighbor autonomous system",
"type": "integer",
"example": 100
},
"description": {
"description": "The desctiption of neighbor",
"type": "string",
"example": "Router"
}
},
"required": [
"ip",
"id_as"
]
}
},
"with_ipv6": {
"description": "Means that setting must be with IPv6 parameters",
"type": "boolean",
"example": true
},
"pref_isp_v6": {
"description": "The list of provider's IPv6 networks",
"type": "array",
"items": {
"type": "string",
"example": "3a29:290:1::/48"
},
"minItems": 1
},
"local_id_as_v6": {
"description": "The unique identifier of local IPv6 autonomous system",
"type": "integer",
"example": 122
},
"community_v6": {
"description": "The IPv6 comunity of local autonomous system",
"type": "string",
"example": "1:0:0"
},
"neighbors_v6": {
"description": "BIRD IPv6 neighbors data",
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"description": "The neighbor IPv6 address",
"type": "string",
"format": "ipv6",
"example": "192.168.0.5"
},
"id_as": {
"description": "The unique identifier of neighbor autonomous system",
"type": "integer",
"example": 100
},
"description": {
"description": "The desctiption of neighbor",
"type": "string",
"example": "Router"
}
},
"required": [
"ip",
"id_as"
]
}
},
"note": {
"description": "The VPU setting additional information",
"maxLength": 1500,
"type": "string"
}
},
"required": [
"ip_pool",
"ipmi_ip_pool",
"additional_ip_pool",
"device",
"settings",
"local_id_as",
"pref_isp",
"community",
"neighbors",
"with_ipv6",
"pref_isp_v6",
"local_id_as_v6",
"community_v6",
"neighbors_v6"
]
},
{
"additionalProperties": false,
"properties": {
"ip_pool": {
"description": "The unique identifier of pool for issuing VPU networks",
"type": "integer",
"minimum": 0
},
"ipmi_ip_pool": {
"description": "The unique identifier of pool for issuing VPU networks for IPMI",
"type": "integer",
"minimum": 0
},
"additional_ip_pool": {
"description": "The unique identifier of pool for additional IP-addresses of VPU networks",
"type": "integer",
"minimum": 0
},
"device": {
"description": "Device handler for router management",
"type": "string"
},
"handler_params": {
"description": "VPU device handler custom params",
"type": "object"
},
"settings": {
"description": "The VPU module location settings",
"type": "object",
"properties": {
"router_info": {
"type": "object",
"description": "Router connection data",
"properties": {
"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"
}
}
}
}
}
}
}
},
"required": [
"router_info"
]
},
"local_id_as": {
"description": "The unique identifier of local autonomous system",
"type": "integer",
"example": 121
},
"community": {
"description": "The comunity of local autonomous system",
"type": "string",
"example": "vpu"
},
"pref_isp": {
"description": "The list of provider networks",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"neighbors": {
"description": "BIRD neighbors data",
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"description": "The neighbor ip address",
"type": "string",
"format": "ipv4",
"example": "192.168.0.5"
},
"id_as": {
"description": "The unique identifier of neighbor autonomous system",
"type": "integer",
"example": 100
},
"description": {
"description": "The desctiption of neighbor",
"type": "string",
"example": "Router"
}
},
"required": [
"ip",
"id_as"
]
}
},
"with_ipv6": {
"description": "Means that setting must be with IPv6 parameters",
"type": "boolean",
"example": true
},
"note": {
"description": "The VPU setting additional information",
"maxLength": 1500,
"type": "string"
}
},
"required": [
"ip_pool",
"ipmi_ip_pool",
"additional_ip_pool",
"device",
"settings",
"local_id_as",
"pref_isp",
"community",
"neighbors"
],
"type": "object"
}
]
}
}
}
},
"responses": {
"200": {
"description": "VPU module has been configured successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "VPU module configure error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/location/{location_id}/vlan/net": {
"get": {
"operationId": "location_location_id_vlan_net_get",
"parameters": [
{
"description": "The location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Information about VPU networks on location",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"description": "The VPU network unique identifier",
"type": "integer",
"example": 10
},
"name": {
"description": "The VPU network",
"type": "string",
"example": "192.168.0.0/30"
},
"pool": {
"description": "The unique identifier of pool for issuing VPU network",
"type": "integer",
"minimum": 0
},
"prefix": {
"description": "The VPU network prefix",
"type": "integer",
"example": 32,
"minimum": 25,
"maximum": 127
},
"family": {
"description": "Address type",
"enum": [
"ipv4",
"ipv6"
],
"type": "string"
},
"domain": {
"description": "The VPU network domain",
"type": "string",
"example": "vlan10.dci6"
},
"vlan": {
"description": "The unique VLAN identifier to which the network belongs",
"type": "integer",
"example": 10
},
"vpu": {
"description": "The unique identifier of VPU settings",
"type": "integer",
"example": 1
},
"note": {
"description": "The VPU network additional information",
"maxLength": 1500,
"type": "string"
},
"status": {
"description": "The VPU network status",
"enum": [
"ok",
"allocating",
"fail",
"configuring",
"deleting"
],
"type": "string",
"example": "ok"
},
"status_info": {
"description": "Information about VPU setting status",
"type": "object"
},
"type": {
"enum": [
"server",
"ipmi"
],
"type": "string",
"default": "server",
"description": "The VPU network type"
},
"ip_count": {
"description": "Total count of IP-addresses, allocated from this VPU network",
"type": "integer"
},
"is_main": {
"description": "Is the VPU network main in VLAN",
"type": "boolean",
"default": false
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving a VPU networks information on location",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive a information about VPU networks on location",
"tags": [
"vpu_module"
]
}
},
"/location/{location_id}/vpu/resetup": {
"post": {
"operationId": "location_id_vpu_resetup_post",
"summary": "Resetup VPU module on location",
"tags": [
"vpu_module"
],
"parameters": [
{
"description": "The 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": "VPU module has been reconfigured successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "VPU module reconfigure error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/location/{location_id}/vlan/{vlan_id}/bind/net": {
"post": {
"operationId": "location_id_vlan_id_bind_net_post",
"summary": "Create VPU network on location by migration",
"tags": [
"vpu_module"
],
"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": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "The VPU network",
"type": "string",
"example": "192.168.0.0/30"
},
"family": {
"description": "Address type",
"type": "string",
"enum": [
"ipv4",
"ipv6"
]
},
"type": {
"description": "The VPU network type",
"type": "string",
"enum": [
"server",
"ipmi"
],
"default": "server"
},
"prefix": {
"description": "The allocated network prefix",
"type": "integer",
"example": 30,
"minimum": 25,
"maximum": 127
},
"is_main": {
"description": "Is the VPU network main in VLAN",
"type": "boolean",
"default": false
},
"note": {
"description": "The VPU network additional information",
"type": "string",
"maxLength": 1500
}
},
"required": [
"name",
"family",
"type",
"prefix",
"is_main"
]
}
}
}
},
"responses": {
"200": {
"description": "VPU network has been bound successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"type": "object"
}
}
}
},
"default": {
"description": "VPU network bound error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/location/{location_id}/vlan/{vlan_id}/net": {
"post": {
"operationId": "location_id_vlan_id_net_post",
"summary": "Create VPU network on location",
"tags": [
"vpu_module"
],
"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": {
"pool": {
"description": "The unique identifier of pool for issuing VPU network",
"type": "integer",
"minimum": 0
},
"family": {
"description": "Address type",
"enum": [
"ipv4",
"ipv6"
],
"type": "string"
},
"prefix": {
"description": "The allocated network prefix",
"type": "integer",
"example": 32,
"minimum": 25,
"maximum": 127
},
"note": {
"description": "The VPU network additional information",
"maxLength": 1500,
"type": "string"
},
"type": {
"enum": [
"server",
"ipmi"
],
"type": "string",
"default": "server",
"description": "The VPU network type"
},
"is_main": {
"description": "Is the VPU network main in VLAN",
"type": "boolean",
"default": false
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"required": [
"family",
"prefix"
],
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "VPU network has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"type": "object"
}
}
}
},
"default": {
"description": "VPU network creation error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"get": {
"operationId": "location_id_vlan_id_vpu_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": "Information about VPU network",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"description": "The VPU network unique identifier",
"type": "integer",
"example": 10
},
"name": {
"description": "The VPU network",
"type": "string",
"example": "192.168.0.0/30"
},
"pool": {
"description": "The unique identifier of pool for issuing VPU network",
"type": "integer",
"minimum": 0
},
"prefix": {
"description": "The VPU network prefix",
"type": "integer",
"example": 32,
"minimum": 25,
"maximum": 127
},
"family": {
"description": "Address type",
"enum": [
"ipv4",
"ipv6"
],
"type": "string"
},
"domain": {
"description": "The VPU network domain",
"type": "string",
"example": "vlan10.dci6"
},
"vlan": {
"description": "The unique VLAN identifier to which the network belongs",
"type": "integer",
"example": 10
},
"vpu": {
"description": "The unique identifier of VPU settings",
"type": "integer",
"example": 1
},
"note": {
"description": "The VPU network additional information",
"maxLength": 1500,
"type": "string"
},
"status": {
"description": "The VPU network status",
"enum": [
"ok",
"allocating",
"fail",
"configuring",
"deleting"
],
"type": "string",
"example": "ok"
},
"status_info": {
"description": "Information about VPU setting status",
"type": "object"
},
"type": {
"enum": [
"server",
"ipmi"
],
"type": "string",
"default": "server",
"description": "The VPU network type"
},
"ip_count": {
"description": "Total count of IP-addresses, allocated from this VPU network",
"type": "integer"
},
"is_main": {
"description": "Is the VPU network main in VLAN",
"type": "boolean",
"default": false
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving a VPU network information",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive a information about VPU network",
"tags": [
"vpu_module"
]
}
},
"/module/vpu/net/{net_id}": {
"delete": {
"operationId": "module_vpu_net_id_delete",
"parameters": [
{
"description": "VPU network unique identifier",
"in": "path",
"name": "net_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "VPU network has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting VPU network",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete VPU network",
"tags": [
"vpu_module"
]
},
"get": {
"operationId": "module_vpu_net_id_get",
"parameters": [
{
"description": "Get information about VPU network",
"in": "path",
"name": "net_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Information about VPU network",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"description": "The VPU network unique identifier",
"type": "integer",
"example": 10
},
"name": {
"description": "The VPU network",
"type": "string",
"example": "192.168.0.0/30"
},
"pool": {
"description": "The unique identifier of pool for issuing VPU network",
"type": "integer",
"minimum": 0
},
"prefix": {
"description": "The VPU network prefix",
"type": "integer",
"example": 32,
"minimum": 25,
"maximum": 127
},
"family": {
"description": "Address type",
"enum": [
"ipv4",
"ipv6"
],
"type": "string"
},
"domain": {
"description": "The VPU network domain",
"type": "string",
"example": "vlan10.dci6"
},
"vlan": {
"description": "The unique VLAN identifier to which the network belongs",
"type": "integer",
"example": 10
},
"vpu": {
"description": "The unique identifier of VPU settings",
"type": "integer",
"example": 1
},
"note": {
"description": "The VPU network additional information",
"maxLength": 1500,
"type": "string"
},
"status": {
"description": "The VPU network status",
"enum": [
"ok",
"allocating",
"fail",
"configuring",
"deleting"
],
"type": "string",
"example": "ok"
},
"status_info": {
"description": "Information about VPU setting status",
"type": "object"
},
"type": {
"enum": [
"server",
"ipmi"
],
"type": "string",
"default": "server",
"description": "The VPU network type"
},
"ip_count": {
"description": "Total count of IP-addresses, allocated from this VPU network",
"type": "integer"
},
"is_main": {
"description": "Is the VPU network main in VLAN",
"type": "boolean",
"default": false
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
}
}
}
},
"default": {
"description": "Error receiving a VPU network information",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive a information about VPU network",
"tags": [
"vpu_module"
]
},
"post": {
"operationId": "module_vpu_net_id_post",
"summary": "Edit VPU network on location",
"tags": [
"vpu_module"
],
"parameters": [
{
"description": "The VPU network unique identifier",
"in": "path",
"name": "net_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"note": {
"description": "The additional information for VPU network",
"type": "string",
"maxLength": 1500
},
"is_main": {
"description": "Is the VPU network main in VLAN",
"type": "boolean",
"default": false
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "VPU network has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Failed to edit VPU network",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/vpu/net/{net_id}/ip": {
"get": {
"operationId": "module_vpu_net_id_ip_get",
"parameters": [
{
"description": "Get information about VPU network IP-addresses",
"in": "path",
"name": "net_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Information about VPU network IP-addresses",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"description": "IP-address name that belongs to provided VPU network",
"type": "integer"
},
"ip_id": {
"description": "The IP-address identifier",
"type": "integer"
},
"ipmi": {
"description": "The unique IPMI identifier",
"type": "integer"
},
"ipmi_type": {
"description": "The IPMI type",
"type": "string"
},
"server": {
"description": "The unique server identifier",
"type": "integer"
},
"server_name": {
"description": "The server name",
"type": "string"
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving a VPU network 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 information about VPU network IP-addresses",
"tags": [
"vpu_module"
]
}
},
"/journal": {
"get": {
"operationId": "journal_get",
"responses": {
"200": {
"description": "Journal have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"description": "Journal record unique identifier",
"type": "integer"
},
"date_time": {
"description": "Journal record date time",
"type": "string"
},
"instance_id": {
"description": "Instance unique indentifier",
"type": "integer"
},
"type": {
"description": "Journal operation type",
"enum": [
"create",
"edit",
"delete",
"server_power_on",
"server_power_off",
"server_power_reset",
"server_power_ipmi",
"server_power_pdu",
"server_operation_start",
"server_operation_finish",
"server_operation_cancel",
"server_state",
"server_connection_create",
"server_connection_edit",
"server_connection_delete",
"server_ip_create",
"server_ip_edit",
"server_ip_delete",
"server_component_create",
"server_component_edit",
"server_component_delete"
],
"type": "string"
},
"ip": {
"description": "User IP address",
"type": "string"
},
"account": {
"type": "object",
"properties": {
"id": {
"description": "User unique identifier",
"type": "integer"
},
"trustee": {
"description": "Session identity of trusted user",
"type": "integer"
},
"roles": {
"description": "User roles",
"type": "array",
"items": {
"type": "string",
"example": "@user"
}
},
"email": {
"description": "User email",
"type": "string"
}
}
},
"entity": {
"type": "object",
"properties": {
"id": {
"description": "Entity unique identifier",
"type": "integer"
},
"name": {
"description": "Entity name",
"type": "string"
},
"type": {
"description": "Entity type",
"type": "string",
"enum": [
"server",
"switch",
"pdu",
"warehouse_cpu",
"warehouse_storage",
"warehouse_ram",
"warehouse_pci",
"warehouse_other_spare_part"
]
},
"owner": {
"description": "Entity owner",
"type": "integer"
}
}
},
"data": {
"type": "object",
"description": "Journal data fields",
"properties": {
"old": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the server"
},
"mac": {
"type": "string",
"description": "Mac of the server"
},
"os_template": {
"type": "object",
"description": "The OS template information the operation was started with"
},
"platform": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"chassis": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"rack": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"slot": {
"type": "integer",
"description": "Slot ID of the server"
},
"unit": {
"type": "integer",
"description": "Unit ID of the server"
},
"main_ipv4": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"main_ipv6": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"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"
]
},
"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"
]
}
}
},
{
"type": "object",
"properties": {
"pdu_entity": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"pdu_port_entity": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"ipmi": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"operation_id": {
"type": "integer",
"description": "Unique identifier of operation"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"operation_status": {
"type": "string"
},
"os_template_info": {
"type": "object",
"description": "The OS template information the operation was started with"
},
"type": {
"type": "string",
"enum": [
"os_install",
"diag",
"rescue"
],
"description": "Operation type"
},
"template_type": {
"type": "string",
"enum": [
"iso",
"os_template"
],
"description": "Template type"
}
}
},
{
"type": "object",
"properties": {
"ip_id": {
"description": "Unique IP address identifier",
"type": "integer"
},
"ip_net": {
"description": "Unique IP net identifier",
"type": "integer"
},
"ip_pool": {
"description": "Unique IP pool identifier",
"type": "integer"
},
"name": {
"description": "Name of IP address",
"type": "string"
},
"domain": {
"description": "Domain of IP address",
"type": "string"
},
"network": {
"description": "Network of IP address",
"type": "string"
},
"gateway": {
"description": "Gateway of IP address",
"type": "string"
},
"family": {
"description": "Family of IP address",
"enum": [
"ipv4",
"ipv6"
],
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"pdu": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"pdu_port": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"switch": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"switch_port": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"ipmi": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "Unique identifier of spare"
},
"warehouse": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"dci_server_uuid": {
"type": "string",
"description": "Unique identifier of server from DCImanager"
},
"barcode": {
"type": "string",
"description": "Barcode of spare device"
},
"serial_number": {
"type": "string",
"description": "Serial number of spare device"
},
"warranty": {
"type": "string",
"description": "Warranty of spare device"
},
"note": {
"type": "string",
"description": "Note for spare device"
},
"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"
]
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"server": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the Server component"
},
"type": {
"type": "string",
"description": "Type of server component",
"enum": [
"cpu",
"storage",
"ram",
"pci"
]
},
"spare_part_uuid": {
"type": "string",
"description": "UUID spare part from warehouse"
},
"server": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"status": {
"type": "string",
"description": "Status of server component",
"enum": [
"approved",
"not_found"
]
}
}
}
]
},
"new": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the server"
},
"mac": {
"type": "string",
"description": "Mac of the server"
},
"os_template": {
"type": "object",
"description": "The OS template information the operation was started with"
},
"platform": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"chassis": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"rack": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"slot": {
"type": "integer",
"description": "Slot ID of the server"
},
"unit": {
"type": "integer",
"description": "Unit ID of the server"
},
"main_ipv4": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"main_ipv6": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"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"
]
},
"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"
]
}
}
},
{
"type": "object",
"properties": {
"pdu_entity": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"pdu_port_entity": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"ipmi": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"operation_id": {
"type": "integer",
"description": "Unique identifier of operation"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"operation_status": {
"type": "string"
},
"os_template_info": {
"type": "object",
"description": "The OS template information the operation was started with"
},
"type": {
"type": "string",
"enum": [
"os_install",
"diag",
"rescue"
],
"description": "Operation type"
},
"template_type": {
"type": "string",
"enum": [
"iso",
"os_template"
],
"description": "Template type"
}
}
},
{
"type": "object",
"properties": {
"ip_id": {
"description": "Unique IP address identifier",
"type": "integer"
},
"ip_net": {
"description": "Unique IP net identifier",
"type": "integer"
},
"ip_pool": {
"description": "Unique IP pool identifier",
"type": "integer"
},
"name": {
"description": "Name of IP address",
"type": "string"
},
"domain": {
"description": "Domain of IP address",
"type": "string"
},
"network": {
"description": "Network of IP address",
"type": "string"
},
"gateway": {
"description": "Gateway of IP address",
"type": "string"
},
"family": {
"description": "Family of IP address",
"enum": [
"ipv4",
"ipv6"
],
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"pdu": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"pdu_port": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"switch": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"switch_port": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"ipmi": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "Unique identifier of spare"
},
"warehouse": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"dci_server_uuid": {
"type": "string",
"description": "Unique identifier of server from DCImanager"
},
"barcode": {
"type": "string",
"description": "Barcode of spare device"
},
"serial_number": {
"type": "string",
"description": "Serial number of spare device"
},
"warranty": {
"type": "string",
"description": "Warranty of spare device"
},
"note": {
"type": "string",
"description": "Note for spare device"
},
"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"
]
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"server": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the Server component"
},
"type": {
"type": "string",
"description": "Type of server component",
"enum": [
"cpu",
"storage",
"ram",
"pci"
]
},
"spare_part_uuid": {
"type": "string",
"description": "UUID spare part from warehouse"
},
"server": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"status": {
"type": "string",
"description": "Status of server component",
"enum": [
"approved",
"not_found"
]
}
}
}
]
}
}
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving journal list",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive journal information",
"tags": [
"journal"
]
}
},
"/server/{server_id}/journal": {
"get": {
"deprecated": true,
"operationId": "server_id_journal_get",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Journal have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"description": "Journal record unique identifier",
"type": "integer"
},
"date_time": {
"description": "Journal record date time",
"type": "string"
},
"instance_id": {
"description": "Instance unique indentifier",
"type": "integer"
},
"type": {
"description": "Journal operation type",
"enum": [
"create",
"edit",
"delete",
"server_power_on",
"server_power_off",
"server_power_reset",
"server_power_ipmi",
"server_power_pdu",
"server_operation_start",
"server_operation_finish",
"server_operation_cancel",
"server_state",
"server_connection_create",
"server_connection_edit",
"server_connection_delete",
"server_ip_create",
"server_ip_edit",
"server_ip_delete",
"server_component_create",
"server_component_edit",
"server_component_delete"
],
"type": "string"
},
"ip": {
"description": "User IP address",
"type": "string"
},
"account": {
"type": "object",
"properties": {
"id": {
"description": "User unique identifier",
"type": "integer"
},
"trustee": {
"description": "Session identity of trusted user",
"type": "integer"
},
"roles": {
"description": "User roles",
"type": "array",
"items": {
"type": "string",
"example": "@user"
}
},
"email": {
"description": "User email",
"type": "string"
}
}
},
"entity": {
"type": "object",
"properties": {
"id": {
"description": "Entity unique identifier",
"type": "integer"
},
"name": {
"description": "Entity name",
"type": "string"
},
"type": {
"description": "Entity type",
"type": "string",
"enum": [
"server",
"switch",
"pdu",
"warehouse_cpu",
"warehouse_storage",
"warehouse_ram",
"warehouse_pci",
"warehouse_other_spare_part"
]
},
"owner": {
"description": "Entity owner",
"type": "integer"
}
}
},
"data": {
"type": "object",
"description": "Journal data fields",
"properties": {
"old": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the server"
},
"mac": {
"type": "string",
"description": "Mac of the server"
},
"os_template": {
"type": "object",
"description": "The OS template information the operation was started with"
},
"platform": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"chassis": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"rack": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"slot": {
"type": "integer",
"description": "Slot ID of the server"
},
"unit": {
"type": "integer",
"description": "Unit ID of the server"
},
"main_ipv4": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"main_ipv6": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"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"
]
},
"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"
]
}
}
},
{
"type": "object",
"properties": {
"pdu_entity": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"pdu_port_entity": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"ipmi": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"operation_id": {
"type": "integer",
"description": "Unique identifier of operation"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"operation_status": {
"type": "string"
},
"os_template_info": {
"type": "object",
"description": "The OS template information the operation was started with"
},
"type": {
"type": "string",
"enum": [
"os_install",
"diag",
"rescue"
],
"description": "Operation type"
},
"template_type": {
"type": "string",
"enum": [
"iso",
"os_template"
],
"description": "Template type"
}
}
},
{
"type": "object",
"properties": {
"ip_id": {
"description": "Unique IP address identifier",
"type": "integer"
},
"ip_net": {
"description": "Unique IP net identifier",
"type": "integer"
},
"ip_pool": {
"description": "Unique IP pool identifier",
"type": "integer"
},
"name": {
"description": "Name of IP address",
"type": "string"
},
"domain": {
"description": "Domain of IP address",
"type": "string"
},
"network": {
"description": "Network of IP address",
"type": "string"
},
"gateway": {
"description": "Gateway of IP address",
"type": "string"
},
"family": {
"description": "Family of IP address",
"enum": [
"ipv4",
"ipv6"
],
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"pdu": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"pdu_port": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"switch": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"switch_port": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"ipmi": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "Unique identifier of spare"
},
"warehouse": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"dci_server_uuid": {
"type": "string",
"description": "Unique identifier of server from DCImanager"
},
"barcode": {
"type": "string",
"description": "Barcode of spare device"
},
"serial_number": {
"type": "string",
"description": "Serial number of spare device"
},
"warranty": {
"type": "string",
"description": "Warranty of spare device"
},
"note": {
"type": "string",
"description": "Note for spare device"
},
"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"
]
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"server": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the Server component"
},
"type": {
"type": "string",
"description": "Type of server component",
"enum": [
"cpu",
"storage",
"ram",
"pci"
]
},
"spare_part_uuid": {
"type": "string",
"description": "UUID spare part from warehouse"
},
"server": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"status": {
"type": "string",
"description": "Status of server component",
"enum": [
"approved",
"not_found"
]
}
}
}
]
},
"new": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the server"
},
"mac": {
"type": "string",
"description": "Mac of the server"
},
"os_template": {
"type": "object",
"description": "The OS template information the operation was started with"
},
"platform": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"chassis": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"rack": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"slot": {
"type": "integer",
"description": "Slot ID of the server"
},
"unit": {
"type": "integer",
"description": "Unit ID of the server"
},
"main_ipv4": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"main_ipv6": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"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"
]
},
"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"
]
}
}
},
{
"type": "object",
"properties": {
"pdu_entity": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"pdu_port_entity": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"ipmi": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"operation_id": {
"type": "integer",
"description": "Unique identifier of operation"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"operation_status": {
"type": "string"
},
"os_template_info": {
"type": "object",
"description": "The OS template information the operation was started with"
},
"type": {
"type": "string",
"enum": [
"os_install",
"diag",
"rescue"
],
"description": "Operation type"
},
"template_type": {
"type": "string",
"enum": [
"iso",
"os_template"
],
"description": "Template type"
}
}
},
{
"type": "object",
"properties": {
"ip_id": {
"description": "Unique IP address identifier",
"type": "integer"
},
"ip_net": {
"description": "Unique IP net identifier",
"type": "integer"
},
"ip_pool": {
"description": "Unique IP pool identifier",
"type": "integer"
},
"name": {
"description": "Name of IP address",
"type": "string"
},
"domain": {
"description": "Domain of IP address",
"type": "string"
},
"network": {
"description": "Network of IP address",
"type": "string"
},
"gateway": {
"description": "Gateway of IP address",
"type": "string"
},
"family": {
"description": "Family of IP address",
"enum": [
"ipv4",
"ipv6"
],
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"pdu": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"pdu_port": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"switch": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"switch_port": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"ipmi": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "Unique identifier of spare"
},
"warehouse": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"dci_server_uuid": {
"type": "string",
"description": "Unique identifier of server from DCImanager"
},
"barcode": {
"type": "string",
"description": "Barcode of spare device"
},
"serial_number": {
"type": "string",
"description": "Serial number of spare device"
},
"warranty": {
"type": "string",
"description": "Warranty of spare device"
},
"note": {
"type": "string",
"description": "Note for spare device"
},
"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"
]
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"server": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the Server component"
},
"type": {
"type": "string",
"description": "Type of server component",
"enum": [
"cpu",
"storage",
"ram",
"pci"
]
},
"spare_part_uuid": {
"type": "string",
"description": "UUID spare part from warehouse"
},
"server": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
},
"alias": {
"type": "string",
"description": "Alias of the entity"
},
"status": {
"type": "string",
"description": "Status of the entity"
},
"size": {
"type": "number",
"description": "Size of entity"
},
"type": {
"type": "string",
"description": "Type of entity"
},
"interface": {
"type": "string",
"description": "Interface of entity"
},
"frequency": {
"type": "string",
"description": "Frequency of entity"
},
"group_name": {
"type": "string",
"description": "Group name of entity"
}
}
},
"status": {
"type": "string",
"description": "Status of server component",
"enum": [
"approved",
"not_found"
]
}
}
}
]
}
}
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving journal list",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive journal information",
"tags": [
"journal"
]
}
},
"/location/{location_id}/os_template": {
"get": {
"operationId": "location_id_os_template_get",
"parameters": [
{
"description": "The location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "List of OS templates at location has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"datetime": {
"type": "string",
"description": "The current date and time of the template from the repository",
"example": "2022-05-28 13:01:26.000000"
},
"filename": {
"type": "string",
"description": "The template filename from the repository",
"example": "AlmaLinux-8-amd64-5.57-202205281301.tar.gz"
},
"id": {
"type": "integer",
"description": "The template unique identifier",
"example": 10
},
"size": {
"description": "The template size in MB",
"type": "integer",
"example": 96
},
"locations": {
"description": "Locations on which the template was installed",
"items": {
"properties": {
"datetime": {
"type": "string",
"description": "The template installation date and time",
"example": "2022-05-28 13:01:26.000000"
},
"version_datetime": {
"type": "string",
"description": "The date and time of the installed template from the repository. If null - download the template again",
"example": "2022-05-28 13:01:26.000000",
"nullable": true
},
"autoupdate": {
"type": "boolean",
"description": "Does auto update is enabled for the OS template on the location.",
"example": false
},
"location": {
"type": "integer",
"description": "The location unique identifier",
"example": 1
},
"status": {
"enum": [
"ok",
"fail",
"installing",
"deleting",
"need_update"
],
"type": "string",
"description": "\\ The template installation status * ok - the template was installed successfully * fail - the error occurred during the template installation * installing - the template is been installing now * deleting - the template is been deleting now * need_update - the template could be updated",
"example": "ok"
},
"status_info": {
"type": "object",
"nullable": true,
"description": "The additional information about the template status, i.e. the error information"
},
"macro": {
"type": "object",
"example": {
"($NAMESERVERv4)": "8.8.8.8"
},
"description": "The installed template macros redefinition"
}
},
"type": "object"
},
"type": "array"
},
"name": {
"type": "string",
"description": "The template name",
"example": "AlmaLinux-8-amd64"
},
"status": {
"enum": [
"none",
"installed"
],
"type": "string",
"description": "\\ The template installation status * none - the template wasn't been installed at all * installed - the template was installed at least on one of the locations",
"example": "installed"
},
"status_info": {
"type": "object",
"nullable": true,
"description": "The additional information about the template status, i.e. the error information"
},
"tags": {
"items": {
"type": "string",
"description": "\\ The template tag. It uses for template grouping and checking script running availability",
"example": "almalinux8"
},
"type": "array"
},
"type": {
"enum": [
"ostemplate",
"diag",
"rescue",
"serversearch",
"isotemplate"
],
"type": "string",
"description": "The template type",
"example": "ostemplate"
},
"version": {
"type": "string",
"description": "The template version in the repository",
"example": "5.57"
},
"owner": {
"type": "object",
"nullable": true,
"description": "The custom template owner. null if the template was downloaded from any repository",
"properties": {
"id": {
"type": "integer",
"description": "The user unique identifier",
"example": 3
},
"email": {
"type": "string",
"description": "The user email",
"example": "admin@example.com"
}
}
},
"repository": {
"type": "object",
"nullable": true,
"description": "The template repository information",
"properties": {
"id": {
"type": "integer",
"description": "The template repository unique identifier",
"example": 1
},
"name": {
"type": "string",
"description": "The template repository name",
"example": "ISPsystem"
}
}
},
"directory_name": {
"type": "string",
"description": "The directory where the template was installed",
"example": "AlmaLinux-8-amd64__ISPsystem__1"
},
"access": {
"enum": [
"admin",
"all"
],
"type": "string",
"description": "\\ The template access level. * admin - if the template available only for users with @admin level * all - if the template available for all the users",
"example": "all"
},
"macro": {
"description": "The template macros redefinition",
"type": "object",
"example": {
"($MIRROR)": "http://mirror.yandex.ru/almalinux"
}
},
"efi": {
"type": "boolean",
"description": "Does the template support EFI",
"example": true
},
"supported_raids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Raids supported by the template"
},
"sshpublickey": {
"type": "boolean",
"description": "Does the OS template support passing public SSH-keys on the server"
},
"multiple_loaders": {
"type": "boolean",
"description": "Does the OS template support multiple loaders, such as PXE and iPXE"
},
"illegal_password_characters": {
"type": "string",
"description": "The characters that cannot be in a server password"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving OS template information",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive OS templates at location",
"tags": [
"os_template"
]
}
},
"/location/{location_id}/os_template/download": {
"post": {
"operationId": "location_id_os_template_download_post",
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"os_templates": {
"items": {
"type": "integer"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "OS templates have been uploaded to location",
"content": {
"application/json": {
"schema": {
"properties": {
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error uploading OS templates to location",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Uploading OS templates to location",
"tags": [
"os_template"
]
}
},
"/location/{location_id}/os_template/remove": {
"post": {
"operationId": "location_id_os_template_remove_post",
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"os_templates": {
"items": {
"type": "integer"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "OS templates have been deleted from location",
"content": {
"application/json": {
"schema": {
"properties": {
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting OS template from location",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete OS templates from location",
"tags": [
"os_template"
]
}
},
"/os_template": {
"get": {
"operationId": "os_template_get",
"responses": {
"200": {
"description": "List of OS templates has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"datetime": {
"type": "string",
"description": "The current date and time of the template from the repository",
"example": "2022-05-28 13:01:26.000000"
},
"filename": {
"type": "string",
"description": "The template filename from the repository",
"example": "AlmaLinux-8-amd64-5.57-202205281301.tar.gz"
},
"id": {
"type": "integer",
"description": "The template unique identifier",
"example": 10
},
"size": {
"description": "The template size in MB",
"type": "integer",
"example": 96
},
"locations": {
"description": "Locations on which the template was installed",
"items": {
"properties": {
"datetime": {
"type": "string",
"description": "The template installation date and time",
"example": "2022-05-28 13:01:26.000000"
},
"version_datetime": {
"type": "string",
"description": "The date and time of the installed template from the repository. If null - download the template again",
"example": "2022-05-28 13:01:26.000000",
"nullable": true
},
"autoupdate": {
"type": "boolean",
"description": "Does auto update is enabled for the OS template on the location.",
"example": false
},
"location": {
"type": "integer",
"description": "The location unique identifier",
"example": 1
},
"status": {
"enum": [
"ok",
"fail",
"installing",
"deleting",
"need_update"
],
"type": "string",
"description": "\\ The template installation status * ok - the template was installed successfully * fail - the error occurred during the template installation * installing - the template is been installing now * deleting - the template is been deleting now * need_update - the template could be updated",
"example": "ok"
},
"status_info": {
"type": "object",
"nullable": true,
"description": "The additional information about the template status, i.e. the error information"
},
"macro": {
"type": "object",
"example": {
"($NAMESERVERv4)": "8.8.8.8"
},
"description": "The installed template macros redefinition"
}
},
"type": "object"
},
"type": "array"
},
"name": {
"type": "string",
"description": "The template name",
"example": "AlmaLinux-8-amd64"
},
"status": {
"enum": [
"none",
"installed"
],
"type": "string",
"description": "\\ The template installation status * none - the template wasn't been installed at all * installed - the template was installed at least on one of the locations",
"example": "installed"
},
"status_info": {
"type": "object",
"nullable": true,
"description": "The additional information about the template status, i.e. the error information"
},
"tags": {
"items": {
"type": "string",
"description": "\\ The template tag. It uses for template grouping and checking script running availability",
"example": "almalinux8"
},
"type": "array"
},
"type": {
"enum": [
"ostemplate",
"diag",
"rescue",
"serversearch",
"isotemplate"
],
"type": "string",
"description": "The template type",
"example": "ostemplate"
},
"version": {
"type": "string",
"description": "The template version in the repository",
"example": "5.57"
},
"owner": {
"type": "object",
"nullable": true,
"description": "The custom template owner. null if the template was downloaded from any repository",
"properties": {
"id": {
"type": "integer",
"description": "The user unique identifier",
"example": 3
},
"email": {
"type": "string",
"description": "The user email",
"example": "admin@example.com"
}
}
},
"repository": {
"type": "object",
"nullable": true,
"description": "The template repository information",
"properties": {
"id": {
"type": "integer",
"description": "The template repository unique identifier",
"example": 1
},
"name": {
"type": "string",
"description": "The template repository name",
"example": "ISPsystem"
}
}
},
"directory_name": {
"type": "string",
"description": "The directory where the template was installed",
"example": "AlmaLinux-8-amd64__ISPsystem__1"
},
"access": {
"enum": [
"admin",
"all"
],
"type": "string",
"description": "\\ The template access level. * admin - if the template available only for users with @admin level * all - if the template available for all the users",
"example": "all"
},
"macro": {
"description": "The template macros redefinition",
"type": "object",
"example": {
"($MIRROR)": "http://mirror.yandex.ru/almalinux"
}
},
"efi": {
"type": "boolean",
"description": "Does the template support EFI",
"example": true
},
"supported_raids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Raids supported by the template"
},
"sshpublickey": {
"type": "boolean",
"description": "Does the OS template support passing public SSH-keys on the server"
},
"multiple_loaders": {
"type": "boolean",
"description": "Does the OS template support multiple loaders, such as PXE and iPXE"
},
"illegal_password_characters": {
"type": "string",
"description": "The characters that cannot be in a server password"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving a list of OS templates",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive list of OS templates",
"tags": [
"os_template"
]
}
},
"/os_template/check": {
"post": {
"operationId": "os_template_check_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "List of OS templates has been updated successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error updating list of OS templates",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Check list of OS templates",
"tags": [
"os_template"
]
}
},
"/os_template/{os_template_id}": {
"get": {
"operationId": "os_template_id_get",
"parameters": [
{
"description": "The OS template unique identifier",
"in": "path",
"name": "os_template_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "OS template information has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"datetime": {
"type": "string",
"description": "The current date and time of the template from the repository",
"example": "2022-05-28 13:01:26.000000"
},
"filename": {
"type": "string",
"description": "The template filename from the repository",
"example": "AlmaLinux-8-amd64-5.57-202205281301.tar.gz"
},
"id": {
"type": "integer",
"description": "The template unique identifier",
"example": 10
},
"size": {
"description": "The template size in MB",
"type": "integer",
"example": 96
},
"locations": {
"description": "Locations on which the template was installed",
"items": {
"properties": {
"datetime": {
"type": "string",
"description": "The template installation date and time",
"example": "2022-05-28 13:01:26.000000"
},
"version_datetime": {
"type": "string",
"description": "The date and time of the installed template from the repository. If null - download the template again",
"example": "2022-05-28 13:01:26.000000",
"nullable": true
},
"autoupdate": {
"type": "boolean",
"description": "Does auto update is enabled for the OS template on the location.",
"example": false
},
"location": {
"type": "integer",
"description": "The location unique identifier",
"example": 1
},
"status": {
"enum": [
"ok",
"fail",
"installing",
"deleting",
"need_update"
],
"type": "string",
"description": "\\ The template installation status * ok - the template was installed successfully * fail - the error occurred during the template installation * installing - the template is been installing now * deleting - the template is been deleting now * need_update - the template could be updated",
"example": "ok"
},
"status_info": {
"type": "object",
"nullable": true,
"description": "The additional information about the template status, i.e. the error information"
},
"macro": {
"type": "object",
"example": {
"($NAMESERVERv4)": "8.8.8.8"
},
"description": "The installed template macros redefinition"
}
},
"type": "object"
},
"type": "array"
},
"name": {
"type": "string",
"description": "The template name",
"example": "AlmaLinux-8-amd64"
},
"status": {
"enum": [
"none",
"installed"
],
"type": "string",
"description": "\\ The template installation status * none - the template wasn't been installed at all * installed - the template was installed at least on one of the locations",
"example": "installed"
},
"status_info": {
"type": "object",
"nullable": true,
"description": "The additional information about the template status, i.e. the error information"
},
"tags": {
"items": {
"type": "string",
"description": "\\ The template tag. It uses for template grouping and checking script running availability",
"example": "almalinux8"
},
"type": "array"
},
"type": {
"enum": [
"ostemplate",
"diag",
"rescue",
"serversearch",
"isotemplate"
],
"type": "string",
"description": "The template type",
"example": "ostemplate"
},
"version": {
"type": "string",
"description": "The template version in the repository",
"example": "5.57"
},
"owner": {
"type": "object",
"nullable": true,
"description": "The custom template owner. null if the template was downloaded from any repository",
"properties": {
"id": {
"type": "integer",
"description": "The user unique identifier",
"example": 3
},
"email": {
"type": "string",
"description": "The user email",
"example": "admin@example.com"
}
}
},
"repository": {
"type": "object",
"nullable": true,
"description": "The template repository information",
"properties": {
"id": {
"type": "integer",
"description": "The template repository unique identifier",
"example": 1
},
"name": {
"type": "string",
"description": "The template repository name",
"example": "ISPsystem"
}
}
},
"directory_name": {
"type": "string",
"description": "The directory where the template was installed",
"example": "AlmaLinux-8-amd64__ISPsystem__1"
},
"access": {
"enum": [
"admin",
"all"
],
"type": "string",
"description": "\\ The template access level. * admin - if the template available only for users with @admin level * all - if the template available for all the users",
"example": "all"
},
"macro": {
"description": "The template macros redefinition",
"type": "object",
"example": {
"($MIRROR)": "http://mirror.yandex.ru/almalinux"
}
},
"efi": {
"type": "boolean",
"description": "Does the template support EFI",
"example": true
},
"supported_raids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Raids supported by the template"
},
"sshpublickey": {
"type": "boolean",
"description": "Does the OS template support passing public SSH-keys on the server"
},
"multiple_loaders": {
"type": "boolean",
"description": "Does the OS template support multiple loaders, such as PXE and iPXE"
},
"illegal_password_characters": {
"type": "string",
"description": "The characters that cannot be in a server password"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving OS template information",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive OS template information",
"tags": [
"os_template"
]
},
"post": {
"operationId": "os_template_id_post",
"parameters": [
{
"description": "The OS template unique identifier",
"in": "path",
"name": "os_template_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"macro": {
"description": "OS template macros redefinition",
"example": {
"($NAMESERVER)": "1.1.1.1"
},
"type": "object"
},
"access": {
"enum": [
"admin",
"all"
],
"type": "string",
"description": "The access level for OS template",
"example": "all"
},
"autoupdate": {
"type": "boolean",
"description": "Enable/disable automatic template update on the location",
"example": false
}
}
}
}
}
},
"responses": {
"200": {
"description": "The OS template settings has been changed",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "The error changing OS template settings",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "The OS template settings changing",
"tags": [
"os_template"
]
}
},
"/location/{location_id}/os_template/{os_template_id}": {
"post": {
"operationId": "location_id_os_template_id_post",
"parameters": [
{
"description": "The OS template unique identifier",
"in": "path",
"name": "os_template_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"macro": {
"description": "OS template macros redefinition",
"example": {
"($NAMESERVER)": "1.1.1.1"
},
"type": "object"
},
"access": {
"enum": [
"admin",
"all"
],
"type": "string",
"description": "The access level for OS template",
"example": "all"
},
"autoupdate": {
"type": "boolean",
"description": "Enable/disable automatic template update on the location",
"example": false
}
}
}
}
}
},
"responses": {
"200": {
"description": "The OS template settings on location has been changed",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "The error changing OS template settings on location",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "The OS template settings on location changing",
"tags": [
"os_template"
]
}
},
"/location/{location_id}/os_template/{os_template_id}/copy": {
"post": {
"operationId": "location_id_os_template_id_copy_post",
"parameters": [
{
"description": "The OS template unique identifier",
"in": "path",
"name": "os_template_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"required": [
"name",
"access"
],
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the OS template",
"pattern": "^[\\w .-]+$"
},
"access": {
"enum": [
"admin",
"all"
],
"type": "string",
"description": "The access level for OS template"
},
"efi": {
"type": "boolean",
"description": "Does the OS template support EFI"
},
"tags": {
"description": "Tags",
"items": {
"type": "string"
},
"type": "array"
},
"macro": {
"description": "OS template macros redefinition",
"example": "{\"($NAMESERVER)\": \"1.1.1.1\"}",
"type": "object"
},
"hdd_raid": {
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
],
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "The OS template on location has been copied",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "The error of copying OS template on location",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "The OS template copying on location",
"tags": [
"os_template"
]
}
},
"/location/{location_id}/os_template/{os_template_id}/status": {
"post": {
"operationId": "location_id_os_template_id_status_post",
"parameters": [
{
"description": "The OS template unique identifier",
"in": "path",
"name": "os_template_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"required": [
"status"
],
"type": "object",
"properties": {
"status": {
"enum": [
"ok",
"fail"
],
"type": "string",
"description": "New status of the OS template"
},
"status_info": {
"type": "object",
"description": "Status info details"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Status of the OS template on location has been updated",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "The error of status updating of the OS template on location",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "The OS template status update on location",
"tags": [
"os_template"
]
}
},
"/os_template/preset_layout/{disk_size}": {
"get": {
"operationId": "os_template_preset_layout_get",
"parameters": [
{
"description": "Total selected disk size (in gigabytes) by user for partitioning",
"in": "path",
"name": "disk_size",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "The OS template preset layouts received",
"content": {
"application/json": {
"schema": {
"properties": {
"CentOS-6-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"CentOS-6-amd64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"CentOS-7-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"CentOS-7-amd64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"CentOS-8-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Debian-10-x86_64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Debian-10-x86_64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Debian-7-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Debian-7-amd64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Debian-8-x86_64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Debian-8-x86_64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Debian-9-x86_64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Debian-9-x86_64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"FreeBSD-10-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"FreeBSD-10-amd64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"FreeBSD-11-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"FreeBSD-11-amd64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"FreeBSD-12-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"FreeBSD-12-amd64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"FreeBSD-9-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Ubuntu-14.04-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Ubuntu-14.04-amd64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Ubuntu-16.04-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Ubuntu-16.04-amd64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Ubuntu-18.04-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Ubuntu-18.04-amd64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Ubuntu-20.04-amd64": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
},
"Ubuntu-20.04-amd64-netinstall": {
"type": "object",
"properties": {
"raid": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"no_raid",
"raid_0",
"raid_1",
"raid_5",
"raid_10"
]
},
"partition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mountpoint": {
"type": "string"
},
"size": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"swap",
"ext2",
"ext3",
"ext4",
"xfs",
"ufs",
"zfs"
]
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"default": {
"description": "The error while getting OS template preset layouts",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "The OS template preset layouts",
"tags": [
"os_template"
]
}
},
"/warehouse/storage": {
"get": {
"operationId": "warehouse_storage_get",
"responses": {
"200": {
"description": "Storages 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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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 storages",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all storages",
"tags": [
"storage",
"warehouse"
]
}
},
"/warehouse/{warehouse_id}/storage": {
"post": {
"operationId": "storage_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": 1679845,
"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": "Storage has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving storage",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create storage",
"tags": [
"storage",
"warehouse"
]
},
"get": {
"operationId": "storage_get",
"parameters": [
{
"description": "Warehouse unique identifier",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Storages 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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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 storages",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all storages",
"tags": [
"storage",
"warehouse"
]
}
},
"/storage/{storage_id}": {
"get": {
"operationId": "storage_id_get",
"parameters": [
{
"description": "Storage unique identifier or UUID",
"in": "path",
"name": "storage_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Storage 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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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": "Storage not found",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive storage",
"tags": [
"storage",
"warehouse"
]
},
"post": {
"operationId": "storage_id_post",
"parameters": [
{
"description": "Storage unique identifier or UUID",
"in": "path",
"name": "storage_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": 1679845,
"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": "Storage has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving storage",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit storage",
"tags": [
"storage",
"warehouse"
]
}
},
"/storage/{storage_id}/remove": {
"post": {
"operationId": "storage_id_remove_post",
"parameters": [
{
"description": "Storage unique identifier",
"in": "path",
"name": "storage_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": "Storage has been removed successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error removing Storage",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Remove Storage",
"tags": [
"storage",
"warehouse"
]
}
},
"/get_license": {
"get": {
"operationId": "get_license",
"summary": "Receiving license",
"tags": [
"license"
],
"responses": {
"200": {
"description": "License has been received successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"license_type": {
"description": "License type (empty value for old license)",
"type": "string",
"enum": [
"box",
"infrastructure"
]
},
"device_limit_exceeded": {
"description": "Device limit has been exceeded",
"example": true,
"type": "boolean"
},
"device_limit": {
"description": "Maximum number of devices",
"example": 250,
"type": "integer"
},
"total_devices": {
"description": "Current number of devices",
"example": 117,
"type": "integer"
},
"warehouse_device_limit_exceeded": {
"description": "Warehouse device limit has been exceeded",
"example": true,
"type": "boolean"
},
"warehouse_device_limit": {
"description": "Maximum number of warehouse devices",
"example": 250,
"type": "integer"
},
"warehouse_total_devices": {
"description": "Current number of warehouse devices",
"example": 117,
"type": "integer"
},
"limits": {
"type": "object",
"properties": {
"used": {
"type": "object",
"properties": {
"device": {
"type": "integer",
"description": "Current number of devices (4 Auth)"
},
"warehouse": {
"type": "integer",
"description": "Current number of devices (4 Auth)"
}
}
}
}
},
"license": {
"description": "License information",
"type": "object",
"properties": {
"time_to_end": {
"description": "Remaining time to license expiration date",
"example": 1568739759,
"type": "number"
},
"expiration_date": {
"description": "The license expiration date",
"example": 1780725966,
"type": "number"
},
"user_id": {
"description": "User ID",
"example": 42,
"type": "integer"
},
"metric_id": {
"description": "User ID hash(md5) of the license token",
"type": "string"
},
"device_limit": {
"description": "Maximum number of devices from license",
"example": 250,
"type": "integer"
},
"warehouse_device_limit": {
"description": "Maximum number of warehouse devices from license",
"example": 250,
"type": "integer"
},
"region": {
"description": "License region",
"example": "eu",
"type": "string"
},
"oem_vendor": {
"description": "OEM vendor",
"example": "se_something",
"type": "string"
}
}
},
"ssh": {
"description": "SSH data to open access to the support team",
"type": "object",
"properties": {
"key": {
"description": "SSH open key",
"type": "string"
},
"config": {
"description": "SSH config",
"type": "string"
}
}
},
"rack_view": {
"description": "Rack view module payment status (false if not paid)",
"example": true,
"type": "boolean"
},
"server_monitoring": {
"description": "Server monitoring module payment status (true if paid, otherwise - false)",
"example": true,
"type": "boolean"
},
"packets": {
"description": "List of activated packets",
"type": "array",
"items": {
"type": "object",
"properties": {
"activate_date": {
"description": "The packet activation date",
"type": "number",
"example": 1635868800
},
"expire_date": {
"description": "The packet expiration date",
"type": "number",
"example": 1635868800
},
"key": {
"description": "The activation key",
"type": "string",
"example": "RandomString"
},
"limits": {
"description": "The packet limits",
"type": "object",
"properties": {
"device_limit": {
"type": "integer",
"description": "The packet limit of devices",
"example": 50
}
}
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving license",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/update_license": {
"post": {
"operationId": "update_license",
"summary": "The license update",
"tags": [
"license"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"internal": {
"description": "Internal update without request to license service",
"type": "boolean",
"default": false,
"example": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "License has been updated successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error updating license",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/packet": {
"post": {
"operationId": "packet",
"summary": "Active packet for license",
"tags": [
"license"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"key": {
"description": "Billmanager packet key",
"type": "string",
"example": "xB6AEy1mPu9jC5hF"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Packet has been activated successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Failed to activate license packet",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/location/{location_id}/server_search": {
"post": {
"operationId": "server_search_post",
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"ip_range": {
"description": "Ranges of IP addresses where the module will search servers (comma separated values)",
"type": "string",
"example": "10.0.2.42-10.0.2.254,10.0.4.42/27"
},
"username": {
"description": "Username for Redfish or IPMI connection",
"type": "string"
},
"password": {
"description": "Password that can be used to access the server where the server search template was running (or for Redfish or IPMI connection)",
"pattern": "^[^ ]",
"type": "string"
},
"search_type": {
"description": "Type of the server search",
"type": "string",
"enum": [
"auto",
"ipmi",
"ipmi_lanplus",
"redfish"
],
"default": "redfish"
}
},
"required": [
"ip_range",
"username",
"password"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"description": "Location IP address for DHCP-server settings",
"type": "string",
"format": "ipv4",
"example": "10.0.2.40"
},
"network": {
"description": "The network unique identifier",
"type": "integer",
"example": 1
},
"ip_range": {
"description": "Range of IP addresses that will be allocated to new servers. The range must not contain the location IP address",
"type": "string",
"example": "10.0.2.42-10.0.2.254 or 10.0.2.42/27"
},
"os_template": {
"description": "The servers search template unique identifier",
"type": "integer",
"example": 66
},
"password": {
"description": "Password that can be used to access the server where the server search template was running (or for Redfish or IPMI connection)",
"pattern": "^[^ ]",
"type": "string"
},
"allow_pdu_connection_search": {
"description": "Allow search connections to the PDU",
"type": "boolean"
},
"allow_ipmi_connection_search": {
"description": "Allow search connections to the IPMI",
"type": "boolean"
},
"allow_input_additional_info": {
"description": "Allow additional information to be entered through the console",
"type": "boolean"
},
"ipmi_pool": {
"description": "Only if `allow_ipmi_connection_search` is True. IPMI IP address allocation pool",
"type": "integer"
},
"search_type": {
"description": "Type of the server search",
"type": "string",
"default": "pxe",
"enum": [
"pxe"
]
}
},
"required": [
"address",
"network",
"ip_range",
"os_template",
"password"
],
"type": "object"
}
]
}
}
}
},
"responses": {
"200": {
"description": "Servers search setting has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating servers search setting",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Creating servers search setting",
"tags": [
"server_search"
]
}
},
"/location/{location_id}/connection_search": {
"post": {
"summary": "Start the connection search for new servers",
"tags": [
"server_search"
],
"operationId": "connection_search_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": "The connection search has started",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Failed to start the connection search",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/server_search": {
"get": {
"operationId": "server_search_get",
"summary": "Server search settings list",
"tags": [
"server_search"
],
"responses": {
"200": {
"description": "Servers search settings have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Servers search setting unique identifier"
},
"location": {
"description": "The location unique identifier",
"type": "object",
"properties": {
"id": {
"description": "The location unique identifier",
"type": "integer"
},
"name": {
"description": "The location name identifier",
"type": "string"
}
}
},
"address": {
"description": "Location IP address for DHCP-server settings",
"type": "string",
"format": "ipv4",
"example": "10.0.2.40"
},
"network": {
"description": "The network info from IPmanager",
"type": "object"
},
"ip_range": {
"description": "Range of IP addresses that will allocated to new servers. The range must not contain the location IP address",
"type": "string",
"example": "10.0.2.42-10.0.2.254 or 10.0.2.42/27"
},
"os_template": {
"description": "The servers search template unique identifier",
"type": "integer",
"example": 66
},
"location_os_template": {
"description": "The location template unique identifier",
"type": "integer",
"example": 66
},
"username": {
"description": "Username for Redfish or IPMI connection",
"type": "string"
},
"password": {
"description": "Password that can be used to access the server where the server search template was running (or for Redfish or IPMI connection)",
"pattern": "^[^ ]",
"type": "string"
},
"allow_pdu_connection_search": {
"description": "Allow search connections to the PDU",
"type": "boolean"
},
"allow_ipmi_connection_search": {
"description": "Allow search connections to the IPMI",
"type": "boolean"
},
"ipmi_pool": {
"description": "Only if `allow_ipmi_connection_search` is True. IPMI IP address allocation pool",
"type": "integer"
},
"allow_input_additional_info": {
"description": "Allow additional information to be entered through the console",
"type": "boolean"
},
"last_run": {
"description": "Date of the last search run",
"type": "string"
},
"search_status": {
"description": "Status of the search",
"enum": [
"ok",
"fail",
"running"
],
"type": "string"
},
"status": {
"enum": [
"setup",
"ok",
"setup_failed",
"disabling",
"disabled",
"disable_failed",
"deleting",
"delete_failed"
],
"type": "string"
},
"status_info": {
"type": "object"
},
"search_type": {
"description": "Type of the server search",
"type": "string",
"enum": [
"auto",
"pxe",
"ipmi",
"redfish"
]
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of server search settings",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/server_search/{server_search_id}": {
"post": {
"operationId": "server_search_id_post",
"summary": "Edit servers search setting",
"tags": [
"server_search"
],
"parameters": [
{
"description": "Servers search setting unique identifier",
"in": "path",
"name": "server_search_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"address": {
"description": "Location IP address for DHCP-server settings",
"type": "string",
"format": "ipv4",
"example": "10.0.2.40"
},
"network": {
"description": "The network unique identifier",
"type": "integer",
"example": 1
},
"ip_range": {
"description": "Range of IP addresses that will be allocated to new servers. The range must not contain the location IP address",
"type": "string",
"example": "10.0.2.42-10.0.2.254 or 10.0.2.42/27"
},
"os_template": {
"description": "The servers search template unique identifier",
"type": "integer",
"example": 66
},
"username": {
"description": "Username for Redfish or IPMI connection",
"type": "string"
},
"password": {
"description": "Password that can be used to access the server where the server search template was running (or for Redfish or IPMI connection)",
"pattern": "^[^ ]",
"type": "string"
},
"allow_pdu_connection_search": {
"description": "Allow search connections to the PDU",
"type": "boolean"
},
"allow_ipmi_connection_search": {
"description": "Allow search connections to the IPMI",
"type": "boolean"
},
"allow_input_additional_info": {
"description": "Allow additional information to be entered through the console",
"type": "boolean"
},
"ipmi_pool": {
"description": "Only if `allow_ipmi_connection_search` is True. IPMI IP address allocation pool",
"type": "integer"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Servers search setting has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error editing servers search setting",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"delete": {
"operationId": "server_search_id_delete",
"summary": "Delete servers search setting",
"tags": [
"server_search"
],
"parameters": [
{
"description": "Servers search setting unique identifier",
"in": "path",
"name": "server_search_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Servers search setting has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting servers search setting",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"get": {
"operationId": "server_search_id_get",
"summary": "Servers search setting info",
"parameters": [
{
"description": "Servers search setting unique identifier",
"in": "path",
"name": "server_search_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"tags": [
"server_search"
],
"responses": {
"200": {
"description": "Servers search setting have been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Servers search setting unique identifier"
},
"location": {
"description": "The location unique identifier",
"type": "object",
"properties": {
"id": {
"description": "The location unique identifier",
"type": "integer"
},
"name": {
"description": "The location name identifier",
"type": "string"
}
}
},
"address": {
"description": "Location IP address for DHCP-server settings",
"type": "string",
"format": "ipv4",
"example": "10.0.2.40"
},
"network": {
"description": "The network info from IPmanager",
"type": "object"
},
"ip_range": {
"description": "Range of IP addresses that will allocated to new servers. The range must not contain the location IP address",
"type": "string",
"example": "10.0.2.42-10.0.2.254 or 10.0.2.42/27"
},
"os_template": {
"description": "The servers search template unique identifier",
"type": "integer",
"example": 66
},
"location_os_template": {
"description": "The location template unique identifier",
"type": "integer",
"example": 66
},
"username": {
"description": "Username for Redfish or IPMI connection",
"type": "string"
},
"password": {
"description": "Password that can be used to access the server where the server search template was running (or for Redfish or IPMI connection)",
"pattern": "^[^ ]",
"type": "string"
},
"allow_pdu_connection_search": {
"description": "Allow search connections to the PDU",
"type": "boolean"
},
"allow_ipmi_connection_search": {
"description": "Allow search connections to the IPMI",
"type": "boolean"
},
"ipmi_pool": {
"description": "Only if `allow_ipmi_connection_search` is True. IPMI IP address allocation pool",
"type": "integer"
},
"allow_input_additional_info": {
"description": "Allow additional information to be entered through the console",
"type": "boolean"
},
"last_run": {
"description": "Date of the last search run",
"type": "string"
},
"search_status": {
"description": "Status of the search",
"enum": [
"ok",
"fail",
"running"
],
"type": "string"
},
"status": {
"enum": [
"setup",
"ok",
"setup_failed",
"disabling",
"disabled",
"disable_failed",
"deleting",
"delete_failed"
],
"type": "string"
},
"status_info": {
"type": "object"
},
"search_type": {
"description": "Type of the server search",
"type": "string",
"enum": [
"auto",
"pxe",
"ipmi",
"redfish"
]
}
}
}
}
}
},
"default": {
"description": "Error receiving servers search setting",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/server_search/enable": {
"post": {
"operationId": "server_search_module_enable",
"summary": "Enable servers search module",
"tags": [
"server_search_module"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Servers search module enabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Servers search module enable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/server_search/disable": {
"post": {
"operationId": "server_search_module_disable",
"summary": "Disable servers search module",
"tags": [
"server_search_module"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Servers search module disabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Servers search module disable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/server_search/status": {
"get": {
"operationId": "server_search_module_status",
"responses": {
"200": {
"description": "Servers search module status has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving servers search module status",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Servers search module status",
"tags": [
"server_search_module"
]
}
},
"/server_search/{server_search_id}/disable": {
"post": {
"operationId": "server_search_id_disable",
"summary": "Disable servers search setting",
"tags": [
"server_search"
],
"parameters": [
{
"description": "The servers search setting unique identifier",
"in": "path",
"name": "server_search_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Servers search setting disabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Servers search setting disable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/server_search/{server_search_id}/enable": {
"post": {
"operationId": "server_search_id_enable",
"summary": "Enable servers search setting",
"tags": [
"server_search"
],
"parameters": [
{
"description": "The servers search setting unique identifier",
"in": "path",
"name": "server_search_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Servers search setting enabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Servers search setting enable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/platform": {
"get": {
"operationId": "platform_get",
"responses": {
"200": {
"description": "Platforms have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"id": {
"type": "integer",
"description": "Platform identifier"
},
"name": {
"description": "Platform name",
"type": "string"
},
"type": {
"description": "Server type",
"type": "string"
},
"server_size": {
"description": "Server size",
"type": "number"
},
"cpu_socket_name": {
"description": "CPU socket name",
"type": "string",
"example": "LGA1156",
"nullable": true
},
"cpu_socket_count": {
"description": "Number of sockets for cpu",
"type": "integer",
"nullable": true
},
"ram_slot_count": {
"description": "Number of slots for RAM",
"type": "integer",
"nullable": true
},
"max_ram": {
"description": "Maximum RAM size",
"type": "integer",
"nullable": true
},
"hdd_slot_count": {
"description": "Number of slots for hdd_slot_count",
"type": "integer",
"nullable": true
},
"pci_slot_count": {
"description": "Number of slots for PCI-devices",
"type": "integer",
"nullable": true
},
"storage_25_slot_count": {
"description": "Number of slots for 2.5 drives",
"type": "integer",
"nullable": true
},
"storage_35_slot_count": {
"description": "Number of slots for 3.5 drives",
"type": "integer",
"nullable": true
},
"m2_slot_count": {
"description": "Number of slots for m2 devices",
"type": "integer",
"nullable": true
},
"u2_slot_count": {
"description": "Number of slots for u2 devices",
"type": "integer",
"nullable": true
},
"server_count": {
"description": "Number of servers with this platform by the locations",
"type": "array",
"items": {
"type": "object",
"properties": {
"location_id": {
"description": "The location identifier",
"type": "integer"
},
"location_name": {
"description": "The location name",
"type": "string"
},
"server_count": {
"description": "The number of servers that used this platform on the location",
"type": "integer"
}
}
}
},
"server_count_total": {
"description": "The total number of server with such platform",
"type": "integer"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of platforms",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all platforms",
"tags": [
"platform"
]
},
"post": {
"operationId": "platform_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"required": [
"name",
"type",
"server_size"
],
"type": "object",
"properties": {
"name": {
"description": "Platform name",
"type": "string",
"minLength": 1,
"maxLength": 255,
"example": "Platform 1"
},
"type": {
"description": "Server type",
"type": "string",
"enum": [
"server",
"blade"
]
},
"server_size": {
"description": "Server size",
"type": "number",
"multipleOf": 0.5,
"minimum": 0,
"maximum": 99
},
"cpu_socket": {
"description": "CPU socket ID. Deprecated, use cpu_socket_name instead",
"type": "integer",
"deprecated": true
},
"cpu_socket_name": {
"description": "CPU socket name",
"type": "string",
"maxLength": 255,
"example": "LGA1156"
},
"cpu_socket_count": {
"description": "Number of sockets for cpu",
"type": "integer"
},
"ram_slot_count": {
"description": "Number of slots for RAM",
"type": "integer",
"minimum": 1,
"maximum": 128
},
"max_ram": {
"description": "Maximum RAM size",
"type": "integer",
"minimum": 1,
"maximum": 2147483647
},
"hdd_slot_count": {
"description": "Number of slots for hdd_slot_count",
"type": "integer",
"minimum": 1,
"maximum": 90
},
"pci_slot_count": {
"description": "Number of slots for PCI-devices",
"type": "integer",
"minimum": 1,
"maximum": 30
},
"storage_25_slot_count": {
"description": "Number of slots for 2.5 drives",
"type": "integer"
},
"storage_35_slot_count": {
"description": "Number of slots for 3.5 drives",
"type": "integer"
},
"m2_slot_count": {
"description": "Number of slots for m2 devices",
"type": "integer"
},
"u2_slot_count": {
"description": "Number of slots for u2 devices",
"type": "integer"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Platform has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating platform",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create platform",
"tags": [
"platform"
]
}
},
"/platform/{platform_id}": {
"get": {
"operationId": "platform_id_get",
"parameters": [
{
"description": "Platform unique identifier",
"in": "path",
"name": "platform_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Platform has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer",
"description": "Platform identifier"
},
"name": {
"description": "Platform name",
"type": "string"
},
"type": {
"description": "Server type",
"type": "string"
},
"server_size": {
"description": "Server size",
"type": "number"
},
"cpu_socket_name": {
"description": "CPU socket name",
"type": "string",
"example": "LGA1156",
"nullable": true
},
"cpu_socket_count": {
"description": "Number of sockets for cpu",
"type": "integer",
"nullable": true
},
"ram_slot_count": {
"description": "Number of slots for RAM",
"type": "integer",
"nullable": true
},
"max_ram": {
"description": "Maximum RAM size",
"type": "integer",
"nullable": true
},
"hdd_slot_count": {
"description": "Number of slots for hdd_slot_count",
"type": "integer",
"nullable": true
},
"pci_slot_count": {
"description": "Number of slots for PCI-devices",
"type": "integer",
"nullable": true
},
"storage_25_slot_count": {
"description": "Number of slots for 2.5 drives",
"type": "integer",
"nullable": true
},
"storage_35_slot_count": {
"description": "Number of slots for 3.5 drives",
"type": "integer",
"nullable": true
},
"m2_slot_count": {
"description": "Number of slots for m2 devices",
"type": "integer",
"nullable": true
},
"u2_slot_count": {
"description": "Number of slots for u2 devices",
"type": "integer",
"nullable": true
},
"server_count": {
"description": "Number of servers with this platform by the locations",
"type": "array",
"items": {
"type": "object",
"properties": {
"location_id": {
"description": "The location identifier",
"type": "integer"
},
"location_name": {
"description": "The location name",
"type": "string"
},
"server_count": {
"description": "The number of servers that used this platform on the location",
"type": "integer"
}
}
}
},
"server_count_total": {
"description": "The total number of server with such platform",
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Platform not found",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive platform",
"tags": [
"platform"
]
},
"post": {
"operationId": "platform_id_post",
"parameters": [
{
"description": "Platform unique identifier",
"in": "path",
"name": "platform_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"description": "Platform name",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"cpu_socket_name": {
"description": "CPU socket name",
"type": "string",
"maxLength": 255,
"example": "LGA1156"
},
"server_size": {
"description": "Server size",
"type": "number",
"multipleOf": 0.5,
"minimum": 0,
"maximum": 99
},
"cpu_socket": {
"description": "CPU socket ID. Deprecated, use cpu_socket_name instead",
"type": "integer",
"deprecated": true
},
"cpu_socket_count": {
"description": "Number of sockets for cpu",
"type": "integer",
"nullable": true
},
"ram_slot_count": {
"description": "Number of slots for RAM",
"type": "integer",
"minimum": 1,
"maximum": 64,
"nullable": true
},
"max_ram": {
"description": "Maximum RAM size",
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"nullable": true
},
"hdd_slot_count": {
"description": "Number of slots for hdd_slot_count",
"type": "integer",
"minimum": 1,
"maximum": 90,
"nullable": true
},
"pci_slot_count": {
"description": "Number of slots for PCI-devices",
"type": "integer",
"minimum": 1,
"maximum": 30,
"nullable": true
},
"storage_25_slot_count": {
"description": "Number of slots for 2.5 drives",
"type": "integer",
"nullable": true
},
"storage_35_slot_count": {
"description": "Number of slots for 3.5 drives",
"type": "integer",
"nullable": true
},
"m2_slot_count": {
"description": "Number of slots for m2 devices",
"type": "integer",
"nullable": true
},
"u2_slot_count": {
"description": "Number of slots for u2 devices",
"type": "integer",
"nullable": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "Platform has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving platform",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit platform",
"tags": [
"platform"
]
},
"delete": {
"operationId": "platform_id_delete",
"parameters": [
{
"description": "Platform unique identifier",
"in": "path",
"name": "platform_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Platform has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting platform",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete platform",
"tags": [
"platform"
]
}
},
"/module/user_vlans/enable": {
"post": {
"operationId": "user_vlans_module_enable",
"summary": "Enable user vlans module",
"tags": [
"user_vlans_module"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "User VLANs module enabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "User VLANs module enable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/user_vlans/disable": {
"post": {
"operationId": "user_vlans_module_disable",
"summary": "Disable user vlans module",
"tags": [
"user_vlans_module"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "User VLANs module disabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "User VLANs module disabled error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/user_vlans/status": {
"get": {
"operationId": "user_vlans_module_status",
"responses": {
"200": {
"description": "User VLANs module status has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving user VLANs module status",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "User VLANs module status",
"tags": [
"user_vlans_module"
]
}
},
"/module/user_vlans/location/{location_id}/vlan": {
"post": {
"operationId": "user_vlans_module_location_id_vlan_post",
"summary": "Create vlan on location",
"tags": [
"user_vlans_module"
],
"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": "The vlan name",
"example": "vlan512",
"type": "string"
},
"note": {
"description": "The user note for vlan",
"example": "Vlan for testing",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Vlan has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating the vlan",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/user_vlans/location/{location_id}": {
"get": {
"operationId": "user_vlans_module_location_id_get",
"summary": "Get information about module on location",
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Module settings on location has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"has_available_vlans": {
"description": "Does the location have free vlans",
"example": true,
"type": "boolean"
}
}
}
}
}
},
"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"
}
}
}
}
},
"tags": [
"user_vlans_module"
]
}
},
"/server/{server_id}/component": {
"get": {
"operationId": "server_id_component_get",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
}
}
],
"responses": {
"200": {
"description": "Server components have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Server component unique identifier"
},
"info": {
"oneOf": [
{
"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"
}
}
},
{
"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)"
}
}
},
{
"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"
}
}
},
{
"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"
}
}
},
{
"type": "object",
"description": "Server Fan component info",
"properties": {
"id": {
"type": "string",
"description": "Component unique identifier"
},
"name": {
"type": "string",
"description": "Component name"
}
}
},
{
"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"
}
}
},
{
"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"
}
}
}
]
},
"type": {
"type": "string",
"description": "Server component type. Types: * `cpu` - CPU * `storage` - Storage * `ram` - RAM * `pci` - PCI device * `other_spare_part` - Other spare part\n",
"enum": [
"cpu",
"storage",
"ram",
"pci",
"other_spare_part"
]
},
"spare_part_uuid": {
"description": "Universally unique identifier spare part from warehouse",
"type": "string"
},
"server": {
"description": "Server unique identifier",
"type": "integer"
},
"status": {
"description": "Server component status. Statuses: * `approved` - The server component has been determined by the server diagnostics or has been added manually * `not_found` - The server component has not been found by the server diagnostics\n",
"type": "string"
},
"status_info": {
"type": "object",
"description": "Status of the server component",
"properties": {
"state": {
"type": "string",
"enum": [
"absent",
"deffering",
"disabled",
"enabled",
"in_test",
"quiesced",
"standby_offline",
"standby_spare",
"starting",
"unavailable_offline",
"updating",
"unknown"
],
"description": "This indicates the known state of the resource, such as if it is enabled Types: * `absent` - This function or resource is not present or not detected * `deffering` - The element will not process any commands but will queue new requests * `disabled` - This function or resource has been disabled * `enabled` - This function or resource has been enabled * `in_test` - This function or resource is undergoing testing * `quiesced` - The element is enabled but only processes a restricted set of commands * `standby_offline` - This function or resource is enabled, but awaiting an external action to activate it * `standby_spare` - This function or resource is part of a redundancy set and is awaiting a failover or other external action to activate it * `starting` - This function or resource is starting * `unavailable_offline` - This function or resource is present but cannot be used * `updating` - The element is updating and may be unavailable or degraded * `unknown` - Unknown state\n"
},
"health": {
"type": "string",
"enum": [
"ok",
"warning",
"critical",
"unknown"
],
"description": "This represents the health state of this resource in the absence of its dependent resources Types: * `ok` - Normal * `warning` - A condition exists that requires attention * `critical` - A critical condition exists that requires immediate attention * `unknown` - Unknown\n"
},
"health_rollup": {
"type": "string",
"enum": [
"ok",
"warning",
"critical",
"unknown"
],
"description": "This represents the overall health state from the view of this resource Types: * `ok` - Normal * `warning` - A condition exists that requires attention * `critical` - A critical condition exists that requires immediate attention * `unknown` - Unknown\n"
}
}
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of server components",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all server components",
"tags": [
"server",
"server_component"
]
}
},
"/component/{component_id}": {
"get": {
"operationId": "component_id_get",
"parameters": [
{
"description": "Component unique identifier",
"in": "path",
"name": "component_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Server component has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Server component unique identifier"
},
"info": {
"oneOf": [
{
"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"
}
}
},
{
"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)"
}
}
},
{
"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"
}
}
},
{
"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"
}
}
},
{
"type": "object",
"description": "Server Fan component info",
"properties": {
"id": {
"type": "string",
"description": "Component unique identifier"
},
"name": {
"type": "string",
"description": "Component name"
}
}
},
{
"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"
}
}
},
{
"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"
}
}
}
]
},
"type": {
"type": "string",
"description": "Server component type. Types: * `cpu` - CPU * `storage` - Storage * `ram` - RAM * `pci` - PCI device * `other_spare_part` - Other spare part\n",
"enum": [
"cpu",
"storage",
"ram",
"pci",
"other_spare_part"
]
},
"spare_part_uuid": {
"description": "Universally unique identifier spare part from warehouse",
"type": "string"
},
"server": {
"description": "Server unique identifier",
"type": "integer"
},
"status": {
"description": "Server component status. Statuses: * `approved` - The server component has been determined by the server diagnostics or has been added manually * `not_found` - The server component has not been found by the server diagnostics\n",
"type": "string"
},
"status_info": {
"type": "object",
"description": "Status of the server component",
"properties": {
"state": {
"type": "string",
"enum": [
"absent",
"deffering",
"disabled",
"enabled",
"in_test",
"quiesced",
"standby_offline",
"standby_spare",
"starting",
"unavailable_offline",
"updating",
"unknown"
],
"description": "This indicates the known state of the resource, such as if it is enabled Types: * `absent` - This function or resource is not present or not detected * `deffering` - The element will not process any commands but will queue new requests * `disabled` - This function or resource has been disabled * `enabled` - This function or resource has been enabled * `in_test` - This function or resource is undergoing testing * `quiesced` - The element is enabled but only processes a restricted set of commands * `standby_offline` - This function or resource is enabled, but awaiting an external action to activate it * `standby_spare` - This function or resource is part of a redundancy set and is awaiting a failover or other external action to activate it * `starting` - This function or resource is starting * `unavailable_offline` - This function or resource is present but cannot be used * `updating` - The element is updating and may be unavailable or degraded * `unknown` - Unknown state\n"
},
"health": {
"type": "string",
"enum": [
"ok",
"warning",
"critical",
"unknown"
],
"description": "This represents the health state of this resource in the absence of its dependent resources Types: * `ok` - Normal * `warning` - A condition exists that requires attention * `critical` - A critical condition exists that requires immediate attention * `unknown` - Unknown\n"
},
"health_rollup": {
"type": "string",
"enum": [
"ok",
"warning",
"critical",
"unknown"
],
"description": "This represents the overall health state from the view of this resource Types: * `ok` - Normal * `warning` - A condition exists that requires attention * `critical` - A critical condition exists that requires immediate attention * `unknown` - Unknown\n"
}
}
}
}
}
}
}
},
"default": {
"description": "Server component 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 component",
"tags": [
"server_component"
]
}
},
"/server/{server_id}/component/{component_id}": {
"get": {
"operationId": "server_id_component_id_get",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "Component unique identifier",
"in": "path",
"name": "component_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Server component has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Server component unique identifier"
},
"info": {
"oneOf": [
{
"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"
}
}
},
{
"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)"
}
}
},
{
"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"
}
}
},
{
"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"
}
}
},
{
"type": "object",
"description": "Server Fan component info",
"properties": {
"id": {
"type": "string",
"description": "Component unique identifier"
},
"name": {
"type": "string",
"description": "Component name"
}
}
},
{
"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"
}
}
},
{
"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"
}
}
}
]
},
"type": {
"type": "string",
"description": "Server component type. Types: * `cpu` - CPU * `storage` - Storage * `ram` - RAM * `pci` - PCI device * `other_spare_part` - Other spare part\n",
"enum": [
"cpu",
"storage",
"ram",
"pci",
"other_spare_part"
]
},
"spare_part_uuid": {
"description": "Universally unique identifier spare part from warehouse",
"type": "string"
},
"server": {
"description": "Server unique identifier",
"type": "integer"
},
"status": {
"description": "Server component status. Statuses: * `approved` - The server component has been determined by the server diagnostics or has been added manually * `not_found` - The server component has not been found by the server diagnostics\n",
"type": "string"
},
"status_info": {
"type": "object",
"description": "Status of the server component",
"properties": {
"state": {
"type": "string",
"enum": [
"absent",
"deffering",
"disabled",
"enabled",
"in_test",
"quiesced",
"standby_offline",
"standby_spare",
"starting",
"unavailable_offline",
"updating",
"unknown"
],
"description": "This indicates the known state of the resource, such as if it is enabled Types: * `absent` - This function or resource is not present or not detected * `deffering` - The element will not process any commands but will queue new requests * `disabled` - This function or resource has been disabled * `enabled` - This function or resource has been enabled * `in_test` - This function or resource is undergoing testing * `quiesced` - The element is enabled but only processes a restricted set of commands * `standby_offline` - This function or resource is enabled, but awaiting an external action to activate it * `standby_spare` - This function or resource is part of a redundancy set and is awaiting a failover or other external action to activate it * `starting` - This function or resource is starting * `unavailable_offline` - This function or resource is present but cannot be used * `updating` - The element is updating and may be unavailable or degraded * `unknown` - Unknown state\n"
},
"health": {
"type": "string",
"enum": [
"ok",
"warning",
"critical",
"unknown"
],
"description": "This represents the health state of this resource in the absence of its dependent resources Types: * `ok` - Normal * `warning` - A condition exists that requires attention * `critical` - A critical condition exists that requires immediate attention * `unknown` - Unknown\n"
},
"health_rollup": {
"type": "string",
"enum": [
"ok",
"warning",
"critical",
"unknown"
],
"description": "This represents the overall health state from the view of this resource Types: * `ok` - Normal * `warning` - A condition exists that requires attention * `critical` - A critical condition exists that requires immediate attention * `unknown` - Unknown\n"
}
}
}
}
}
}
}
},
"default": {
"description": "Server component 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 component",
"tags": [
"server",
"server_component"
]
},
"delete": {
"operationId": "server_id_component_id_delete",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "Component unique identifier",
"in": "path",
"name": "component_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Server component has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting server component",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete server component",
"tags": [
"server",
"server_component"
]
},
"post": {
"operationId": "server_id_component_id_post",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "Component unique identifier",
"in": "path",
"name": "component_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"type": "object",
"properties": {
"spare_part_uuid": {
"description": "Universally unique identifier spare part from warehouse",
"type": "string",
"minLength": 1
},
"info": {
"description": "Component info object",
"type": "object"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Server component has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving server component",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit server component (internal only, temporary implementation)",
"tags": [
"server",
"server_component"
]
}
},
"/server/{server_id}/component/bmc/update": {
"post": {
"operationId": "server_id_component_update_post",
"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 component has been updated successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error update server component",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Update server component",
"tags": [
"server",
"server_component"
]
}
},
"/server/{server_id}/component/{source_type}/update_info": {
"post": {
"operationId": "component_server_id_source_type_update",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "Components source type",
"in": "path",
"name": "source_type",
"required": true,
"schema": {
"description": "Server comopnent source. Statuses: * `diag` - Server components come from diag * `bmc` - Server components come from BMC\n",
"type": "string",
"enum": [
"diag",
"bmc"
]
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"components_info"
],
"properties": {
"components_info": {
"type": "object",
"description": "Server components info",
"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"
}
}
}
},
"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"
}
}
}
}
}
}
}
},
{
"description": "Server components info from Diag6",
"type": "object",
"required": [
"components_info"
],
"properties": {
"components_info": {
"type": "object",
"required": [
"cpu",
"cpucnt",
"corecnt",
"ram"
],
"additionalProperties": true,
"properties": {
"cpu": {
"description": "CPU name",
"type": "string"
},
"cpucnt": {
"description": "CPU count",
"type": "string"
},
"corecnt": {
"description": "CPU core count",
"type": "string"
},
"ram": {
"description": "Total RAM size",
"type": "string"
},
"hdd_model_serial": {
"description": "Value is unused. Only key is needed",
"type": "string"
},
"vendor_hdd_model_serial": {
"description": "HDD vendor",
"type": "string"
},
"serial_hdd_model_serial": {
"description": "HDD serial number",
"type": "string"
},
"model_hdd_model_serial": {
"description": "HDD model",
"type": "string"
},
"size_hdd_model_serial": {
"description": "HDD size",
"type": "string"
},
"smart_model_serial": {
"description": "HDD smart results",
"type": "string"
},
"rr_model_serial": {
"description": "HDD rotation rate",
"type": "string"
},
"ram_1_mf": {
"description": "RAM manufacturer",
"type": "string"
},
"ram_1_serial": {
"description": "RAM serial number",
"type": "string"
},
"ram_1_size": {
"description": "RAM size",
"type": "string"
},
"ram_1_speed": {
"description": "RAM speed",
"type": "string"
},
"ram_1_type": {
"description": "RAM type",
"type": "string"
},
"mac_eth0": {
"description": "MAC address of network interface",
"type": "string"
},
"lan_eth0": {
"description": "Name of network interface",
"type": "string"
},
"motherboard": {
"description": "Motherboard name",
"type": "string"
},
"dmi_prod_name": {
"description": "Name of the platform from dmidecode",
"type": "string"
},
"dmi_proc": {
"description": "Raw CPU data",
"type": "string"
},
"dmi_mem": {
"description": "Raw RAM data",
"type": "string"
},
"raid_status": {
"description": "RAID status",
"type": "string"
},
"raid_name": {
"description": "RAID name",
"type": "string"
},
"raid_contr": {
"description": "RAID controller name",
"type": "string"
}
}
}
}
}
]
}
}
}
},
"responses": {
"200": {
"description": "Server components has been updated successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error update server components",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Update server component",
"tags": [
"internal",
"server",
"server_component",
"ipmi"
]
}
},
"/server/{server_id}/component/warehouse/bind": {
"post": {
"operationId": "component_server_id_warehouse_bind",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"warehouse"
],
"properties": {
"warehouse": {
"description": "Warehouse unique identifier",
"type": "integer"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Server components has been created and binded successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error binded server components",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create and bind server components",
"tags": [
"server",
"server_component"
]
}
},
"/server/{server_id}/component_error": {
"get": {
"operationId": "server_id_component_error_get",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Server component errors have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Server component error unique identifier"
},
"tag": {
"items": {
"type": "string",
"enum": [
"system",
"ram",
"cpu",
"storage",
"drive",
"pci",
"pci_function",
"chassis",
"power_supply",
"sensor",
"fan"
]
},
"type": "array",
"description": "Array of error tags"
},
"request_path": {
"description": "Path of the request that is cause of the error",
"type": "string"
},
"code": {
"description": "Error code",
"type": "integer"
},
"message": {
"description": "Message of the error",
"type": "object"
},
"ignored": {
"description": "Flag of the ignore statement",
"type": "boolean"
},
"server": {
"description": "Server unique identifier",
"type": "integer"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of server component errors",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all server component errors",
"tags": [
"server",
"server_component"
]
},
"delete": {
"operationId": "server_id_component_error_delete",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Server component errors has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting server component errors",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete server component errors",
"tags": [
"server",
"server_component"
]
}
},
"/server/{server_id}/component_error/ignore": {
"post": {
"operationId": "server_id_component_error_ignore_post",
"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 component errors has been ignored successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error ignore server component error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Ignore server component errors",
"tags": [
"server",
"server_component"
]
}
},
"/server/{server_id}/component_update_config": {
"post": {
"operationId": "server_id_component_update_config",
"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 component update config success",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Server component update config error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Server component update config",
"tags": [
"server",
"server_component"
]
}
},
"/server/{server_id}/component_poll": {
"get": {
"operationId": "server_id_component_poll",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Server component poll status have been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Server component poll unique identifier",
"example": 1
},
"status": {
"type": "string",
"description": "Server component poll status",
"example": "ok",
"enum": [
"polling",
"polling_failed",
"ok"
]
},
"status_info": {
"type": "object",
"description": "Server component poll status information"
},
"server": {
"type": "integer",
"description": "Server unique identifier",
"example": 2
},
"success_poll_time": {
"type": "string",
"description": "Date and time of successful update",
"example": "2024-05-15 13:00:00",
"nullable": true
},
"poll_time": {
"type": "string",
"description": "Date and time of the last update attempt",
"example": "2024-05-15 13:15:00"
}
}
}
}
}
},
"default": {
"description": "Error receiving server component poll status",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive server component poll status",
"tags": [
"server",
"server_component"
]
}
},
"/warehouse/other": {
"get": {
"operationId": "warehouse_other_get",
"responses": {
"200": {
"description": "Other spare parts have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"description": "Other spare part unique identifier",
"type": "integer"
},
"uuid": {
"description": "Universall unique identifier",
"type": "string"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"dci_server_uuid": {
"description": "Server UUID from DCImanager",
"type": "string"
},
"rack": {
"description": "Unique rack identifier",
"type": "integer"
},
"unit": {
"description": "Size of an entity in the rack in units",
"type": "number",
"multipleOf": 0.5,
"minimum": 0,
"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
},
"barcode": {
"description": "Barcode to find spare part",
"type": "string"
},
"type": {
"description": "Spare part type info",
"type": "object",
"properties": {
"id": {
"description": "Type unique identifier",
"type": "integer"
},
"name": {
"description": "Other spare type model name",
"type": "string"
},
"alias": {
"description": "Parameter of the device (Alias for the model)",
"type": "string"
},
"type": {
"description": "Type of the device",
"type": "string"
}
}
},
"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 other spare price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The other spare nomenclature",
"example": 1679845,
"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": "Warehouse server status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_server` - The spare part is in the server * `in_rack` - The server is in the rack * `in_laboratory` - The spare part in laboratory * `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_server",
"in_rack",
"in_laboratory",
"written_off",
"reserved",
"under_repair",
"broken"
]
},
"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"
},
"note": {
"description": "Comment",
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of Other spare parts",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all other spare parts",
"tags": [
"other_spare_part",
"warehouse"
]
}
},
"/warehouse/{warehouse_id}/other": {
"post": {
"operationId": "other_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"
},
"rack": {
"description": "Unique rack identifier",
"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
},
"barcode": {
"description": "Barcode of the other spare part",
"type": "string",
"minLength": 1,
"maxLength": 255,
"example": "other_518771aeb9"
},
"type": {
"description": "Other 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 other spare price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The other spare nomenclature",
"example": 1679845,
"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": "Commentary",
"type": "string",
"example": "Warranty expired",
"maxLength": 1500
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
},
"warehouse_status": {
"description": "Warehouse server status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_server` - The spare part is in the server * `in_rack` - The server is in the rack * `in_laboratory` - The spare part in laboratory * `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_server",
"in_rack",
"in_laboratory",
"written_off",
"reserved",
"under_repair",
"broken"
]
}
},
"required": [
"barcode",
"type",
"warehouse_status"
]
}
}
}
},
"responses": {
"200": {
"description": "Other spare part has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving other spare part",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create other spare part",
"tags": [
"other_spare_part",
"warehouse"
]
},
"get": {
"operationId": "other_get",
"parameters": [
{
"description": "Warehouse unique identifier",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Other spare parts have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"type": "object",
"properties": {
"id": {
"description": "Other spare part unique identifier",
"type": "integer"
},
"uuid": {
"description": "Universall unique identifier",
"type": "string"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"dci_server_uuid": {
"description": "Server UUID from DCImanager",
"type": "string"
},
"rack": {
"description": "Unique rack identifier",
"type": "integer"
},
"unit": {
"description": "Size of an entity in the rack in units",
"type": "number",
"multipleOf": 0.5,
"minimum": 0,
"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
},
"barcode": {
"description": "Barcode to find spare part",
"type": "string"
},
"type": {
"description": "Spare part type info",
"type": "object",
"properties": {
"id": {
"description": "Type unique identifier",
"type": "integer"
},
"name": {
"description": "Other spare type model name",
"type": "string"
},
"alias": {
"description": "Parameter of the device (Alias for the model)",
"type": "string"
},
"type": {
"description": "Type of the device",
"type": "string"
}
}
},
"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 other spare price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The other spare nomenclature",
"example": 1679845,
"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": "Warehouse server status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_server` - The spare part is in the server * `in_rack` - The server is in the rack * `in_laboratory` - The spare part in laboratory * `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_server",
"in_rack",
"in_laboratory",
"written_off",
"reserved",
"under_repair",
"broken"
]
},
"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"
},
"note": {
"description": "Comment",
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of Other spare parts",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all other spare parts",
"tags": [
"other_spare_part",
"warehouse"
]
}
},
"/other/{other_spare_part_id}": {
"get": {
"operationId": "other_spare_part_id_get",
"parameters": [
{
"description": "Other spare part unique identifier",
"in": "path",
"name": "other_spare_part_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Other spare part has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"description": "Other spare part unique identifier",
"type": "integer"
},
"uuid": {
"description": "Universall unique identifier",
"type": "string"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"dci_server_uuid": {
"description": "Server UUID from DCImanager",
"type": "string"
},
"rack": {
"description": "Unique rack identifier",
"type": "integer"
},
"unit": {
"description": "Size of an entity in the rack in units",
"type": "number",
"multipleOf": 0.5,
"minimum": 0,
"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
},
"barcode": {
"description": "Barcode to find spare part",
"type": "string"
},
"type": {
"description": "Spare part type info",
"type": "object",
"properties": {
"id": {
"description": "Type unique identifier",
"type": "integer"
},
"name": {
"description": "Other spare type model name",
"type": "string"
},
"alias": {
"description": "Parameter of the device (Alias for the model)",
"type": "string"
},
"type": {
"description": "Type of the device",
"type": "string"
}
}
},
"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 other spare price",
"example": 2345.5,
"nullable": true,
"type": "number",
"format": "double"
},
"nomenclature": {
"description": "The other spare nomenclature",
"example": 1679845,
"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": "Warehouse server status. Statuses: * `in_warehouse` - The server is in the warehouse * `in_server` - The spare part is in the server * `in_rack` - The server is in the rack * `in_laboratory` - The spare part in laboratory * `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_server",
"in_rack",
"in_laboratory",
"written_off",
"reserved",
"under_repair",
"broken"
]
},
"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"
},
"note": {
"description": "Comment",
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
}
}
}
}
},
"default": {
"description": "Other spare part not found",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive other spare part",
"tags": [
"other_spare_part",
"warehouse"
]
},
"post": {
"operationId": "other_spare_part_id_post",
"parameters": [
{
"description": "Other spare part unique identifier",
"in": "path",
"name": "other_spare_part_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"rack": {
"description": "Unique rack identifier",
"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
},
"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": 1679845,
"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_server` - The spare part is in the server * `in_rack` - The server is in the rack * `in_laboratory` - The spare part in laboratory * `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_server",
"in_rack",
"in_laboratory",
"written_off",
"reserved",
"under_repair",
"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": "Other spare part has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving other spare part",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit other spare part",
"tags": [
"other_spare_part",
"warehouse"
]
}
},
"/other/{other_spare_part_id}/remove": {
"post": {
"operationId": "other_spare_part_id_remove_post",
"parameters": [
{
"description": "Other spare part unique identifier",
"in": "path",
"name": "other_spare_part_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": "Other spare part has been removed successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error removing other spare part",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Remove Other spare part",
"tags": [
"other_spare_part",
"warehouse"
]
}
},
"/ippool": {
"get": {
"operationId": "ippool_get",
"parameters": [
{
"description": "The list of pools will be filtered by this location ID. If it is not specified, a full list will be displayed. Otherwise, the list will display the pools only from this location and public pools.\n",
"in": "query",
"name": "location",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "List of pools has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"id": {
"type": "integer"
},
"is_public": {
"description": "Userspace where the pool is located, is public",
"type": "boolean"
},
"location": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"total_ip": {
"description": "Number of all addresses in the pool that can be allocated",
"type": "string"
},
"userspace": {
"type": "integer"
},
"using_ip": {
"description": "Number of allocated IP addresses in the pool",
"type": "string"
},
"is_location_public_pool": {
"description": "IP pool for server dedicating",
"type": "boolean"
},
"is_location_free_pool": {
"description": "IP Pool for server free",
"type": "boolean"
},
"rack": {
"description": "Information about racks",
"items": {
"properties": {
"id": {
"description": "Rack unique identifier",
"type": "integer"
},
"name": {
"description": "Rack name",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving a list of pools",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Error receiving a list of pools from IPmgr6 with the location field",
"tags": [
"ipmgr"
]
}
},
"/ippool/{ippool_id}": {
"delete": {
"operationId": "ippool_id_delete",
"parameters": [
{
"description": "Ippool unique identifier",
"in": "path",
"name": "ippool_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Ippool has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting ippool",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete ippool",
"tags": [
"ipmgr"
]
}
},
"/ipnet": {
"get": {
"operationId": "ipnet_get",
"parameters": [
{
"description": "The list of networks will be filtered by this location ID. If it is not specified, a full list will be displayed. Otherwise, the list will display the networks only from this location and public networks.\n",
"in": "query",
"name": "location",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "List of networks has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"family": {
"description": "Values 2 and 10 are used for indication IPv4 and IPv6 correspondingly",
"enum": [
2,
10
],
"type": "integer"
},
"gateway": {
"type": "string"
},
"id": {
"type": "integer"
},
"is_public": {
"description": "Userspace where the pool is located, is public",
"type": "boolean"
},
"location": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"mask": {
"type": "integer"
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"size": {
"type": "string"
},
"total_ip": {
"description": "Number of all network IP addresses that can be allocated",
"type": "string"
},
"userspace": {
"type": "integer"
},
"using_ip": {
"description": "Number of allocated addresses",
"type": "string"
},
"vlan": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving a list of networks",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receiving a list of networks from IPmgr6 with the location field",
"tags": [
"ipmgr"
]
}
},
"/ipnet/{ipnet_id}": {
"get": {
"operationId": "ipnet_net_id_get",
"parameters": [
{
"description": "IP network unique identifier from IPmanager",
"in": "path",
"name": "ipnet_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Network has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"family": {
"description": "Values 2 and 10 are used for indication IPv4 and IPv6 correspondingly",
"enum": [
2,
10
],
"type": "integer"
},
"gateway": {
"type": "string"
},
"id": {
"type": "integer"
},
"is_public": {
"description": "Userspace where the pool is located, is public",
"type": "boolean"
},
"location": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"mask": {
"type": "integer"
},
"name": {
"type": "string"
},
"note": {
"type": "string"
},
"size": {
"type": "string"
},
"total_ip": {
"description": "Number of all network IP addresses that can be allocated",
"type": "string"
},
"userspace": {
"type": "integer"
},
"using_ip": {
"description": "Number of allocated addresses",
"type": "string"
},
"vlan": {
"type": "string"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving network",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Get IP network from IPmgr6",
"tags": [
"ipmgr"
]
},
"post": {
"operationId": "ipnet_id_post",
"parameters": [
{
"description": "IP network unique identifier from IPmanager",
"in": "path",
"name": "ipnet_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": true,
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "IP network has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving IP network",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit IP network",
"tags": [
"ipmgr"
]
}
},
"/warehouse/{warehouse_id}/spare_part": {
"get": {
"operationId": "spare_part_warehouse_id_get",
"parameters": [
{
"description": "Warehouse unique identifier",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Spare parts 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"
},
"warehouse": {
"description": "Warehouse unique identifier",
"type": "integer"
},
"dci_server_uuid": {
"description": "Server UUID from DCImanager",
"type": "string"
},
"barcode": {
"description": "Barcode to find spare part",
"type": "string"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"type": {
"description": "Spare part type info",
"type": "object",
"properties": {
"id": {
"description": "Type unique identifier",
"type": "integer"
},
"name": {
"description": "Type name",
"type": "string"
},
"alias": {
"description": "Short name",
"type": "string"
}
}
},
"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,
"type": "number",
"format": "double",
"nullable": true
},
"nomenclature": {
"description": "The detail nomenclature",
"example": 1679845,
"type": "string"
},
"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"
]
},
"warehouse_status_info": {
"type": "object",
"description": "Warehouse status info"
},
"note": {
"description": "Comment",
"type": "string"
},
"device_type": {
"description": "Spare part type. Types: * `cpu` - CPU * `storage` - Storage * `ram` - RAM * `pci` - PCI device * `server` - Server\n"
},
"entity_details": {
"description": "Unique detailed information for spare in warehouse",
"oneOf": [
{
"additionalProperties": false,
"properties": {},
"type": "object"
},
{
"type": "object",
"properties": {
"rack": {
"type": "object",
"properties": {
"id": {
"description": "Unique rack ID",
"type": "integer"
},
"name": {
"description": "Rack name",
"example": "my key name",
"pattern": "^[^ ]",
"type": "string"
},
"size": {
"description": "Rack size",
"maximum": 99,
"minimum": 1,
"type": "integer"
}
}
},
"chassis": {
"type": "object",
"properties": {
"id": {
"description": "Unique chassis ID",
"type": "integer"
},
"name": {
"description": "Chassis name",
"example": "my key name",
"pattern": "^[^ ]",
"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": {
"type": "integer",
"description": "Server slot count"
},
"unit": {
"description": "Starting unit of an entity in the rack",
"type": "number",
"multipleOf": 0.5,
"minimum": 1,
"maximum": 99,
"example": "1",
"nullable": true
}
}
},
"server": {
"type": "object",
"properties": {
"slot": {
"type": "integer",
"description": "Slot where blade server is located"
},
"unit": {
"description": "Starting unit of an entity in the rack",
"type": "number",
"multipleOf": 0.5,
"minimum": 1,
"maximum": 99,
"example": "1",
"nullable": true
}
}
},
"platform": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the platform"
},
"name": {
"type": "string",
"description": "Name of the platform"
},
"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",
"description": "Type of the platform"
}
}
}
}
}
]
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of spare parts",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all spare parts for the warehouse",
"tags": [
"spare_part",
"warehouse"
]
}
},
"/warehouse/spare_part": {
"get": {
"operationId": "spare_part_get",
"responses": {
"200": {
"description": "Spare parts 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"
},
"warehouse": {
"description": "Warehouse unique identifier",
"type": "integer"
},
"dci_server_uuid": {
"description": "Server UUID from DCImanager",
"type": "string"
},
"barcode": {
"description": "Barcode to find spare part",
"type": "string"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"type": {
"description": "Spare part type info",
"type": "object",
"properties": {
"id": {
"description": "Type unique identifier",
"type": "integer"
},
"name": {
"description": "Type name",
"type": "string"
},
"alias": {
"description": "Short name",
"type": "string"
}
}
},
"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,
"type": "number",
"format": "double",
"nullable": true
},
"nomenclature": {
"description": "The detail nomenclature",
"example": 1679845,
"type": "string"
},
"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"
]
},
"warehouse_status_info": {
"type": "object",
"description": "Warehouse status info"
},
"note": {
"description": "Comment",
"type": "string"
},
"device_type": {
"description": "Spare part type. Types: * `cpu` - CPU * `storage` - Storage * `ram` - RAM * `pci` - PCI device * `server` - Server\n"
},
"entity_details": {
"description": "Unique detailed information for spare in warehouse",
"oneOf": [
{
"additionalProperties": false,
"properties": {},
"type": "object"
},
{
"type": "object",
"properties": {
"rack": {
"type": "object",
"properties": {
"id": {
"description": "Unique rack ID",
"type": "integer"
},
"name": {
"description": "Rack name",
"example": "my key name",
"pattern": "^[^ ]",
"type": "string"
},
"size": {
"description": "Rack size",
"maximum": 99,
"minimum": 1,
"type": "integer"
}
}
},
"chassis": {
"type": "object",
"properties": {
"id": {
"description": "Unique chassis ID",
"type": "integer"
},
"name": {
"description": "Chassis name",
"example": "my key name",
"pattern": "^[^ ]",
"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": {
"type": "integer",
"description": "Server slot count"
},
"unit": {
"description": "Starting unit of an entity in the rack",
"type": "number",
"multipleOf": 0.5,
"minimum": 1,
"maximum": 99,
"example": "1",
"nullable": true
}
}
},
"server": {
"type": "object",
"properties": {
"slot": {
"type": "integer",
"description": "Slot where blade server is located"
},
"unit": {
"description": "Starting unit of an entity in the rack",
"type": "number",
"multipleOf": 0.5,
"minimum": 1,
"maximum": 99,
"example": "1",
"nullable": true
}
}
},
"platform": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the platform"
},
"name": {
"type": "string",
"description": "Name of the platform"
},
"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",
"description": "Type of the platform"
}
}
}
}
}
]
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving list of spare parts",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all spare parts",
"tags": [
"spare_part",
"warehouse"
]
}
},
"/warehouse/{warehouse_id}/spare_count": {
"get": {
"operationId": "spare_count_warehouse_id_get",
"parameters": [
{
"description": "Warehouse unique identifier",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Spare parts count have been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"cpu": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"other_spare_part": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
},
"types": {
"type": "object",
"properties": {
"type_name": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
}
}
}
}
},
"pci": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"pdu": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"ram": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"server": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"storage": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"switch": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"ups": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving list of spare parts count",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all spare parts count from the warehouse",
"tags": [
"spare_part",
"warehouse"
]
}
},
"/warehouse/spare_count": {
"get": {
"operationId": "spare_count_get",
"responses": {
"200": {
"description": "Spare parts count have been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"cpu": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"other_spare_part": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
},
"types": {
"type": "object",
"properties": {
"type_name": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
}
}
}
}
},
"pci": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"pdu": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"ram": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"server": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"storage": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"switch": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
},
"ups": {
"type": "object",
"properties": {
"in_warehouse": {
"description": "Number of spares in warehouse",
"type": "integer"
},
"in_server": {
"description": "Number of spares in server",
"type": "integer"
},
"written_off": {
"description": "Number of written off spares",
"type": "integer"
},
"broken": {
"description": "Number of broken spares",
"type": "integer"
},
"in_laboratory": {
"description": "Number of spares in laboratory",
"type": "integer"
},
"reserved": {
"description": "Number of reserved spares",
"type": "integer"
},
"under_repair": {
"description": "Number of spares under repair",
"type": "integer"
},
"in_rack": {
"description": "Number of spares in rack",
"type": "integer"
},
"in_chassis": {
"description": "Number of spares in chassis",
"type": "integer"
},
"at_location": {
"description": "Number of spares at location",
"type": "integer"
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving list of spare parts count",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all spare parts count",
"tags": [
"spare_part",
"warehouse"
]
}
},
"/warehouse/rebind_spare_parts": {
"post": {
"operationId": "warehouse_rebind_spare_parts_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"required": [
"server_uuid",
"components"
],
"type": "object",
"properties": {
"server_uuid": {
"type": "string",
"description": "UUID of the server to which the details will be bound"
},
"components": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "ID of the server component"
},
"serial": {
"type": "string",
"description": "Serial number of the server component"
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Spare parts has been bound successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"bound_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"component_id": {
"type": "integer",
"description": "Component unique identifier"
},
"detail_uuid": {
"type": "string",
"description": "Detail UUID"
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error binding spare parts",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Bind server component in warehouse",
"tags": [
"spare_part",
"warehouse"
]
}
},
"/type/storage": {
"post": {
"operationId": "storage_type_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"name": {
"description": "Storage type name",
"example": "SATA 500 GB",
"minLength": 1,
"maxLength": 255,
"type": "string"
},
"alias": {
"description": "Short name",
"example": "SATA-500",
"maxLength": 255,
"type": "string"
},
"drive_type": {
"description": "Drive type (SSD/HDD)",
"example": "SSD",
"maxLength": 255,
"type": "string"
},
"drive_interface": {
"description": "Drive interface (SATA\\SCSI\\SAS\\M.2\\U.2\\PCIe\\DDR-T\\mSATA)",
"example": "M.2",
"maxLength": 255,
"type": "string"
},
"protocol": {
"description": "Storage protocol (SATA\\SCSI\\NVME)",
"example": "NVME",
"maxLength": 255,
"type": "string"
},
"form_factor": {
"description": "Drive form factor (2.5\\3.5\\2230\\2242\\2260\\2280\\22110 etc.)",
"example": 3.5,
"maxLength": 255,
"type": "string"
},
"note": {
"description": "Comment",
"type": "string",
"example": "Favorite type",
"maxLength": 1500
},
"size": {
"description": "Storage size in megabytes",
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"example": 512
},
"interface": {
"description": "Storage interface",
"type": "string",
"example": "sata"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
},
"rotation_speed": {
"description": "Disc spindle speed (for hdd)",
"type": "integer"
},
"flash_memory_type": {
"description": "Memory cheap type (for ssd)",
"type": "string"
}
},
"required": [
"name",
"size",
"interface"
],
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Storage type has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating storage type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Creating storage type",
"tags": [
"storage_type",
"warehouse"
]
},
"get": {
"operationId": "storage_type_get",
"responses": {
"200": {
"description": "Storage types have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"id": {
"type": "integer",
"description": "Storage type unique identifier"
},
"name": {
"type": "string",
"description": "Storage type name"
},
"alias": {
"type": "string",
"description": "Storage type short name"
},
"drive_type": {
"description": "Drive type (SSD/HDD)",
"example": "SSD",
"type": "string"
},
"drive_interface": {
"description": "Drive interface (SATA\\SCSI\\SAS\\M.2\\U.2\\PCIe\\DDR-T\\mSATA)",
"example": "M.2",
"type": "string"
},
"protocol": {
"description": "Storage protocol (SATA\\SCSI\\NVME)",
"example": "NVME",
"type": "string"
},
"form_factor": {
"description": "Drive form factor (2.5\\3.5\\2230\\2242\\2260\\2280\\22110 etc.)",
"example": 3.5,
"type": "string"
},
"note": {
"type": "string",
"description": "Comment"
},
"size": {
"description": "Storage size in megabytes",
"type": "integer"
},
"interface": {
"description": "Storage interface",
"type": "string"
},
"rotation_speed": {
"description": "Disc spindle speed (for hdd)",
"type": "integer"
},
"flash_memory_type": {
"description": "Memory cheap type (for ssd)",
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving storage types",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receiving all storage types",
"tags": [
"storage_type",
"warehouse"
]
}
},
"/type/storage/{storage_type_id}": {
"delete": {
"operationId": "storage_type_id_delete",
"parameters": [
{
"description": "Storage type unique identifier",
"in": "path",
"name": "storage_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Storage type has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting storage type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete storage type",
"tags": [
"storage_type",
"warehouse"
]
},
"get": {
"operationId": "storage_type_id_get",
"parameters": [
{
"description": "Storage type unique identifier",
"in": "path",
"name": "storage_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Storage type has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer",
"description": "Storage type unique identifier"
},
"name": {
"type": "string",
"description": "Storage type name"
},
"alias": {
"type": "string",
"description": "Storage type short name"
},
"drive_type": {
"description": "Drive type (SSD/HDD)",
"example": "SSD",
"type": "string"
},
"drive_interface": {
"description": "Drive interface (SATA\\SCSI\\SAS\\M.2\\U.2\\PCIe\\DDR-T\\mSATA)",
"example": "M.2",
"type": "string"
},
"protocol": {
"description": "Storage protocol (SATA\\SCSI\\NVME)",
"example": "NVME",
"type": "string"
},
"form_factor": {
"description": "Drive form factor (2.5\\3.5\\2230\\2242\\2260\\2280\\22110 etc.)",
"example": 3.5,
"type": "string"
},
"note": {
"type": "string",
"description": "Comment"
},
"size": {
"description": "Storage size in megabytes",
"type": "integer"
},
"interface": {
"description": "Storage interface",
"type": "string"
},
"rotation_speed": {
"description": "Disc spindle speed (for hdd)",
"type": "integer"
},
"flash_memory_type": {
"description": "Memory cheap type (for ssd)",
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Storage 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 storage type",
"tags": [
"storage_type",
"warehouse"
]
},
"post": {
"operationId": "storage_type_id_post",
"parameters": [
{
"description": "Storage type unique identifier",
"in": "path",
"name": "storage_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"name": {
"description": "Storage type name",
"example": "SATA 500 GB",
"minLength": 1,
"maxLength": 255,
"type": "string"
},
"alias": {
"description": "Short name",
"example": "SATA-500",
"maxLength": 255,
"type": "string"
},
"drive_type": {
"description": "Drive type (SSD/HDD)",
"example": "SSD",
"maxLength": 255,
"type": "string"
},
"drive_interface": {
"description": "Drive interface (SATA\\SCSI\\SAS\\M.2\\U.2\\PCIe\\DDR-T\\mSATA)",
"example": "M.2",
"maxLength": 255,
"type": "string"
},
"protocol": {
"description": "Storage protocol (SATA\\SCSI\\NVME)",
"example": "NVME",
"maxLength": 255,
"type": "string"
},
"form_factor": {
"description": "Drive form factor (2.5\\3.5\\2230\\2242\\2260\\2280\\22110 etc.)",
"example": 3.5,
"maxLength": 255,
"type": "string"
},
"note": {
"description": "Comment",
"type": "string",
"example": "Favorite type",
"maxLength": 1500
},
"size": {
"description": "Storage size in megabytes",
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"example": 512
},
"interface": {
"description": "Storage interface",
"type": "string",
"example": "SATA"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
},
"rotation_speed": {
"description": "Disc spindle speed (for hdd)",
"type": "integer"
},
"flash_memory_type": {
"description": "Memory cheap type (for ssd)",
"type": "string"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Storage type has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving storage type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit storage type",
"tags": [
"storage_type",
"warehouse"
]
}
},
"/custom_field": {
"get": {
"operationId": "custom_field_get",
"summary": "Receive custom fields list",
"tags": [
"custom_field"
],
"responses": {
"200": {
"description": "Custom fields list has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"entity_name": {
"type": "string",
"description": "Name of entity with custom fields"
},
"fields": {
"description": "Custom fields descriptions",
"type": "array",
"items": {
"type": "object",
"properties": {
"field_name": {
"description": "Custom field name",
"type": "string"
},
"readable_name": {
"description": "Human readable name for interface purpose",
"type": "string"
},
"readable_name_ru": {
"description": "Human readable name for interface purpose (in russian)",
"type": "string"
},
"is_required": {
"description": "Is field required to be filled",
"type": "boolean"
},
"priority": {
"description": "Sorting priority",
"type": "integer"
},
"type": {
"description": "Type of the field",
"type": "string",
"enum": [
"string",
"text",
"select",
"date",
"numeric",
"bool",
"url"
]
}
}
}
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving list of custom fields",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/custom_field/{entity_name}": {
"get": {
"operationId": "custom_field_entity_get",
"summary": "Receive custom fields for specific entity",
"tags": [
"custom_field"
],
"parameters": [
{
"description": "Custom field entity name",
"in": "path",
"name": "entity_name",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Custom fields for entity have been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"entity_name": {
"type": "string",
"description": "Name of entity with custom fields"
},
"fields": {
"description": "Custom fields descriptions",
"type": "array",
"items": {
"type": "object",
"properties": {
"field_name": {
"description": "Custom field name",
"type": "string"
},
"readable_name": {
"description": "Human readable name for interface purpose",
"type": "string"
},
"readable_name_ru": {
"description": "Human readable name for interface purpose (in russian)",
"type": "string"
},
"is_required": {
"description": "Is field required to be filled",
"type": "boolean"
},
"priority": {
"description": "Sorting priority",
"type": "integer"
},
"type": {
"description": "Type of the field",
"type": "string",
"enum": [
"string",
"text",
"select",
"date",
"numeric",
"bool",
"url"
]
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving custom fields for entity",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"post": {
"operationId": "custom_field_entity_post",
"summary": "Create or edit custom fields for specific entity",
"tags": [
"custom_field"
],
"parameters": [
{
"description": "Custom field entity name",
"in": "path",
"name": "entity_name",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"required": [
"fields"
],
"type": "object",
"properties": {
"fields": {
"description": "Custom fields description",
"type": "array",
"items": {
"type": "object",
"required": [
"field_name"
],
"properties": {
"field_name": {
"description": "Custom field name",
"type": "string"
},
"readable_name": {
"description": "Human readable name for interface purpose",
"type": "string"
},
"readable_name_ru": {
"description": "Human readable name for interface purpose (in russian)",
"type": "string"
},
"is_required": {
"description": "Is field required to be filled",
"type": "boolean"
},
"priority": {
"description": "Sorting priority",
"type": "integer",
"minimum": 1
},
"type": {
"description": "Type of the field",
"type": "string",
"enum": [
"string",
"text",
"select",
"date",
"numeric",
"bool",
"url"
]
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Custom fields for entity have been created or edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating or editing custom fields for entity",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"delete": {
"operationId": "custom_field_entity_delete",
"summary": "Delete custom fields for specific entity",
"tags": [
"custom_field"
],
"parameters": [
{
"description": "Custom field entity name",
"in": "path",
"name": "entity_name",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Custom fields for entity have been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting custom fields for entity",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/user": {
"post": {
"operationId": "user_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"email": {
"description": "User email",
"example": "admin@example.com",
"type": "string"
},
"full_name": {
"type": "string"
},
"password": {
"type": "string",
"minLength": 8
},
"phone_number": {
"type": "string"
},
"role": {
"type": "string",
"example": "@user"
}
},
"required": [
"email",
"password",
"role"
],
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "User has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating user",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create user",
"tags": [
"user"
]
},
"get": {
"operationId": "user_get",
"responses": {
"200": {
"description": "Users list has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"id": {
"type": "integer"
},
"email": {
"type": "string"
},
"server_count": {
"type": "integer"
},
"roles": {
"description": "User roles array",
"type": "array",
"items": {
"type": "string",
"example": "@user"
}
},
"vlans_per_user": {
"description": "The count of vlans per user",
"example": 5,
"type": "integer"
},
"state": {
"description": "User state",
"example": "active",
"type": "string"
},
"auth_source": {
"type": "string",
"description": "The source for authentication",
"example": "local"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving users list",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive a list if all users",
"tags": [
"user"
]
}
},
"/user/{user_id}": {
"delete": {
"operationId": "user_id_delete",
"parameters": [
{
"description": "User unique identifier",
"in": "path",
"name": "user_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "User has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting user",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete user",
"tags": [
"user"
]
},
"post": {
"operationId": "user_id_post",
"parameters": [
{
"description": "User unique identifier",
"in": "path",
"name": "user_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"vlans_per_user": {
"description": "The count of vlans per user",
"example": 5,
"type": "integer",
"minimum": 0,
"maximum": 4094
},
"roles": {
"type": "array",
"items": {
"type": "string",
"example": "@user",
"description": "User role"
}
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "User has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving user data",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit user",
"tags": [
"user"
]
},
"get": {
"operationId": "user_id_get",
"parameters": [
{
"description": "User unique identifier",
"in": "path",
"name": "user_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Users data has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"email": {
"type": "string"
},
"server_count": {
"type": "integer"
},
"roles": {
"description": "User roles array",
"type": "array",
"items": {
"type": "string",
"example": "@user"
}
},
"vlans_per_user": {
"description": "The count of vlans per user",
"example": 5,
"type": "integer"
},
"state": {
"description": "User state",
"example": "active",
"type": "string"
},
"auth_source": {
"type": "string",
"description": "The source for authentication",
"example": "local"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving user information",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive a information about users",
"tags": [
"user"
]
}
},
"/user/sync": {
"post": {
"operationId": "user_sync_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": true,
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"additionalProperties": true,
"type": "object",
"required": [
"id",
"email",
"roles",
"state",
"auth_source"
],
"properties": {
"id": {
"type": "integer"
},
"email": {
"type": "string"
},
"roles": {
"description": "User roles array",
"example": "[@user]",
"type": "array",
"items": {
"type": "string",
"example": "@user"
}
},
"state": {
"description": "User state",
"example": "active",
"type": "string"
},
"auth_source": {
"type": "string",
"description": "The source for authentication",
"example": "local"
}
}
}
},
"delete": {
"type": "array",
"items": {
"type": "integer",
"description": "Users ids to remove"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Users have been synced successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error users syncing",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "User syncing with auth service",
"tags": [
"user",
"internal"
]
}
},
"/type/other": {
"post": {
"operationId": "type_other_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"type": {
"description": "Type of the device.",
"example": "cable",
"type": "string"
},
"name": {
"description": "Other spare type model name",
"example": "Adaptec ASR-6805E SGL RAID",
"type": "string"
},
"alias": {
"description": "Parameter of the device (Alias for the model)",
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"required": [
"type",
"name"
],
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Other spare type has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating Other spare type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Creating other spare type",
"tags": [
"other_spare_type",
"warehouse"
]
},
"get": {
"operationId": "type_other_get",
"responses": {
"200": {
"description": "Other spare types have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"id": {
"type": "integer",
"description": "Other spare type unique identifier"
},
"name": {
"description": "Other spare type model name",
"example": "Adaptec ASR-6805E SGL RAID",
"type": "string"
},
"alias": {
"description": "Parameter of the device (Alias for the model)",
"type": "string"
},
"type": {
"description": "Type of the device.",
"example": "cable",
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving other spare types",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receiving all other spare types",
"tags": [
"other_spare_type",
"warehouse"
]
}
},
"/type/other/{other_spare_type_id}": {
"delete": {
"operationId": "other_spare_type_id_delete",
"parameters": [
{
"description": "Other spare type unique identifier",
"in": "path",
"name": "other_spare_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Other spare type has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting other spare type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete other spare type",
"tags": [
"other_spare_type",
"warehouse"
]
},
"get": {
"operationId": "other_spare_type_id_get",
"parameters": [
{
"description": "Other spare type unique identifier",
"in": "path",
"name": "other_spare_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Other spare type has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer",
"description": "Other spare type unique identifier"
},
"name": {
"description": "Other spare type model name",
"example": "Adaptec ASR-6805E SGL RAID",
"type": "string"
},
"alias": {
"description": "Parameter of the device (Alias for the model)",
"type": "string"
},
"type": {
"description": "Type of the device.",
"example": "cable",
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Other spare 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 other spare type",
"tags": [
"other_spare_type",
"warehouse"
]
},
"post": {
"operationId": "other_spare_type_id_post",
"parameters": [
{
"description": "Other spare type unique identifier",
"in": "path",
"name": "other_spare_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"type": {
"description": "Type of the device.",
"example": "cable",
"type": "string"
},
"name": {
"description": "Other spare type model name",
"example": "Adaptec ASR-6805E SGL RAID",
"type": "string"
},
"alias": {
"description": "Parameter of the device (Alias for the model)",
"type": "string"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Other spare type has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving other spare type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit other spare type",
"tags": [
"other_spare_type",
"warehouse"
]
}
},
"/warehouse/ram": {
"get": {
"operationId": "warehouse_ram_get",
"responses": {
"200": {
"description": "RAMs 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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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 RAMs",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all RAMs",
"tags": [
"ram",
"warehouse"
]
}
},
"/warehouse/{warehouse_id}/ram": {
"post": {
"operationId": "ram_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": 1679845,
"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": "RAM has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving RAM",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create RAM",
"tags": [
"ram",
"warehouse"
]
},
"get": {
"operationId": "ram_get",
"parameters": [
{
"description": "Warehouse unique identifier",
"in": "path",
"name": "warehouse_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "RAMs 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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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 RAMs",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive all RAMs",
"tags": [
"ram",
"warehouse"
]
}
},
"/ram/{ram_id}": {
"get": {
"operationId": "ram_id_get",
"parameters": [
{
"description": "RAM unique identifier or UUID",
"in": "path",
"name": "ram_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "RAM 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"
},
"created_at": {
"description": "Spare part creation datetime",
"type": "string",
"example": "2024-06-19 09:11:31.000000"
},
"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": 1679845,
"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": "RAM not found",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive ram",
"tags": [
"ram",
"warehouse"
]
},
"post": {
"operationId": "ram_id_post",
"parameters": [
{
"description": "RAM unique identifier or UUID",
"in": "path",
"name": "ram_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": 1679845,
"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": "RAM has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving RAM",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit RAM",
"tags": [
"ram",
"warehouse"
]
}
},
"/ram/{ram_id}/remove": {
"post": {
"operationId": "ram_id_remove_post",
"parameters": [
{
"description": "RAM unique identifier",
"in": "path",
"name": "ram_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": "RAM has been removed successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error removing RAM",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Remove RAM",
"tags": [
"ram",
"warehouse"
]
}
},
"/server/{server_id}/owner": {
"post": {
"operationId": "server_id_owner_post",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"owner": {
"description": "Server owner user ID",
"example": 42,
"type": "integer"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Server owner has been changed successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error changing server owner",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Server owner change",
"tags": [
"server"
]
},
"delete": {
"operationId": "server_id_owner_delete",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Server release",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error releasing server",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Server release",
"tags": [
"server"
]
}
},
"/type/ram": {
"post": {
"operationId": "ram_type_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"name": {
"description": "RAM type name",
"example": "8GiB 3200MHz",
"minLength": 1,
"maxLength": 255,
"type": "string"
},
"alias": {
"description": "Short name",
"example": "8G-3200",
"maxLength": 255,
"type": "string"
},
"manufacturer": {
"description": "RAM manufacturer name",
"example": "Samsung",
"maxLength": 255,
"type": "string"
},
"ram_type": {
"description": "RAM type",
"example": "DDR",
"maxLength": 255,
"type": "string"
},
"ecc": {
"description": "Flag of ECC existence",
"type": "boolean"
},
"registered": {
"description": "Flag of registrency type",
"type": "boolean"
},
"low_profile": {
"description": "Flag of form factor memory type",
"type": "boolean"
},
"note": {
"description": "Comment",
"type": "string",
"example": "Favorite type",
"maxLength": 1500
},
"size": {
"description": "RAM size in MB",
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"example": 512
},
"frequency": {
"description": "RAM frequency",
"type": "integer",
"nullable": true,
"minimum": 1,
"maximum": 2147483647,
"example": 1333
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"required": [
"name",
"size"
],
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "RAM type has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error creating RAM type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Creating RAM type",
"tags": [
"ram_type",
"warehouse"
]
},
"get": {
"operationId": "ram_type_get",
"responses": {
"200": {
"description": "RAM types have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"properties": {
"id": {
"type": "integer",
"description": "RAM type unique identifier"
},
"name": {
"type": "string",
"description": "RAM type name"
},
"alias": {
"type": "string",
"description": "RAM type short name"
},
"manufacturer": {
"description": "RAM manufacturer name",
"example": "Samsung",
"type": "string"
},
"ram_type": {
"description": "RAM type",
"example": "DDR",
"type": "string"
},
"ecc": {
"description": "Flag of ECC existence",
"type": "boolean"
},
"registered": {
"description": "Flag of registrency type",
"type": "boolean"
},
"low_profile": {
"description": "Flag of form factor memory type",
"type": "boolean"
},
"note": {
"type": "string",
"description": "Comment"
},
"size": {
"type": "integer",
"description": "RAM size in MB"
},
"frequency": {
"type": "integer",
"description": "RAM frequency"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving RAM types",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receiving all RAM types",
"tags": [
"ram_type",
"warehouse"
]
}
},
"/type/ram/{ram_type_id}": {
"delete": {
"operationId": "ram_type_id_delete",
"parameters": [
{
"description": "RAM type unique identifier",
"in": "path",
"name": "ram_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "RAM type has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting ram type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete RAM type",
"tags": [
"ram_type",
"warehouse"
]
},
"get": {
"operationId": "ram_type_id_get",
"parameters": [
{
"description": "RAM type unique identifier",
"in": "path",
"name": "ram_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "RAM type has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer",
"description": "RAM type unique identifier"
},
"name": {
"type": "string",
"description": "RAM type name"
},
"alias": {
"type": "string",
"description": "RAM type short name"
},
"manufacturer": {
"description": "RAM manufacturer name",
"example": "Samsung",
"type": "string"
},
"ram_type": {
"description": "RAM type",
"example": "DDR",
"type": "string"
},
"ecc": {
"description": "Flag of ECC existence",
"type": "boolean"
},
"registered": {
"description": "Flag of registrency type",
"type": "boolean"
},
"low_profile": {
"description": "Flag of form factor memory type",
"type": "boolean"
},
"note": {
"type": "string",
"description": "Comment"
},
"size": {
"type": "integer",
"description": "RAM size in MB"
},
"frequency": {
"type": "integer",
"description": "RAM frequency"
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "RAM 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 RAM type",
"tags": [
"ram_type",
"warehouse"
]
},
"post": {
"operationId": "ram_type_id_post",
"parameters": [
{
"description": "RAM type unique identifier",
"in": "path",
"name": "ram_type_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"name": {
"description": "RAM type name",
"example": "8GiB 3200MHz",
"minLength": 1,
"maxLength": 255,
"type": "string"
},
"alias": {
"description": "Short name",
"example": "8G-3200",
"maxLength": 255,
"type": "string"
},
"manufacturer": {
"description": "RAM manufacturer name",
"example": "Samsung",
"maxLength": 255,
"type": "string"
},
"ram_type": {
"description": "RAM type",
"example": "DDR",
"maxLength": 255,
"type": "string"
},
"ecc": {
"description": "Flag of ECC existence",
"type": "boolean"
},
"registered": {
"description": "Flag of registrency type",
"type": "boolean"
},
"low_profile": {
"description": "Flag of form factor memory type",
"type": "boolean"
},
"note": {
"description": "Comment",
"type": "string",
"example": "Favorite type",
"maxLength": 1500
},
"size": {
"description": "RAM size in MB",
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"example": 512
},
"frequency": {
"description": "RAM frequency",
"type": "integer",
"nullable": true,
"minimum": 1,
"maximum": 2147483647,
"example": 1333
},
"custom_field": {
"description": "Custom fields of the entity",
"type": "object"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "RAM type has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving RAM type",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit RAM type",
"tags": [
"ram_type",
"warehouse"
]
}
},
"/server_profile": {
"get": {
"operationId": "server_profile_get",
"responses": {
"200": {
"description": "Server profiles have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"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"
}
}
},
"hardware": {
"description": "Server configuration field",
"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",
"nullable": true,
"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_address": {
"description": "LDAP/AD server address",
"type": "string"
},
"port": {
"description": "LDAP server port",
"type": "integer"
},
"bind_dn": {
"description": "LDAP/AD bind DN or username",
"type": "string"
},
"bind_password": {
"description": "LDAP/AD bind password or plain password",
"type": "string"
},
"base_dn": {
"description": "LDAP/AD base DN or search domain name",
"type": "string"
},
"user_dn": {
"description": "AD user domain name or LDAP attribute",
"type": "string"
},
"group_attr": {
"description": "LDAP group attribute",
"type": "string"
},
"username_attr": {
"description": "LDAP username attribute",
"type": "string"
},
"base_distinguished_names": {
"description": "LDAP base distinguished names",
"type": "array",
"items": {
"type": "string"
}
},
"domain_controller_addr": {
"description": "AD domain controller server addresses",
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Service status flag",
"type": "boolean",
"default": true
},
"encryption_type": {
"description": "Encryption type",
"type": "string",
"enum": [
"none",
"ssl",
"starttls"
]
},
"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"
},
"remote_user": {
"description": "Name of the remote LDAP user",
"type": "string"
}
}
}
},
"cert": {
"description": "The certificate",
"type": "string"
},
"cert_ca": {
"description": "CA of the certificate",
"type": "string"
},
"cert_key": {
"description": "The certificate key",
"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",
"nullable": true,
"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",
"nullable": true,
"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"
}
}
}
},
"dns": {
"description": "DNS server list",
"type": "array",
"items": {
"type": "string",
"description": "DNS server"
}
},
"bios_attributes": {
"description": "Bios attributes",
"type": "object",
"nullable": true
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving server profiles 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 server profiles",
"tags": [
"server_profile"
]
},
"post": {
"operationId": "server_profile_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"required": [
"name",
"location"
],
"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"
}
}
},
"hardware": {
"description": "Server configuration field",
"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"
}
}
}
},
"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_address": {
"description": "LDAP/AD server address",
"type": "string"
},
"port": {
"description": "LDAP server port",
"type": "integer"
},
"bind_dn": {
"description": "LDAP/AD bind DN or username",
"type": "string"
},
"bind_password": {
"description": "LDAP/AD bind password or plain password",
"type": "string"
},
"base_dn": {
"description": "LDAP/AD base DN or search domain name",
"type": "string"
},
"user_dn": {
"description": "AD user domain name or attribute",
"type": "string"
},
"group_attr": {
"description": "LDAP group attribute",
"type": "string"
},
"username_attr": {
"description": "LDAP username attribute",
"type": "string"
},
"base_distinguished_names": {
"description": "LDAP base distinguished names",
"type": "array",
"items": {
"type": "string"
}
},
"domain_controller_addr": {
"description": "AD domain controller server addresses",
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Service status flag",
"type": "boolean",
"default": true
},
"encryption_type": {
"description": "Encryption type",
"type": "string",
"enum": [
"none",
"ssl",
"starttls"
]
},
"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"
}
}
}
},
"cert": {
"description": "The certificate",
"type": "string"
},
"cert_ca": {
"description": "CA of the certificate",
"type": "string"
},
"cert_key": {
"description": "The certificate key",
"type": "string"
}
}
},
"firmware": {
"description": "Firmware params",
"type": "object"
},
"power_policy": {
"description": "Power policy",
"type": "object",
"properties": {
"value": {
"description": "BMC power policy value",
"type": "string"
}
}
},
"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"
}
}
}
},
"dns": {
"description": "DNS server list",
"type": "array",
"items": {
"type": "string",
"description": "DNS server"
}
},
"bios_attributes": {
"description": "Bios attributes",
"type": "object",
"nullable": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "Server profile has been created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving server profile",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Create server profile",
"tags": [
"server_profile"
]
}
},
"/server_profile/{server_profile_id}": {
"delete": {
"operationId": "server_profile_id_delete",
"parameters": [
{
"description": "Server profile unique identifier",
"in": "path",
"name": "server_profile_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Server profile has been deleted successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error deleting server profile",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Delete server profile",
"tags": [
"server_profile"
]
},
"get": {
"operationId": "server_profile_id_get",
"parameters": [
{
"description": "Server profile unique identifier",
"in": "path",
"name": "server_profile_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Server profile has been received",
"content": {
"application/json": {
"schema": {
"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"
}
}
},
"hardware": {
"description": "Server configuration field",
"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",
"nullable": true,
"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_address": {
"description": "LDAP/AD server address",
"type": "string"
},
"port": {
"description": "LDAP server port",
"type": "integer"
},
"bind_dn": {
"description": "LDAP/AD bind DN or username",
"type": "string"
},
"bind_password": {
"description": "LDAP/AD bind password or plain password",
"type": "string"
},
"base_dn": {
"description": "LDAP/AD base DN or search domain name",
"type": "string"
},
"user_dn": {
"description": "AD user domain name or LDAP attribute",
"type": "string"
},
"group_attr": {
"description": "LDAP group attribute",
"type": "string"
},
"username_attr": {
"description": "LDAP username attribute",
"type": "string"
},
"base_distinguished_names": {
"description": "LDAP base distinguished names",
"type": "array",
"items": {
"type": "string"
}
},
"domain_controller_addr": {
"description": "AD domain controller server addresses",
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Service status flag",
"type": "boolean",
"default": true
},
"encryption_type": {
"description": "Encryption type",
"type": "string",
"enum": [
"none",
"ssl",
"starttls"
]
},
"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"
},
"remote_user": {
"description": "Name of the remote LDAP user",
"type": "string"
}
}
}
},
"cert": {
"description": "The certificate",
"type": "string"
},
"cert_ca": {
"description": "CA of the certificate",
"type": "string"
},
"cert_key": {
"description": "The certificate key",
"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",
"nullable": true,
"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",
"nullable": true,
"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"
}
}
}
},
"dns": {
"description": "DNS server list",
"type": "array",
"items": {
"type": "string",
"description": "DNS server"
}
},
"bios_attributes": {
"description": "Bios attributes",
"type": "object",
"nullable": true
}
}
}
}
}
},
"default": {
"description": "Server profile 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 profile information",
"tags": [
"server_profile"
]
},
"post": {
"operationId": "server_profile_id_post",
"parameters": [
{
"description": "Server profile unique identifier",
"in": "path",
"name": "server_profile_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"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"
}
}
},
"hardware": {
"description": "Server configuration field",
"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",
"nullable": true,
"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_address": {
"description": "LDAP/AD server address",
"type": "string"
},
"port": {
"description": "LDAP server port",
"type": "integer"
},
"bind_dn": {
"description": "LDAP/AD bind DN or username",
"type": "string"
},
"bind_password": {
"description": "LDAP/AD bind password or plain password",
"type": "string"
},
"base_dn": {
"description": "LDAP/AD base DN or search domain name",
"type": "string"
},
"user_dn": {
"description": "AD user domain name or LDAP attribute",
"type": "string"
},
"group_attr": {
"description": "LDAP group attribute",
"type": "string"
},
"username_attr": {
"description": "LDAP username attribute",
"type": "string"
},
"base_distinguished_names": {
"description": "LDAP base distinguished names",
"type": "array",
"items": {
"type": "string"
}
},
"domain_controller_addr": {
"description": "AD domain controller server addresses",
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Service status flag",
"type": "boolean",
"default": true
},
"encryption_type": {
"description": "Encryption type",
"type": "string",
"enum": [
"none",
"ssl",
"starttls"
]
},
"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"
},
"remote_user": {
"description": "Name of the remote LDAP user",
"type": "string"
}
}
}
},
"cert": {
"description": "The certificate",
"type": "string"
},
"cert_ca": {
"description": "CA of the certificate",
"type": "string"
},
"cert_key": {
"description": "The certificate key",
"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",
"nullable": true,
"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",
"nullable": true,
"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"
}
}
}
},
"dns": {
"description": "DNS server list",
"type": "array",
"items": {
"type": "string",
"description": "DNS server"
}
},
"bios_attributes": {
"description": "Bios attributes",
"type": "object",
"nullable": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "Server profile has been edited successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error saving server profile",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Edit server profile",
"tags": [
"server_profile"
]
}
},
"/server/{server_id}/server_profile": {
"post": {
"operationId": "server_id_server_profile_post",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"required": [
"server_profile_id"
],
"type": "object",
"properties": {
"server_profile_id": {
"description": "Server profile to bind or unbind",
"type": "integer",
"nullable": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "Server profile has been rebound successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error rebind server profile",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Rebind server profile to servers",
"tags": [
"server_profile",
"server"
]
}
},
"/server/{server_id}/server_profile/{server_profile_id}": {
"post": {
"operationId": "server_id_server_profile_id_post",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
},
{
"description": "Server profile unique identifier",
"in": "path",
"name": "server_profile_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Server profile has been applied successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error applying server profile",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Apply server profile",
"tags": [
"server",
"server_profile"
]
}
},
"/server_profile_operation": {
"get": {
"operationId": "server_profile_operation_get",
"responses": {
"200": {
"description": "Server profile operations have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"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"
},
"profile_id": {
"description": "Unique identifier of the profile that underwent the operation.",
"type": "integer"
},
"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"
}
}
},
"hardware": {
"description": "Server configuration field",
"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",
"nullable": true,
"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_address": {
"description": "LDAP/AD server address",
"type": "string"
},
"port": {
"description": "LDAP server port",
"type": "integer"
},
"bind_dn": {
"description": "LDAP/AD bind DN or username",
"type": "string"
},
"bind_password": {
"description": "LDAP/AD bind password or plain password",
"type": "string"
},
"base_dn": {
"description": "LDAP/AD base DN or search domain name",
"type": "string"
},
"user_dn": {
"description": "AD user domain name or LDAP attribute",
"type": "string"
},
"group_attr": {
"description": "LDAP group attribute",
"type": "string"
},
"username_attr": {
"description": "LDAP username attribute",
"type": "string"
},
"base_distinguished_names": {
"description": "LDAP base distinguished names",
"type": "array",
"items": {
"type": "string"
}
},
"domain_controller_addr": {
"description": "AD domain controller server addresses",
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Service status flag",
"type": "boolean",
"default": true
},
"encryption_type": {
"description": "Encryption type",
"type": "string",
"enum": [
"none",
"ssl",
"starttls"
]
},
"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"
},
"remote_user": {
"description": "Name of the remote LDAP user",
"type": "string"
}
}
}
},
"cert": {
"description": "The certificate",
"type": "string"
},
"cert_ca": {
"description": "CA of the certificate",
"type": "string"
},
"cert_key": {
"description": "The certificate key",
"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",
"nullable": true,
"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",
"nullable": true,
"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"
}
}
}
},
"dns": {
"description": "DNS server list",
"type": "array",
"items": {
"type": "string",
"description": "DNS server"
}
},
"bios_attributes": {
"description": "Bios attributes",
"type": "object",
"nullable": true
}
}
},
"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"
}
}
}
}
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving server profile operations 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 server profile operations",
"tags": [
"server_profile_operation"
]
}
},
"/server_profile_operation/{server_profile_operation_id}": {
"get": {
"operationId": "server_profile_operation_id_get",
"parameters": [
{
"description": "Server profile operation unique identifier",
"in": "path",
"name": "server_profile_operation_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Server profile operation have been received",
"content": {
"application/json": {
"schema": {
"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"
},
"profile_id": {
"description": "Unique identifier of the profile that underwent the operation.",
"type": "integer"
},
"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"
}
}
},
"hardware": {
"description": "Server configuration field",
"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",
"nullable": true,
"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_address": {
"description": "LDAP/AD server address",
"type": "string"
},
"port": {
"description": "LDAP server port",
"type": "integer"
},
"bind_dn": {
"description": "LDAP/AD bind DN or username",
"type": "string"
},
"bind_password": {
"description": "LDAP/AD bind password or plain password",
"type": "string"
},
"base_dn": {
"description": "LDAP/AD base DN or search domain name",
"type": "string"
},
"user_dn": {
"description": "AD user domain name or LDAP attribute",
"type": "string"
},
"group_attr": {
"description": "LDAP group attribute",
"type": "string"
},
"username_attr": {
"description": "LDAP username attribute",
"type": "string"
},
"base_distinguished_names": {
"description": "LDAP base distinguished names",
"type": "array",
"items": {
"type": "string"
}
},
"domain_controller_addr": {
"description": "AD domain controller server addresses",
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Service status flag",
"type": "boolean",
"default": true
},
"encryption_type": {
"description": "Encryption type",
"type": "string",
"enum": [
"none",
"ssl",
"starttls"
]
},
"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"
},
"remote_user": {
"description": "Name of the remote LDAP user",
"type": "string"
}
}
}
},
"cert": {
"description": "The certificate",
"type": "string"
},
"cert_ca": {
"description": "CA of the certificate",
"type": "string"
},
"cert_key": {
"description": "The certificate key",
"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",
"nullable": true,
"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",
"nullable": true,
"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"
}
}
}
},
"dns": {
"description": "DNS server list",
"type": "array",
"items": {
"type": "string",
"description": "DNS server"
}
},
"bios_attributes": {
"description": "Bios attributes",
"type": "object",
"nullable": true
}
}
},
"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"
}
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving server profile operation info",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive information about server profile operation",
"tags": [
"server_profile_operation"
]
}
},
"/server/{server_id}/last_server_profile_operation": {
"get": {
"operationId": "server_id_last_server_profile_operation_get",
"parameters": [
{
"description": "Server unique identifier",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"responses": {
"200": {
"description": "Last server profile operation have been received",
"content": {
"application/json": {
"schema": {
"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"
},
"profile_id": {
"description": "Unique identifier of the profile that underwent the operation.",
"type": "integer"
},
"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"
}
}
},
"hardware": {
"description": "Server configuration field",
"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",
"nullable": true,
"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_address": {
"description": "LDAP/AD server address",
"type": "string"
},
"port": {
"description": "LDAP server port",
"type": "integer"
},
"bind_dn": {
"description": "LDAP/AD bind DN or username",
"type": "string"
},
"bind_password": {
"description": "LDAP/AD bind password or plain password",
"type": "string"
},
"base_dn": {
"description": "LDAP/AD base DN or search domain name",
"type": "string"
},
"user_dn": {
"description": "AD user domain name or LDAP attribute",
"type": "string"
},
"group_attr": {
"description": "LDAP group attribute",
"type": "string"
},
"username_attr": {
"description": "LDAP username attribute",
"type": "string"
},
"base_distinguished_names": {
"description": "LDAP base distinguished names",
"type": "array",
"items": {
"type": "string"
}
},
"domain_controller_addr": {
"description": "AD domain controller server addresses",
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Service status flag",
"type": "boolean",
"default": true
},
"encryption_type": {
"description": "Encryption type",
"type": "string",
"enum": [
"none",
"ssl",
"starttls"
]
},
"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"
},
"remote_user": {
"description": "Name of the remote LDAP user",
"type": "string"
}
}
}
},
"cert": {
"description": "The certificate",
"type": "string"
},
"cert_ca": {
"description": "CA of the certificate",
"type": "string"
},
"cert_key": {
"description": "The certificate key",
"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",
"nullable": true,
"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",
"nullable": true,
"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"
}
}
}
},
"dns": {
"description": "DNS server list",
"type": "array",
"items": {
"type": "string",
"description": "DNS server"
}
},
"bios_attributes": {
"description": "Bios attributes",
"type": "object",
"nullable": true
}
}
},
"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"
}
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving last server profile operation info",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Receive information about last server profile operation",
"tags": [
"server_profile_operation"
]
}
},
"/server_profile_users": {
"get": {
"operationId": "server_profile_users_get",
"responses": {
"200": {
"description": "Server profile users have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "BMC username"
},
"password": {
"type": "string",
"description": "BMC user password"
},
"level": {
"type": "string",
"description": "BMC user access level"
},
"server_profile": {
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
}
}
}
},
"type": "array"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving server profile users 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 server profile users",
"tags": [
"server_profile"
]
}
},
"/module/server_profile/enable": {
"post": {
"operationId": "server_profile_module_enable",
"summary": "Enable server profile module",
"tags": [
"server_profile"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Server profile module enabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Server profile module enable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/server_profile/disable": {
"post": {
"operationId": "server_profile_module_disable",
"summary": "Disable server profile module",
"tags": [
"server_profile"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Server profile module disabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Server profile module disabled error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/server_profile/status": {
"get": {
"operationId": "server_profile_module_status",
"responses": {
"200": {
"description": "Server profile module status has been received",
"content": {
"application/json": {
"schema": {
"properties": {
"status": {
"type": "string"
},
"status_info": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving server profile module status",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Server profile module status",
"tags": [
"server_profile"
]
}
},
"/bios_scheme/vendor/{vendor_name}/bios_version/{bios_version}": {
"get": {
"operationId": "get_default_bios_scheme_for_vendor_and_bios_version",
"parameters": [
{
"description": "Vendor name (can be default if unknown)",
"in": "path",
"name": "vendor_name",
"required": true,
"schema": {
"type": "string",
"minLength": 1,
"default": "*"
}
},
{
"description": "Bios version (can be default if unknown)",
"in": "path",
"name": "bios_version",
"required": true,
"schema": {
"type": "string",
"minLength": 1,
"default": "*"
}
}
],
"responses": {
"200": {
"description": "Default bios scheme for vendor and bios version has been received",
"content": {
"application/json": {
"schema": {
"description": "Default bios scheme info for vendor and bios version",
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving default bios scheme",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"summary": "Default bios scheme",
"tags": [
"server_profile"
]
}
},
"/module/server_monitoring/enable": {
"post": {
"operationId": "server_monitoring_module_enable",
"summary": "Enable server monitoring module",
"tags": [
"server_monitoring"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Server monitoring module enabled successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"description": "Server monitoring module status",
"type": "string",
"enum": [
"not_paid",
"paid_up",
"disabled",
"disabling",
"disabling_error",
"installing",
"installation_error",
"enabled"
],
"example": "enabled"
},
"status_info": {
"type": "object",
"description": "Server monitoring module detailed status information"
}
}
}
}
}
},
"default": {
"description": "Server monitoring module enable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/server_monitoring/disable": {
"post": {
"operationId": "server_monitoring_module_disable",
"summary": "Disable server monitoring module",
"tags": [
"server_monitoring"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Server monitoring module disabled successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"description": "Server monitoring module status",
"type": "string",
"enum": [
"not_paid",
"paid_up",
"disabled",
"disabling",
"disabling_error",
"installing",
"installation_error",
"enabled"
],
"example": "enabled"
},
"status_info": {
"type": "object",
"description": "Server monitoring module detailed status information"
}
}
}
}
}
},
"default": {
"description": "Server monitoring module disabled error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/server_monitoring/status": {
"get": {
"operationId": "server_monitoring_module_status",
"summary": "Server monitoring module status",
"tags": [
"server_monitoring"
],
"responses": {
"200": {
"description": "Server monitoring module status has been received",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"description": "Server monitoring module status",
"type": "string",
"enum": [
"not_paid",
"paid_up",
"disabled",
"disabling",
"disabling_error",
"installing",
"installation_error",
"enabled"
],
"example": "enabled"
},
"status_info": {
"type": "object",
"description": "Server monitoring module detailed status information"
}
}
}
}
}
},
"default": {
"description": "Error receiving Server monitoring module status",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/location/{location_id}/server_monitoring/enable": {
"post": {
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"operationId": "location_server_monitoring_enable",
"summary": "Enable server monitoring on the location",
"tags": [
"server_monitoring"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Server monitoring on the location enabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Server monitoring on the location enable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/location/{location_id}/server_monitoring/disable": {
"post": {
"parameters": [
{
"description": "Location unique identifier",
"in": "path",
"name": "location_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
],
"operationId": "location_server_monitoring_disable",
"summary": "Disable server monitoring on the location",
"tags": [
"server_monitoring"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Server monitoring on the location disabled successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
},
"task": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Server monitoring on the location enable error",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/module/server_monitoring/node_exporter": {
"get": {
"operationId": "server_monitoring_node_exporter",
"summary": "Download node_exporter archive",
"tags": [
"server_monitoring"
],
"responses": {
"200": {
"description": "Node exporter archive content",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"description": "Node exporter archive content (base64 encoding format)",
"type": "string"
},
"filename": {
"description": "Node exporter archive real filename",
"example": "node_exporter.tar.gz",
"type": "string"
},
"content_type": {
"description": "Archive content type",
"example": "application/tar+gzip",
"type": "string"
}
}
}
}
}
},
"default": {
"description": "Error receiving Server monitoring module status",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/server_monitoring/setting": {
"get": {
"operationId": "server_monitoring_setting",
"summary": "Returns server monitoring locations settings",
"tags": [
"server_monitoring"
],
"responses": {
"200": {
"description": "Server monitoring locations settings",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Setting ID",
"type": "integer",
"example": 1
},
"location": {
"description": "Information about location",
"type": "object",
"properties": {
"id": {
"description": "Location ID",
"type": "integer",
"example": 1
},
"name": {
"description": "Location name",
"type": "string",
"example": "New York City"
},
"server_with_ip_count": {
"description": "Total server count on location",
"type": "integer",
"example": 200
}
}
},
"servers": {
"description": "Server list from which metrics are collected",
"type": "array",
"items": {
"description": "Monitoring settings of server",
"type": "object",
"properties": {
"server": {
"description": "Server ID",
"type": "integer",
"example": 2
},
"listen_ip": {
"description": "IP address where server's metric exporter is located",
"type": "string",
"example": "192.50.38.1"
},
"listen_port": {
"description": "Network port where server's metric exporter is located",
"type": "integer",
"example": 9100
}
}
}
},
"status": {
"description": "Server monitoring setting status",
"type": "string",
"enum": [
"ok",
"setup",
"setup_failed",
"update",
"update_failed",
"deletion",
"deletion_failed"
],
"example": "ok"
},
"status_info": {
"description": "Server monitoring setting status information",
"type": "object",
"nullable": true
},
"scrape_interval": {
"type": "integer",
"description": "Read interval of IP addresses in the vmagent (in sec.)",
"example": 60
}
}
}
}
}
}
}
}
},
"default": {
"description": "Error receiving server monitoring locations settings",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/server_monitoring/setting/{setting_id}": {
"get": {
"operationId": "server_monitoring_setting_id_get",
"summary": "Returns server monitoring settings of one location",
"parameters": [
{
"description": "Server monitoring setting ID",
"in": "path",
"name": "setting_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"tags": [
"server_monitoring"
],
"responses": {
"200": {
"description": "Server monitoring location settings",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"description": "Setting ID",
"type": "integer",
"example": 1
},
"location": {
"description": "Information about location",
"type": "object",
"properties": {
"id": {
"description": "Location ID",
"type": "integer",
"example": 1
},
"name": {
"description": "Location name",
"type": "string",
"example": "New York City"
},
"server_with_ip_count": {
"description": "Total server count on location",
"type": "integer",
"example": 200
}
}
},
"servers": {
"description": "Server list from which metrics are collected",
"type": "array",
"items": {
"description": "Monitoring settings of server",
"type": "object",
"properties": {
"server": {
"description": "Server ID",
"type": "integer",
"example": 2
},
"listen_ip": {
"description": "IP address where server's metric exporter is located",
"type": "string",
"example": "192.50.38.1"
},
"listen_port": {
"description": "Network port where server's metric exporter is located",
"type": "integer",
"example": 9100
}
}
}
},
"status": {
"description": "Server monitoring setting status",
"type": "string",
"enum": [
"ok",
"setup",
"setup_failed",
"update",
"update_failed",
"deletion",
"deletion_failed"
],
"example": "ok"
},
"status_info": {
"description": "Server monitoring setting status information",
"type": "object",
"nullable": true
},
"scrape_interval": {
"type": "integer",
"description": "Read interval of IP addresses in the vmagent (in sec.)",
"example": 60
}
}
}
}
}
},
"default": {
"description": "Error receiving server monitoring location settings",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"post": {
"operationId": "server_monitoring_setting_id_post",
"summary": "Edit server monitoring settings of one location",
"parameters": [
{
"description": "Server monitoring setting ID",
"in": "path",
"name": "setting_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"servers": {
"type": "array",
"items": {
"type": "integer",
"description": "Server ID"
},
"example": [
1,
2,
3
]
},
"scrape_interval": {
"type": "integer",
"description": "Read interval of IP addresses in the vmagent (in sec.)",
"example": 60
}
}
}
}
}
},
"tags": [
"server_monitoring"
],
"responses": {
"200": {
"description": "Server monitoring setting edited succesfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error editting server monitoring location settings",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/server_monitoring/server/{server_id}": {
"get": {
"operationId": "server_monitoring_server_id_get",
"summary": "Returns server monitoring settings of one concrete server",
"parameters": [
{
"description": "Server ID",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"tags": [
"server_monitoring"
],
"responses": {
"200": {
"description": "Server monitoring settings of one concrete server",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"server": {
"description": "Server ID",
"type": "integer",
"example": 1
},
"server_monitoring_setting": {
"description": "Server monitoring setting ID",
"type": "integer",
"example": 1
},
"listen_ip": {
"description": "IP address where server's metric exporter is located",
"type": "string",
"example": "192.50.38.1"
},
"listen_port": {
"description": "Network port where server's metric exporter is located",
"type": "integer",
"example": 9100
}
}
}
}
}
},
"default": {
"description": "Error receiving server monitoring location settings",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
},
"post": {
"operationId": "server_monitoring_server_id_edit",
"summary": "Edit server setting in server monitoring and runs update of all listen IPs and ports on location",
"parameters": [
{
"description": "Server ID",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"listen_ip": {
"description": "New server's listen IP",
"type": "string",
"example": "192.50.38.1"
},
"listen_port": {
"description": "New server's listen port",
"type": "integer",
"example": 9100
}
}
}
}
}
},
"tags": [
"server_monitoring"
],
"responses": {
"200": {
"description": "Server setting in server monitoring updated succesfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error updating server listen IP",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/server_monitoring/server/{server_id}/disable": {
"post": {
"operationId": "server_monitoring_server_id_disable",
"summary": "Disable server from server monitoring and runs update of all listen IPs and ports on location",
"parameters": [
{
"description": "Server ID",
"in": "path",
"name": "server_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
}
}
},
"tags": [
"server_monitoring"
],
"responses": {
"200": {
"description": "Server disabled from server monitoring succesfully",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error disabling server from server monitoring",
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"code": {
"type": "integer"
},
"msg": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
}
}
}
},
"/list/server": {
"get": {
"parameters": [
{
"description": "List of fields of the entity separated by comma Default: id,name\n",
"in": "query",
"name": "fields",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "List have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"additionalProperties": true,
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
}
}
},
"type": "array"
},
"size": {
"type": "integer",
"description": "Filter count of entities (Returned by COUNT of the SQL)"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving 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 entity",
"tags": [
"list"
]
}
},
"/list/switch": {
"get": {
"parameters": [
{
"description": "List of fields of the entity separated by comma Default: id,name\n",
"in": "query",
"name": "fields",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "List have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"additionalProperties": true,
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
}
}
},
"type": "array"
},
"size": {
"type": "integer",
"description": "Filter count of entities (Returned by COUNT of the SQL)"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving 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 entity",
"tags": [
"list"
]
}
},
"/list/pdu": {
"get": {
"parameters": [
{
"description": "List of fields of the entity separated by comma Default: id,name\n",
"in": "query",
"name": "fields",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "List have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"additionalProperties": true,
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
}
}
},
"type": "array"
},
"size": {
"type": "integer",
"description": "Filter count of entities (Returned by COUNT of the SQL)"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving 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 entity",
"tags": [
"list"
]
}
},
"/list/ups": {
"get": {
"parameters": [
{
"description": "List of fields of the entity separated by comma Default: id,name\n",
"in": "query",
"name": "fields",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "List have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"additionalProperties": true,
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
}
}
},
"type": "array"
},
"size": {
"type": "integer",
"description": "Filter count of entities (Returned by COUNT of the SQL)"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving 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 entity",
"tags": [
"list"
]
}
},
"/list/user": {
"get": {
"parameters": [
{
"description": "List of fields of the entity separated by comma Default: id,name\n",
"in": "query",
"name": "fields",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "List have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"additionalProperties": true,
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
}
}
},
"type": "array"
},
"size": {
"type": "integer",
"description": "Filter count of entities (Returned by COUNT of the SQL)"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving 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 entity",
"tags": [
"list"
]
}
},
"/list/rack": {
"get": {
"parameters": [
{
"description": "List of fields of the entity separated by comma Default: id,name\n",
"in": "query",
"name": "fields",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "List have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"additionalProperties": true,
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
}
}
},
"type": "array"
},
"size": {
"type": "integer",
"description": "Filter count of entities (Returned by COUNT of the SQL)"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving 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 entity",
"tags": [
"list"
]
}
},
"/list/chassis": {
"get": {
"parameters": [
{
"description": "List of fields of the entity separated by comma Default: id,name\n",
"in": "query",
"name": "fields",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "List have been received",
"content": {
"application/json": {
"schema": {
"properties": {
"list": {
"items": {
"additionalProperties": true,
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the entity"
},
"name": {
"type": "string",
"description": "Name of the entity"
}
}
},
"type": "array"
},
"size": {
"type": "integer",
"description": "Filter count of entities (Returned by COUNT of the SQL)"
}
},
"type": "object"
}
}
}
},
"default": {
"description": "Error receiving 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 entity",
"tags": [
"list"
]
}
}
}
}