diff --git a/cmd/app/doc/openapi.json b/cmd/app/doc/openapi.json new file mode 100644 index 00000000..f7b1c425 --- /dev/null +++ b/cmd/app/doc/openapi.json @@ -0,0 +1,7837 @@ +{ + "components": { + "schemas": { + "AddAlarmOutput": { + "description": "AddAlarmOutput schema", + "properties": { + "ReturnValue": { + "example": 0, + "type": "integer" + } + }, + "type": "object" + }, + "AlarmClockOccurrence": { + "description": "AlarmClockOccurrence schema", + "properties": { + "DeleteOnCompletion": { + "example": true, + "type": "boolean" + }, + "ElementName": { + "example": "test", + "type": "string" + }, + "InstanceID": { + "example": "test", + "type": "string" + }, + "Interval": { + "example": 1, + "type": "integer" + }, + "IntervalInMinutes": { + "example": 1, + "type": "integer" + }, + "StartTime": { + "properties": { + "Datetime": { + "example": "2024-01-01T00:00:00Z", + "format": "date-time", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "AlarmClockOccurrenceInput": { + "description": "AlarmClockOccurrenceInput schema", + "properties": { + "DeleteOnCompletion": { + "example": true, + "type": "boolean" + }, + "ElementName": { + "example": "test", + "type": "string" + }, + "InstanceID": { + "example": "test", + "type": "string" + }, + "Interval": { + "example": 1, + "type": "integer" + }, + "StartTime": { + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "AuditLog": { + "description": "AuditLog schema", + "properties": { + "records": { + "items": { + "properties": { + "AuditApp": { + "example": "Security Admin", + "type": "string" + }, + "AuditAppId": { + "example": 0, + "type": "integer" + }, + "Event": { + "example": "Provisioning Started", + "type": "string" + }, + "EventId": { + "example": 0, + "type": "integer" + }, + "Ex": { + "example": "", + "type": "string" + }, + "ExStr": { + "example": "Remote WSAMN", + "type": "string" + }, + "Initiator": { + "example": "Local", + "type": "string" + }, + "InitiatorType": { + "example": 0, + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "MCLocationType": { + "example": 0, + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "NetAddress": { + "example": "127.0.0.1", + "type": "string" + }, + "Time": { + "example": "2023-04-19T20:38:20.000Z", + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "totalCnt": { + "example": 0, + "type": "integer" + } + }, + "type": "object" + }, + "BootSetting": { + "description": "BootSetting schema", + "properties": { + "action": { + "example": 8, + "type": "integer" + }, + "bootDetails": { + "properties": { + "bootPath": { + "example": "\\OemPba.efi", + "type": "string" + }, + "enforceSecureBoot": { + "example": true, + "type": "boolean" + }, + "password": { + "example": "password", + "type": "string" + }, + "url": { + "example": "https://", + "type": "string" + }, + "username": { + "example": "admin", + "type": "string" + } + }, + "type": "object" + }, + "useSOL": { + "example": true, + "type": "boolean" + } + }, + "type": "object" + }, + "BootSources": { + "description": "BootSources schema", + "properties": { + "biosBootString": { + "example": "string", + "type": "string" + }, + "bootString": { + "example": "string", + "type": "string" + }, + "elementName": { + "example": "IntelĀ® AMT: Boot Source", + "type": "string" + }, + "failThroughSupported": { + "example": 2, + "type": "integer" + }, + "instanceID": { + "example": "IntelĀ® AMT: Force Hard-drive Boot", + "type": "string" + }, + "structuredBiosBootString": { + "example": "CIM:Hard-Disk:1", + "type": "string" + } + }, + "type": "object" + }, + "CIRAConfig": { + "description": "CIRAConfig schema", + "properties": { + "authMethod": { + "example": 2, + "type": "integer" + }, + "commonName": { + "example": "example.com", + "type": "string" + }, + "configName": { + "example": "My CIRA Config", + "type": "string" + }, + "generateRandomPassword": { + "example": true, + "type": "boolean" + }, + "mpsPort": { + "example": 4433, + "type": "integer" + }, + "mpsRootCertificate": { + "example": "-----BEGIN CERTIFICATE-----\n...", + "type": "string" + }, + "mpsServerAddress": { + "example": "https://example.com", + "type": "string" + }, + "password": { + "example": "my_password", + "nullable": true, + "type": "string" + }, + "proxyDetails": { + "example": "http://example.com", + "type": "string" + }, + "serverAddressFormat": { + "example": 201, + "type": "integer" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "username": { + "example": "my_username", + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "CIRAConfigCountResponse": { + "description": "CIRAConfigCountResponse schema", + "properties": { + "data": { + "items": { + "properties": { + "authMethod": { + "example": 2, + "type": "integer" + }, + "commonName": { + "example": "example.com", + "type": "string" + }, + "configName": { + "example": "My CIRA Config", + "type": "string" + }, + "generateRandomPassword": { + "example": true, + "type": "boolean" + }, + "mpsPort": { + "example": 4433, + "type": "integer" + }, + "mpsRootCertificate": { + "example": "-----BEGIN CERTIFICATE-----\n...", + "type": "string" + }, + "mpsServerAddress": { + "example": "https://example.com", + "type": "string" + }, + "password": { + "example": "my_password", + "nullable": true, + "type": "string" + }, + "proxyDetails": { + "example": "http://example.com", + "type": "string" + }, + "serverAddressFormat": { + "example": 201, + "type": "integer" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "username": { + "example": "my_username", + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "type": "object" + }, + "CertInfo": { + "description": "CertInfo schema", + "properties": { + "cert": { + "example": "-----BEGIN CERTIFICATE-----\n...", + "type": "string" + }, + "isTrusted": { + "example": true, + "type": "boolean" + } + }, + "type": "object" + }, + "Certificate": { + "description": "Certificate schema", + "properties": { + "commonName": { + "type": "string" + }, + "dnsNames": { + "items": { + "type": "string" + }, + "type": "array" + }, + "guid": { + "type": "string" + }, + "issuerName": { + "type": "string" + }, + "notAfter": { + "format": "date-time", + "type": "string" + }, + "notBefore": { + "format": "date-time", + "type": "string" + }, + "publicKeyAlgorithm": { + "type": "string" + }, + "publicKeySize": { + "type": "integer" + }, + "serialNumber": { + "type": "string" + }, + "sha1Fingerprint": { + "type": "string" + }, + "sha256Fingerprint": { + "type": "string" + } + }, + "type": "object" + }, + "DeleteAlarmOccurrenceRequest": { + "description": "DeleteAlarmOccurrenceRequest schema", + "properties": { + "Name": { + "example": "test", + "type": "string" + } + }, + "type": "object" + }, + "DeleteCertificateRequest": { + "description": "DeleteCertificateRequest schema", + "properties": { + "instanceID": { + "example": "cert-instance-123", + "type": "string" + } + }, + "type": "object" + }, + "Device": { + "description": "Device schema", + "properties": { + "allowSelfSigned": { + "type": "boolean" + }, + "certHash": { + "type": "string" + }, + "connectionStatus": { + "type": "boolean" + }, + "deviceInfo": { + "nullable": true, + "properties": { + "currentMode": { + "type": "string" + }, + "features": { + "type": "string" + }, + "fwBuild": { + "type": "string" + }, + "fwSku": { + "type": "string" + }, + "fwVersion": { + "type": "string" + }, + "ipAddress": { + "type": "string" + }, + "lastUpdated": { + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "dnsSuffix": { + "type": "string" + }, + "friendlyName": { + "type": "string" + }, + "guid": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "lastConnected": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "lastDisconnected": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "lastSeen": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "mebxpassword": { + "type": "string" + }, + "mpsInstance": { + "type": "string" + }, + "mpspassword": { + "type": "string" + }, + "mpsusername": { + "type": "string" + }, + "password": { + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "tenantId": { + "type": "string" + }, + "useTLS": { + "type": "boolean" + }, + "username": { + "type": "string" + } + }, + "type": "object" + }, + "DeviceCountResponse": { + "description": "DeviceCountResponse schema", + "properties": { + "data": { + "items": { + "properties": { + "allowSelfSigned": { + "type": "boolean" + }, + "certHash": { + "type": "string" + }, + "connectionStatus": { + "type": "boolean" + }, + "deviceInfo": { + "nullable": true, + "properties": { + "currentMode": { + "type": "string" + }, + "features": { + "type": "string" + }, + "fwBuild": { + "type": "string" + }, + "fwSku": { + "type": "string" + }, + "fwVersion": { + "type": "string" + }, + "ipAddress": { + "type": "string" + }, + "lastUpdated": { + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "dnsSuffix": { + "type": "string" + }, + "friendlyName": { + "type": "string" + }, + "guid": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "lastConnected": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "lastDisconnected": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "lastSeen": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "mebxpassword": { + "type": "string" + }, + "mpsInstance": { + "type": "string" + }, + "mpspassword": { + "type": "string" + }, + "mpsusername": { + "type": "string" + }, + "password": { + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "tenantId": { + "type": "string" + }, + "useTLS": { + "type": "boolean" + }, + "username": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "type": "object" + }, + "DeviceStatResponse": { + "description": "DeviceStatResponse schema", + "properties": { + "connectedCount": { + "type": "integer" + }, + "disconnectedCount": { + "type": "integer" + }, + "totalCount": { + "type": "integer" + } + }, + "type": "object" + }, + "DiskInfo": { + "description": "DiskInfo schema", + "properties": { + "CIM_MediaAccessDevice": { + "nullable": true, + "properties": { + "response": { + "nullable": true + }, + "responses": { + "items": { + "nullable": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CIM_PhysicalPackage": { + "nullable": true, + "properties": { + "response": { + "nullable": true + }, + "responses": { + "items": { + "nullable": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "EventLogs": { + "description": "EventLogs schema", + "properties": { + "hasMoreRecords": { + "type": "boolean" + }, + "records": { + "items": { + "properties": { + "Desc": { + "type": "string" + }, + "DeviceAddress": { + "type": "integer" + }, + "Entity": { + "type": "string" + }, + "EntityInstance": { + "type": "integer" + }, + "EntityStr": { + "type": "string" + }, + "EventData": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "EventOffset": { + "type": "integer" + }, + "EventSensorType": { + "type": "integer" + }, + "EventSeverity": { + "type": "string" + }, + "EventSourceType": { + "type": "integer" + }, + "EventType": { + "type": "integer" + }, + "SensorNumber": { + "type": "integer" + }, + "Time": { + "type": "string" + }, + "eventTypeDesc": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "Features": { + "description": "Features schema", + "properties": { + "enableIDER": { + "example": true, + "type": "boolean" + }, + "enableKVM": { + "example": true, + "type": "boolean" + }, + "enableSOL": { + "example": true, + "type": "boolean" + }, + "httpsBootSupported": { + "example": true, + "type": "boolean" + }, + "kvmAvailable": { + "example": true, + "type": "boolean" + }, + "localPBABootSupported": { + "example": true, + "type": "boolean" + }, + "ocr": { + "example": true, + "type": "boolean" + }, + "optInState": { + "example": 0, + "type": "integer" + }, + "redirection": { + "example": true, + "type": "boolean" + }, + "remoteErase": { + "example": true, + "type": "boolean" + }, + "userConsent": { + "example": "kvm", + "type": "string" + }, + "winREBootSupported": { + "example": true, + "type": "boolean" + } + }, + "type": "object" + }, + "GeneralSettings": { + "description": "GeneralSettings schema", + "properties": { + "body": { + "nullable": true + }, + "header": { + "nullable": true + } + }, + "type": "object" + }, + "HTTPError": { + "description": "HTTPError schema", + "properties": { + "detail": { + "description": "Human readable error message", + "nullable": true, + "type": "string" + }, + "errors": { + "items": { + "nullable": true, + "properties": { + "more": { + "additionalProperties": { + "description": "Additional information about the error", + "nullable": true + }, + "description": "Additional information about the error", + "nullable": true, + "type": "object" + }, + "name": { + "description": "For example, name of the parameter that caused the error", + "type": "string" + }, + "reason": { + "description": "Human readable error message", + "type": "string" + } + }, + "type": "object" + }, + "nullable": true, + "type": "array" + }, + "instance": { + "nullable": true, + "type": "string" + }, + "status": { + "description": "HTTP status code", + "example": 403, + "nullable": true, + "type": "integer" + }, + "title": { + "description": "Short title of the error", + "nullable": true, + "type": "string" + }, + "type": { + "description": "URL of the error type. Can be used to lookup the error in a documentation", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "HardwareInfo": { + "description": "HardwareInfo schema", + "properties": { + "CIM_BIOSElement": { + "nullable": true, + "properties": { + "response": { + "nullable": true + }, + "responses": { + "items": { + "nullable": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CIM_Card": { + "nullable": true, + "properties": { + "response": { + "nullable": true + }, + "responses": { + "items": { + "nullable": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CIM_Chassis": { + "nullable": true, + "properties": { + "response": { + "nullable": true + }, + "responses": { + "items": { + "nullable": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CIM_Chip": { + "nullable": true, + "properties": { + "response": { + "nullable": true + }, + "responses": { + "items": { + "nullable": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CIM_ComputerSystemPackage": { + "nullable": true, + "properties": { + "response": { + "nullable": true + }, + "responses": { + "items": { + "nullable": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CIM_PhysicalMemory": { + "nullable": true, + "properties": { + "response": { + "nullable": true + }, + "responses": { + "items": { + "nullable": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CIM_Processor": { + "nullable": true, + "properties": { + "response": { + "nullable": true + }, + "responses": { + "items": { + "nullable": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CIM_SystemPackaging": { + "nullable": true, + "properties": { + "response": { + "nullable": true + }, + "responses": { + "items": { + "nullable": true + }, + "nullable": true, + "type": "array" + }, + "status": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "IEEE8021xConfig": { + "description": "IEEE8021xConfig schema", + "properties": { + "authenticationProtocol": { + "example": 1, + "type": "integer" + }, + "profileName": { + "example": "My Profile", + "type": "string" + }, + "pxeTimeout": { + "example": 60, + "nullable": true, + "type": "integer" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + }, + "wiredInterface": { + "example": false, + "type": "boolean" + } + }, + "type": "object" + }, + "IEEE8021xConfigCountResponse": { + "description": "IEEE8021xConfigCountResponse schema", + "properties": { + "data": { + "items": { + "properties": { + "authenticationProtocol": { + "example": 1, + "type": "integer" + }, + "profileName": { + "example": "My Profile", + "type": "string" + }, + "pxeTimeout": { + "example": 60, + "nullable": true, + "type": "integer" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + }, + "wiredInterface": { + "example": false, + "type": "boolean" + } + }, + "type": "object" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "type": "object" + }, + "KVMScreenSettings": { + "description": "KVMScreenSettings schema", + "properties": { + "displays": { + "items": { + "properties": { + "displayIndex": { + "type": "integer" + }, + "isActive": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "resolutionX": { + "type": "integer" + }, + "resolutionY": { + "type": "integer" + }, + "role": { + "nullable": true, + "type": "string" + }, + "upperLeftX": { + "type": "integer" + }, + "upperLeftY": { + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "KVMScreenSettingsRequest": { + "description": "KVMScreenSettingsRequest schema", + "properties": { + "displayIndex": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "NetworkSettings": { + "description": "NetworkSettings schema", + "properties": { + "wired": { + "nullable": true, + "properties": { + "consoleTCPMaxRetransmissions": { + "nullable": true, + "type": "integer" + }, + "defaultGateway": { + "type": "string" + }, + "dhcpEnabled": { + "type": "boolean" + }, + "elementName": { + "type": "string" + }, + "ieee8021x": { + "properties": { + "availableInS0": { + "type": "boolean" + }, + "enabled": { + "type": "string" + }, + "pxeTimeout": { + "type": "integer" + } + }, + "type": "object" + }, + "instanceID": { + "type": "string" + }, + "ipAddress": { + "type": "string" + }, + "ipSyncEnabled": { + "type": "boolean" + }, + "linkControl": { + "nullable": true, + "type": "string" + }, + "linkIsUp": { + "type": "boolean" + }, + "linkPolicy": { + "items": { + "type": "string" + }, + "type": "array" + }, + "linkPreference": { + "nullable": true, + "type": "string" + }, + "macAddress": { + "type": "string" + }, + "physicalConnectionType": { + "type": "string" + }, + "physicalNICMedium": { + "type": "string" + }, + "primaryDNS": { + "type": "string" + }, + "secondaryDNS": { + "type": "string" + }, + "sharedDynamicIP": { + "type": "boolean" + }, + "sharedMAC": { + "type": "boolean" + }, + "sharedStaticIP": { + "type": "boolean" + }, + "subnetMask": { + "type": "string" + }, + "vlanTag": { + "type": "integer" + }, + "wlanLinkProtectionLevel": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "wireless": { + "nullable": true, + "properties": { + "consoleTCPMaxRetransmissions": { + "nullable": true, + "type": "integer" + }, + "defaultGateway": { + "type": "string" + }, + "dhcpEnabled": { + "type": "boolean" + }, + "elementName": { + "type": "string" + }, + "ieee8021xSettings": { + "items": { + "properties": { + "authenticationProtocol": { + "type": "integer" + }, + "domain": { + "type": "string" + }, + "pacPassword": { + "type": "string" + }, + "password": { + "type": "string" + }, + "protectedAccessCredential": { + "type": "string" + }, + "psk": { + "type": "string" + }, + "roamingIdentity": { + "type": "string" + }, + "serverCertificateName": { + "type": "string" + }, + "serverCertificateNameComparison": { + "type": "integer" + }, + "username": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "instanceID": { + "type": "string" + }, + "ipAddress": { + "type": "string" + }, + "ipSyncEnabled": { + "type": "boolean" + }, + "linkControl": { + "nullable": true, + "type": "string" + }, + "linkIsUp": { + "type": "boolean" + }, + "linkPolicy": { + "items": { + "type": "string" + }, + "type": "array" + }, + "linkPreference": { + "nullable": true, + "type": "string" + }, + "macAddress": { + "type": "string" + }, + "physicalConnectionType": { + "type": "string" + }, + "physicalNICMedium": { + "type": "string" + }, + "primaryDNS": { + "type": "string" + }, + "secondaryDNS": { + "type": "string" + }, + "sharedDynamicIP": { + "type": "boolean" + }, + "sharedMAC": { + "type": "boolean" + }, + "sharedStaticIP": { + "type": "boolean" + }, + "subnetMask": { + "type": "string" + }, + "vlanTag": { + "type": "integer" + }, + "wifiNetworks": { + "items": { + "properties": { + "authenticationMethod": { + "type": "string" + }, + "bsstype": { + "type": "string" + }, + "elementName": { + "type": "string" + }, + "encryptionMethod": { + "type": "string" + }, + "priority": { + "type": "integer" + }, + "ssid": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "wifiPortConfigService": { + "properties": { + "creationClassName": { + "type": "string" + }, + "elementName": { + "type": "string" + }, + "enabledState": { + "type": "integer" + }, + "healthState": { + "type": "integer" + }, + "lastConnectedSsidUnderMeControl": { + "type": "string" + }, + "localProfileSynchronizationEnabled": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "noHostCsmeSoftwarePolicy": { + "type": "integer" + }, + "requestedState": { + "type": "integer" + }, + "systemCreationClassName": { + "type": "string" + }, + "systemName": { + "type": "string" + }, + "uefiWiFiProfileShareEnabled": { + "type": "boolean" + } + }, + "type": "object" + }, + "wlanLinkProtectionLevel": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PowerAction": { + "description": "PowerAction schema", + "properties": { + "action": { + "example": 8, + "type": "integer" + } + }, + "type": "object" + }, + "PowerActionResponse": { + "description": "PowerActionResponse schema", + "properties": { + "ReturnValue": { + "example": 0, + "type": "integer" + } + }, + "type": "object" + }, + "PowerCapabilities": { + "description": "PowerCapabilities schema", + "properties": { + "Hibernate": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Power cycle": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Power down": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Power on to IDE-R CDROM": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Power on to IDE-R Floppy": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Power on to PXE": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Power on to diagnostic": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Power up": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Power up to BIOS": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Reset": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Reset to BIOS": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Reset to IDE-R CDROM": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Reset to IDE-R Floppy": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Reset to PXE": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Reset to Secure Erase": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Reset to diagnostic": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Sleep": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Soft-off": { + "example": 0, + "nullable": true, + "type": "integer" + }, + "Soft-reset": { + "example": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "PowerState": { + "description": "PowerState schema", + "properties": { + "osPowerSavingState": { + "example": 0, + "type": "integer" + }, + "powerstate": { + "example": 0, + "type": "integer" + } + }, + "type": "object" + }, + "Profile": { + "description": "Profile schema", + "properties": { + "activation": { + "example": "activate", + "type": "string" + }, + "amtPassword": { + "example": "my_password", + "nullable": true, + "type": "string" + }, + "ciraConfigName": { + "example": "My CIRA Config", + "nullable": true, + "type": "string" + }, + "ciraConfigObject": { + "nullable": true, + "properties": { + "authMethod": { + "example": 2, + "type": "integer" + }, + "commonName": { + "example": "example.com", + "type": "string" + }, + "configName": { + "example": "My CIRA Config", + "type": "string" + }, + "generateRandomPassword": { + "example": true, + "type": "boolean" + }, + "mpsPort": { + "example": 4433, + "type": "integer" + }, + "mpsRootCertificate": { + "example": "-----BEGIN CERTIFICATE-----\n...", + "type": "string" + }, + "mpsServerAddress": { + "example": "https://example.com", + "type": "string" + }, + "password": { + "example": "my_password", + "nullable": true, + "type": "string" + }, + "proxyDetails": { + "example": "http://example.com", + "type": "string" + }, + "serverAddressFormat": { + "example": 201, + "type": "integer" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "username": { + "example": "my_username", + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "created_by": { + "example": "admin", + "nullable": true, + "type": "string" + }, + "creationDate": { + "example": "2021-07-01T00:00:00Z", + "nullable": true, + "type": "string" + }, + "dhcpEnabled": { + "example": true, + "type": "boolean" + }, + "generateRandomMEBxPassword": { + "example": true, + "type": "boolean" + }, + "generateRandomPassword": { + "example": true, + "type": "boolean" + }, + "iderEnabled": { + "example": true, + "type": "boolean" + }, + "ieee8021xProfile": { + "nullable": true, + "properties": { + "authenticationProtocol": { + "example": 1, + "type": "integer" + }, + "profileName": { + "example": "My Profile", + "type": "string" + }, + "pxeTimeout": { + "example": 60, + "nullable": true, + "type": "integer" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + }, + "wiredInterface": { + "example": false, + "type": "boolean" + } + }, + "type": "object" + }, + "ieee8021xProfileName": { + "example": "My Profile", + "nullable": true, + "type": "string" + }, + "ipSyncEnabled": { + "example": true, + "type": "boolean" + }, + "kvmEnabled": { + "example": true, + "type": "boolean" + }, + "localWifiSyncEnabled": { + "example": true, + "type": "boolean" + }, + "mebxPassword": { + "example": "my_password", + "nullable": true, + "type": "string" + }, + "profileName": { + "example": "My Profile", + "nullable": true, + "type": "string" + }, + "solEnabled": { + "example": true, + "type": "boolean" + }, + "tags": { + "items": { + "nullable": true, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "tlsCerts": { + "nullable": true, + "properties": { + "issuedCertificate": { + "properties": { + "cert": { + "type": "string" + }, + "certBin": { + "type": "string" + }, + "checked": { + "example": true, + "type": "boolean" + }, + "h:": { + "type": "string" + }, + "key": { + "format": "byte", + "type": "string" + }, + "pem": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "privateKeyBin": { + "type": "string" + } + }, + "type": "object" + }, + "rootCertificate": { + "properties": { + "cert": { + "type": "string" + }, + "certBin": { + "type": "string" + }, + "checked": { + "example": true, + "type": "boolean" + }, + "h:": { + "type": "string" + }, + "key": { + "format": "byte", + "type": "string" + }, + "pem": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "privateKeyBin": { + "type": "string" + } + }, + "type": "object" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "tlsMode": { + "example": 1, + "nullable": true, + "type": "integer" + }, + "tlsSigningAuthority": { + "example": "SelfSigned", + "nullable": true, + "type": "string" + }, + "uefiWifiSyncEnabled": { + "example": true, + "type": "boolean" + }, + "userConsent": { + "example": "All", + "nullable": true, + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + }, + "wifiConfigs": { + "items": { + "nullable": true, + "properties": { + "priority": { + "example": 1, + "nullable": true, + "type": "integer" + }, + "profileName": { + "example": "My Profile", + "type": "string" + }, + "profileProfileName": { + "example": "My Wireless Profile", + "type": "string" + }, + "tenantId": { + "example": "abc123", + "type": "string" + } + }, + "type": "object" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "ProfileCountResponse": { + "description": "ProfileCountResponse schema", + "properties": { + "data": { + "items": { + "properties": { + "activation": { + "example": "activate", + "type": "string" + }, + "amtPassword": { + "example": "my_password", + "nullable": true, + "type": "string" + }, + "ciraConfigName": { + "example": "My CIRA Config", + "nullable": true, + "type": "string" + }, + "ciraConfigObject": { + "nullable": true, + "properties": { + "authMethod": { + "example": 2, + "type": "integer" + }, + "commonName": { + "example": "example.com", + "type": "string" + }, + "configName": { + "example": "My CIRA Config", + "type": "string" + }, + "generateRandomPassword": { + "example": true, + "type": "boolean" + }, + "mpsPort": { + "example": 4433, + "type": "integer" + }, + "mpsRootCertificate": { + "example": "-----BEGIN CERTIFICATE-----\n...", + "type": "string" + }, + "mpsServerAddress": { + "example": "https://example.com", + "type": "string" + }, + "password": { + "example": "my_password", + "nullable": true, + "type": "string" + }, + "proxyDetails": { + "example": "http://example.com", + "type": "string" + }, + "serverAddressFormat": { + "example": 201, + "type": "integer" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "username": { + "example": "my_username", + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "created_by": { + "example": "admin", + "nullable": true, + "type": "string" + }, + "creationDate": { + "example": "2021-07-01T00:00:00Z", + "nullable": true, + "type": "string" + }, + "dhcpEnabled": { + "example": true, + "type": "boolean" + }, + "generateRandomMEBxPassword": { + "example": true, + "type": "boolean" + }, + "generateRandomPassword": { + "example": true, + "type": "boolean" + }, + "iderEnabled": { + "example": true, + "type": "boolean" + }, + "ieee8021xProfile": { + "nullable": true, + "properties": { + "authenticationProtocol": { + "example": 1, + "type": "integer" + }, + "profileName": { + "example": "My Profile", + "type": "string" + }, + "pxeTimeout": { + "example": 60, + "nullable": true, + "type": "integer" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + }, + "wiredInterface": { + "example": false, + "type": "boolean" + } + }, + "type": "object" + }, + "ieee8021xProfileName": { + "example": "My Profile", + "nullable": true, + "type": "string" + }, + "ipSyncEnabled": { + "example": true, + "type": "boolean" + }, + "kvmEnabled": { + "example": true, + "type": "boolean" + }, + "localWifiSyncEnabled": { + "example": true, + "type": "boolean" + }, + "mebxPassword": { + "example": "my_password", + "nullable": true, + "type": "string" + }, + "profileName": { + "example": "My Profile", + "nullable": true, + "type": "string" + }, + "solEnabled": { + "example": true, + "type": "boolean" + }, + "tags": { + "items": { + "nullable": true, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "tlsCerts": { + "nullable": true, + "properties": { + "issuedCertificate": { + "properties": { + "cert": { + "type": "string" + }, + "certBin": { + "type": "string" + }, + "checked": { + "example": true, + "type": "boolean" + }, + "h:": { + "type": "string" + }, + "key": { + "format": "byte", + "type": "string" + }, + "pem": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "privateKeyBin": { + "type": "string" + } + }, + "type": "object" + }, + "rootCertificate": { + "properties": { + "cert": { + "type": "string" + }, + "certBin": { + "type": "string" + }, + "checked": { + "example": true, + "type": "boolean" + }, + "h:": { + "type": "string" + }, + "key": { + "format": "byte", + "type": "string" + }, + "pem": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "privateKeyBin": { + "type": "string" + } + }, + "type": "object" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "tlsMode": { + "example": 1, + "nullable": true, + "type": "integer" + }, + "tlsSigningAuthority": { + "example": "SelfSigned", + "nullable": true, + "type": "string" + }, + "uefiWifiSyncEnabled": { + "example": true, + "type": "boolean" + }, + "userConsent": { + "example": "All", + "nullable": true, + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + }, + "wifiConfigs": { + "items": { + "nullable": true, + "properties": { + "priority": { + "example": 1, + "nullable": true, + "type": "integer" + }, + "profileName": { + "example": "My Profile", + "type": "string" + }, + "profileProfileName": { + "example": "My Wireless Profile", + "type": "string" + }, + "tenantId": { + "example": "abc123", + "type": "string" + } + }, + "type": "object" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "type": "object" + }, + "ProfileExportResponse": { + "description": "ProfileExportResponse schema", + "properties": { + "content": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "key": { + "type": "string" + } + }, + "type": "object" + }, + "SecuritySettings": { + "description": "SecuritySettings schema", + "properties": { + "certificates": { + "properties": { + "keyManagementItems": { + "items": { + "nullable": true, + "properties": { + "creationClassName": { + "nullable": true, + "type": "string" + }, + "elementName": { + "nullable": true, + "type": "string" + }, + "enabledDefault": { + "nullable": true, + "type": "integer" + }, + "enabledState": { + "nullable": true, + "type": "integer" + }, + "name": { + "nullable": true, + "type": "string" + }, + "requestedState": { + "nullable": true, + "type": "integer" + }, + "systemCreationClassName": { + "nullable": true, + "type": "string" + }, + "systemName": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "nullable": true, + "type": "array" + }, + "publicKeyCertificateItems": { + "items": { + "nullable": true, + "properties": { + "associatedProfiles": { + "items": { + "nullable": true, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "displayName": { + "nullable": true, + "type": "string" + }, + "elementName": { + "nullable": true, + "type": "string" + }, + "instanceID": { + "nullable": true, + "type": "string" + }, + "issuer": { + "nullable": true, + "type": "string" + }, + "publicKeyHandle": { + "nullable": true, + "type": "string" + }, + "readOnlyCertificate": { + "type": "boolean" + }, + "subject": { + "nullable": true, + "type": "string" + }, + "trustedRootCertificate": { + "type": "boolean" + }, + "x509Certificate": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "profileAssociation": { + "items": { + "properties": { + "clientCertificate": { + "nullable": true, + "properties": { + "associatedProfiles": { + "items": { + "nullable": true, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "displayName": { + "nullable": true, + "type": "string" + }, + "elementName": { + "nullable": true, + "type": "string" + }, + "instanceID": { + "nullable": true, + "type": "string" + }, + "issuer": { + "nullable": true, + "type": "string" + }, + "publicKeyHandle": { + "nullable": true, + "type": "string" + }, + "readOnlyCertificate": { + "type": "boolean" + }, + "subject": { + "nullable": true, + "type": "string" + }, + "trustedRootCertificate": { + "type": "boolean" + }, + "x509Certificate": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "profileID": { + "type": "string" + }, + "publicKey": { + "nullable": true, + "properties": { + "certificateHandle": { + "nullable": true, + "type": "string" + }, + "derKey": { + "nullable": true, + "type": "string" + }, + "elementName": { + "nullable": true, + "type": "string" + }, + "instanceID": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "rootCertificate": { + "nullable": true, + "properties": { + "associatedProfiles": { + "items": { + "nullable": true, + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "displayName": { + "nullable": true, + "type": "string" + }, + "elementName": { + "nullable": true, + "type": "string" + }, + "instanceID": { + "nullable": true, + "type": "string" + }, + "issuer": { + "nullable": true, + "type": "string" + }, + "publicKeyHandle": { + "nullable": true, + "type": "string" + }, + "readOnlyCertificate": { + "type": "boolean" + }, + "subject": { + "nullable": true, + "type": "string" + }, + "trustedRootCertificate": { + "type": "boolean" + }, + "x509Certificate": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "publicKeys": { + "properties": { + "publicPrivateKeyPairItems": { + "items": { + "nullable": true, + "properties": { + "certificateHandle": { + "nullable": true, + "type": "string" + }, + "derKey": { + "nullable": true, + "type": "string" + }, + "elementName": { + "nullable": true, + "type": "string" + }, + "instanceID": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "SettingDataResponse": { + "description": "SettingDataResponse schema", + "properties": { + "AcceptNonSecureConnections": { + "type": "boolean" + }, + "ElementName": { + "nullable": true, + "type": "string" + }, + "Enabled": { + "type": "boolean" + }, + "InstanceID": { + "nullable": true, + "type": "string" + }, + "MutualAuthentication": { + "type": "boolean" + }, + "NonSecureConnectionsSupported": { + "nullable": true, + "type": "boolean" + }, + "TrustedCN": { + "items": { + "nullable": true, + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "UserConsentCode": { + "description": "UserConsentCode schema", + "properties": { + "consentCode": { + "example": "123456", + "type": "string" + } + }, + "type": "object" + }, + "UserConsentMessage": { + "description": "UserConsentMessage schema", + "properties": { + "Body": { + "nullable": true, + "properties": { + "ReturnValue": { + "example": 0, + "type": "integer" + } + }, + "type": "object" + }, + "Header": { + "nullable": true, + "properties": { + "Action": { + "example": "http://intel.com/wbem/wscim/1/ips-schema/1/IPS_OptInService/StartOptInResponse", + "nullable": true, + "type": "string" + }, + "MessageID": { + "example": "uuid:00000000-8086-8086-8086-000000001ACD", + "nullable": true, + "type": "string" + }, + "Method": { + "example": "StartOptIn", + "nullable": true, + "type": "string" + }, + "RelatesTo": { + "example": "1", + "nullable": true, + "type": "string" + }, + "ResourceURI": { + "example": "http://intel.com/wbem/wscim/1/ips-schema/1/IPS_OptInService", + "nullable": true, + "type": "string" + }, + "To": { + "example": "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous", + "nullable": true, + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "Version": { + "description": "Version schema", + "properties": { + "AMT_SetupAndConfigurationService": { + "properties": { + "response": { + "properties": { + "ConfigurationServerFQDN": { + "nullable": true, + "type": "string" + }, + "CreationClassName": { + "nullable": true, + "type": "string" + }, + "DhcpDNSSuffix": { + "nullable": true, + "type": "string" + }, + "ElementName": { + "nullable": true, + "type": "string" + }, + "EnabledState": { + "nullable": true, + "type": "integer" + }, + "Name": { + "nullable": true, + "type": "string" + }, + "PasswordModel": { + "nullable": true, + "type": "integer" + }, + "ProvisioningMode": { + "nullable": true, + "type": "integer" + }, + "ProvisioningServerOTP": { + "nullable": true, + "type": "string" + }, + "ProvisioningState": { + "nullable": true, + "type": "integer" + }, + "RequestedState": { + "nullable": true, + "type": "integer" + }, + "SystemCreationClassName": { + "nullable": true, + "type": "string" + }, + "SystemName": { + "nullable": true, + "type": "string" + }, + "TrustedDNSSuffix": { + "nullable": true, + "type": "string" + }, + "ZeroTouchConfigurationEnabled": { + "nullable": true, + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "CIM_SoftwareIdentity": { + "properties": { + "responses": { + "items": { + "properties": { + "InstanceID": { + "type": "string" + }, + "IsEntity": { + "example": true, + "type": "boolean" + }, + "VersionString": { + "example": "\u003cmajor\u003e.\u003cminor\u003e.\u003crevision\u003e.\u003cbuild\u003e", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "WirelessConfig": { + "description": "WirelessConfig schema", + "properties": { + "authenticationMethod": { + "example": 1, + "type": "integer" + }, + "encryptionMethod": { + "example": 3, + "type": "integer" + }, + "ieee8021xProfileName": { + "example": "My Profile", + "nullable": true, + "type": "string" + }, + "ieee8021xProfileObject": { + "nullable": true, + "properties": { + "authenticationProtocol": { + "example": 1, + "type": "integer" + }, + "profileName": { + "example": "My Profile", + "type": "string" + }, + "pxeTimeout": { + "example": 60, + "nullable": true, + "type": "integer" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + }, + "wiredInterface": { + "example": false, + "type": "boolean" + } + }, + "type": "object" + }, + "linkPolicy": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "profileName": { + "example": "My Profile", + "nullable": true, + "type": "string" + }, + "pskPassphrase": { + "example": "abc", + "nullable": true, + "type": "string" + }, + "pskValue": { + "example": 3, + "type": "integer" + }, + "ssid": { + "example": "abc", + "type": "string" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "WirelessConfigCountResponse": { + "description": "WirelessConfigCountResponse schema", + "properties": { + "data": { + "items": { + "properties": { + "authenticationMethod": { + "example": 1, + "type": "integer" + }, + "encryptionMethod": { + "example": 3, + "type": "integer" + }, + "ieee8021xProfileName": { + "example": "My Profile", + "nullable": true, + "type": "string" + }, + "ieee8021xProfileObject": { + "nullable": true, + "properties": { + "authenticationProtocol": { + "example": 1, + "type": "integer" + }, + "profileName": { + "example": "My Profile", + "type": "string" + }, + "pxeTimeout": { + "example": 60, + "nullable": true, + "type": "integer" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "version": { + "example": "1.0.0", + "nullable": true, + "type": "string" + }, + "wiredInterface": { + "example": false, + "type": "boolean" + } + }, + "type": "object" + }, + "linkPolicy": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "profileName": { + "example": "My Profile", + "nullable": true, + "type": "string" + }, + "pskPassphrase": { + "example": "abc", + "nullable": true, + "type": "string" + }, + "pskValue": { + "example": 3, + "type": "integer" + }, + "ssid": { + "example": "abc", + "type": "string" + }, + "tenantId": { + "example": "abc123", + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "type": "object" + }, + "string": { + "description": "string schema", + "type": "string" + }, + "unknown-interface": { + "description": "unknown-interface schema" + } + } + }, + "info": { + "description": "API for managing console resources", + "title": "Console API", + "version": "1.0.0" + }, + "openapi": "3.1.0", + "paths": { + "/api/v1/admin/amt/alarmOccurrences/{guid}": { + "delete": { + "description": "Delete an alarm occurrence from a device", + "operationId": "DELETE_/api/v1/admin/amt/alarmOccurrences/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/DeleteAlarmOccurrenceRequest" + } + } + }, + "description": "Request body for dto.DeleteAlarmOccurrenceRequest", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Delete Alarm Occurrence", + "tags": [ + "Device Management" + ] + }, + "get": { + "description": "Retrieve alarm occurrences for a device", + "operationId": "GET_/api/v1/admin/amt/alarmOccurrences/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AlarmClockOccurrence" + }, + "type": "array" + } + }, + "application/xml": { + "schema": { + "items": { + "$ref": "#/components/schemas/AlarmClockOccurrence" + }, + "type": "array" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Alarm Occurrences", + "tags": [ + "Device Management" + ] + }, + "post": { + "description": "Create an alarm occurrence on a device", + "operationId": "POST_/api/v1/admin/amt/alarmOccurrences/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/AlarmClockOccurrenceInput" + } + } + }, + "description": "Request body for dto.AlarmClockOccurrenceInput", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddAlarmOutput" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/AddAlarmOutput" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Create Alarm Occurrence", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/certificates/{guid}": { + "delete": { + "description": "Delete a certificate from the device", + "operationId": "DELETE_/api/v1/admin/amt/certificates/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/DeleteCertificateRequest" + } + } + }, + "description": "Request body for dto.DeleteCertificateRequest", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Delete Certificate", + "tags": [ + "Device Management" + ] + }, + "get": { + "description": "Retrieve certificate and key information for a device", + "operationId": "GET_/api/v1/admin/amt/certificates/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecuritySettings" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/SecuritySettings" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Certificates", + "tags": [ + "Device Management" + ] + }, + "post": { + "description": "Add a certificate to the device", + "operationId": "POST_/api/v1/admin/amt/certificates/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CertInfo" + } + } + }, + "description": "Request body for dto.CertInfo", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/string" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/string" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Add Certificate", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/diskInfo/{guid}": { + "get": { + "description": "Retrieve disk information for a device", + "operationId": "GET_/api/v1/admin/amt/diskInfo/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiskInfo" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/DiskInfo" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Disk Info", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/explorer": { + "get": { + "description": "Retrieve supported AMT explorer calls", + "operationId": "GET_/api/v1/admin/amt/explorer", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/string" + }, + "type": "array" + } + }, + "application/xml": { + "schema": { + "items": { + "$ref": "#/components/schemas/string" + }, + "type": "array" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Explorer Calls", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/explorer/{guid}/{call}": { + "get": { + "description": "Execute an AMT explorer call on a device", + "operationId": "GET_/api/v1/admin/amt/explorer/:guid/:call", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Explorer call name", + "in": "path", + "name": "call", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Execute Explorer Call", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/features/{guid}": { + "get": { + "description": "Retrieve feature flags for a device", + "operationId": "GET_/api/v1/admin/amt/features/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Features" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Features" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Features", + "tags": [ + "Device Management" + ] + }, + "post": { + "description": "Update feature flags for a device", + "operationId": "POST_/api/v1/admin/amt/features/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Features" + } + } + }, + "description": "Request body for dto.Features", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Features" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Features" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Set Features", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/generalSettings/{guid}": { + "get": { + "description": "Retrieve general settings for a device", + "operationId": "GET_/api/v1/admin/amt/generalSettings/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeneralSettings" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/GeneralSettings" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get General Settings", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/hardwareInfo/{guid}": { + "get": { + "description": "Retrieve hardware information for a device", + "operationId": "GET_/api/v1/admin/amt/hardwareInfo/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HardwareInfo" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HardwareInfo" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Hardware Info", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/log/audit/{guid}": { + "get": { + "description": "Retrieve audit log entries for a device", + "operationId": "GET_/api/v1/admin/amt/log/audit/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Start index for pagination", + "in": "query", + "name": "startIndex", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLog" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/AuditLog" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Audit Log", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/log/audit/{guid}/download": { + "get": { + "description": "Download audit logs as CSV for a device", + "operationId": "GET_/api/v1/admin/amt/log/audit/:guid/download", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/string" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/string" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Download Audit Log", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/log/event/{guid}": { + "get": { + "description": "Retrieve event log entries for a device", + "operationId": "GET_/api/v1/admin/amt/log/event/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventLogs" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/EventLogs" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Event Log", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/log/event/{guid}/download": { + "get": { + "description": "Download event logs as CSV for a device", + "operationId": "GET_/api/v1/admin/amt/log/event/:guid/download", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/string" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/string" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Download Event Log", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/networkSettings/{guid}": { + "get": { + "description": "Retrieve network settings for a device", + "operationId": "GET_/api/v1/admin/amt/networkSettings/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NetworkSettings" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/NetworkSettings" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Network Settings", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/power/action/{guid}": { + "post": { + "description": "Perform a power action on a device", + "operationId": "POST_/api/v1/admin/amt/power/action/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/PowerAction" + } + } + }, + "description": "Request body for dto.PowerAction", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PowerActionResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/PowerActionResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Perform Power Action", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/power/bootOptions/{guid}": { + "post": { + "description": "Set boot options on a device", + "operationId": "POST_/api/v1/admin/amt/power/bootOptions/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/BootSetting" + } + } + }, + "description": "Request body for dto.BootSetting", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BootSetting" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/BootSetting" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Set Boot Options", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/power/bootSources/{guid}": { + "get": { + "description": "Retrieve available boot sources for a device", + "operationId": "GET_/api/v1/admin/amt/power/bootSources/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/BootSources" + }, + "type": "array" + } + }, + "application/xml": { + "schema": { + "items": { + "$ref": "#/components/schemas/BootSources" + }, + "type": "array" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Boot Sources", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/power/bootoptions/{guid}": { + "post": { + "description": "Set boot options on a device (alternate path)", + "operationId": "POST_/api/v1/admin/amt/power/bootoptions/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/BootSetting" + } + } + }, + "description": "Request body for dto.BootSetting", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BootSetting" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/BootSetting" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Set Boot Options (alt path)", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/power/capabilities/{guid}": { + "get": { + "description": "Retrieve power capabilities for a device", + "operationId": "GET_/api/v1/admin/amt/power/capabilities/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PowerCapabilities" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/PowerCapabilities" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Power Capabilities", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/power/state/{guid}": { + "get": { + "description": "Retrieve the current power state of a device", + "operationId": "GET_/api/v1/admin/amt/power/state/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PowerState" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/PowerState" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Power State", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/tls/{guid}": { + "get": { + "description": "Retrieve TLS setting data for a device", + "operationId": "GET_/api/v1/admin/amt/tls/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SettingDataResponse" + }, + "type": "array" + } + }, + "application/xml": { + "schema": { + "items": { + "$ref": "#/components/schemas/SettingDataResponse" + }, + "type": "array" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get TLS Setting Data", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/userConsentCode/cancel/{guid}": { + "get": { + "description": "Cancel a previously issued user consent code for a device", + "operationId": "GET_/api/v1/admin/amt/userConsentCode/cancel/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserConsentMessage" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/UserConsentMessage" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Cancel User Consent Code", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/userConsentCode/{guid}": { + "get": { + "description": "Retrieve the current user consent code for a device", + "operationId": "GET_/api/v1/admin/amt/userConsentCode/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserConsentMessage" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/UserConsentMessage" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get User Consent Code", + "tags": [ + "Device Management" + ] + }, + "post": { + "description": "Send a user consent code to the device", + "operationId": "POST_/api/v1/admin/amt/userConsentCode/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/UserConsentCode" + } + } + }, + "description": "Request body for dto.UserConsentCode", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserConsentMessage" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/UserConsentMessage" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Send User Consent Code", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/amt/version/{guid}": { + "get": { + "description": "Retrieve AMT/software version information for a device", + "operationId": "GET_/api/v1/admin/amt/version/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Version" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Version" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Version", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/ciraconfigs": { + "get": { + "description": "Retrieve all CIRA configurations with optional pagination", + "operationId": "GET_/api/v1/admin/ciraconfigs", + "parameters": [ + { + "description": "Number of records to return", + "in": "query", + "name": "$top", + "schema": { + "type": "integer" + } + }, + { + "description": "Number of records to skip", + "in": "query", + "name": "$skip", + "schema": { + "type": "integer" + } + }, + { + "description": "Include total count", + "in": "query", + "name": "$count", + "schema": { + "type": "boolean" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CIRAConfigCountResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/CIRAConfigCountResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "List CIRA Configurations", + "tags": [ + "CIRA" + ] + }, + "patch": { + "description": "Update an existing CIRA configuration", + "operationId": "PATCH_/api/v1/admin/ciraconfigs", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CIRAConfig" + } + } + }, + "description": "Request body for dto.CIRAConfig", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CIRAConfig" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/CIRAConfig" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Update CIRA Configuration", + "tags": [ + "CIRA" + ] + }, + "post": { + "description": "Create a new CIRA configuration", + "operationId": "POST_/api/v1/admin/ciraconfigs", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CIRAConfig" + } + } + }, + "description": "Request body for dto.CIRAConfig", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CIRAConfig" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/CIRAConfig" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Create CIRA Configuration", + "tags": [ + "CIRA" + ] + } + }, + "/api/v1/admin/ciraconfigs/{name}": { + "delete": { + "description": "Delete a CIRA configuration by profile name", + "operationId": "DELETE_/api/v1/admin/ciraconfigs/:name", + "parameters": [ + { + "description": "Profile name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Delete CIRA Configuration", + "tags": [ + "CIRA" + ] + }, + "get": { + "description": "Retrieve a specific CIRA configuration by profile name", + "operationId": "GET_/api/v1/admin/ciraconfigs/:name", + "parameters": [ + { + "description": "Profile name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CIRAConfig" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/CIRAConfig" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get CIRA Configuration by Name", + "tags": [ + "CIRA" + ] + } + }, + "/api/v1/admin/devices": { + "get": { + "description": "Retrieve all devices with optional pagination and filtering", + "operationId": "GET_/api/v1/admin/devices", + "parameters": [ + { + "description": "Number of records to return", + "in": "query", + "name": "$top", + "schema": { + "type": "integer" + } + }, + { + "description": "Number of records to skip", + "in": "query", + "name": "$skip", + "schema": { + "type": "integer" + } + }, + { + "description": "Include total count", + "in": "query", + "name": "$count", + "schema": { + "type": "boolean" + } + }, + { + "description": "Comma-separated list of tags to filter devices", + "in": "query", + "name": "tags", + "schema": { + "type": "string" + } + }, + { + "description": "Method to filter tags (any/all)", + "in": "query", + "name": "method", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCountResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/DeviceCountResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "List Devices", + "tags": [ + "Devices" + ] + }, + "patch": { + "description": "Update an existing device", + "operationId": "PATCH_/api/v1/admin/devices", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "description": "Request body for dto.Device", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Update Device", + "tags": [ + "Devices" + ] + }, + "post": { + "description": "Create a new device", + "operationId": "POST_/api/v1/admin/devices", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "description": "Request body for dto.Device", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Create Device", + "tags": [ + "Devices" + ] + } + }, + "/api/v1/admin/devices/cert/{id}": { + "get": { + "description": "Retrieve the certificate for a specific device", + "operationId": "GET_/api/v1/admin/devices/cert/:id", + "parameters": [ + { + "description": "Device ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Certificate" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Certificate" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Device Certificate", + "tags": [ + "Devices" + ] + }, + "post": { + "description": "Pin the certificate for a specific device", + "operationId": "POST_/api/v1/admin/devices/cert/:id", + "parameters": [ + { + "description": "Device ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Pin Device Certificate", + "tags": [ + "Devices" + ] + } + }, + "/api/v1/admin/devices/stats": { + "get": { + "description": "Retrieve statistics for devices", + "operationId": "GET_/api/v1/admin/devices/stats", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceStatResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/DeviceStatResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Device Statistics", + "tags": [ + "Devices" + ] + } + }, + "/api/v1/admin/devices/tags": { + "get": { + "description": "Retrieve a list of all available device tags", + "operationId": "GET_/api/v1/admin/devices/tags", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/string" + }, + "type": "array" + } + }, + "application/xml": { + "schema": { + "items": { + "$ref": "#/components/schemas/string" + }, + "type": "array" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Available Device Tags", + "tags": [ + "Devices" + ] + } + }, + "/api/v1/admin/devices/{id}": { + "delete": { + "description": "Delete a device by ID", + "operationId": "DELETE_/api/v1/admin/devices/:id", + "parameters": [ + { + "description": "Device ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Delete Device", + "tags": [ + "Devices" + ] + }, + "get": { + "description": "Retrieve a specific device by ID", + "operationId": "GET_/api/v1/admin/devices/:id", + "parameters": [ + { + "description": "Device ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Device by ID", + "tags": [ + "Devices" + ] + } + }, + "/api/v1/admin/ieee8021xconfigs": { + "get": { + "description": "Retrieve all IEEE 802.1x configurations with optional pagination", + "operationId": "GET_/api/v1/admin/ieee8021xconfigs", + "parameters": [ + { + "description": "Number of records to return", + "in": "query", + "name": "$top", + "schema": { + "type": "integer" + } + }, + { + "description": "Number of records to skip", + "in": "query", + "name": "$skip", + "schema": { + "type": "integer" + } + }, + { + "description": "Include total count", + "in": "query", + "name": "$count", + "schema": { + "type": "boolean" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IEEE8021xConfigCountResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/IEEE8021xConfigCountResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "List IEEE 802.1x Configurations", + "tags": [ + "IEEE 802.1x" + ] + }, + "patch": { + "description": "Update an existing IEEE 802.1x configuration", + "operationId": "PATCH_/api/v1/admin/ieee8021xconfigs", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/IEEE8021xConfig" + } + } + }, + "description": "Request body for dto.IEEE8021xConfig", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IEEE8021xConfig" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/IEEE8021xConfig" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Update IEEE 802.1x Configuration", + "tags": [ + "IEEE 802.1x" + ] + }, + "post": { + "description": "Create a new IEEE 802.1x configuration", + "operationId": "POST_/api/v1/admin/ieee8021xconfigs", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/IEEE8021xConfig" + } + } + }, + "description": "Request body for dto.IEEE8021xConfig", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IEEE8021xConfig" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/IEEE8021xConfig" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Create IEEE 802.1x Configuration", + "tags": [ + "IEEE 802.1x" + ] + } + }, + "/api/v1/admin/ieee8021xconfigs/{name}": { + "delete": { + "description": "Delete an IEEE 802.1x configuration by name", + "operationId": "DELETE_/api/v1/admin/ieee8021xconfigs/:name", + "parameters": [ + { + "description": "Configuration name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Delete IEEE 802.1x Configuration", + "tags": [ + "IEEE 802.1x" + ] + }, + "get": { + "description": "Retrieve a specific IEEE 802.1x configuration by name", + "operationId": "GET_/api/v1/admin/ieee8021xconfigs/:name", + "parameters": [ + { + "description": "Configuration name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IEEE8021xConfig" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/IEEE8021xConfig" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get IEEE 802.1x Configuration by Name", + "tags": [ + "IEEE 802.1x" + ] + } + }, + "/api/v1/admin/kvm/displays/{guid}": { + "get": { + "description": "Retrieve current KVM display settings for a device", + "operationId": "GET_/api/v1/admin/kvm/displays/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KVMScreenSettings" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/KVMScreenSettings" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get KVM displays", + "tags": [ + "Device Management" + ] + }, + "put": { + "description": "Update KVM display settings for a device", + "operationId": "PUT_/api/v1/admin/kvm/displays/:guid", + "parameters": [ + { + "description": "Device GUID", + "in": "path", + "name": "guid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/KVMScreenSettingsRequest" + } + } + }, + "description": "Request body for dto.KVMScreenSettingsRequest", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KVMScreenSettings" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/KVMScreenSettings" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Set KVM displays", + "tags": [ + "Device Management" + ] + } + }, + "/api/v1/admin/profiles": { + "get": { + "description": "Retrieve all profiles with optional pagination", + "operationId": "GET_/api/v1/admin/profiles", + "parameters": [ + { + "description": "Number of records to return", + "in": "query", + "name": "$top", + "schema": { + "type": "integer" + } + }, + { + "description": "Number of records to skip", + "in": "query", + "name": "$skip", + "schema": { + "type": "integer" + } + }, + { + "description": "Include total count", + "in": "query", + "name": "$count", + "schema": { + "type": "boolean" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileCountResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ProfileCountResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "List Profiles", + "tags": [ + "Profiles" + ] + }, + "patch": { + "description": "Update an existing profile", + "operationId": "PATCH_/api/v1/admin/profiles", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + }, + "description": "Request body for dto.Profile", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Update Profile", + "tags": [ + "Profiles" + ] + }, + "post": { + "description": "Create a new profile", + "operationId": "POST_/api/v1/admin/profiles", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + }, + "description": "Request body for dto.Profile", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Create Profile", + "tags": [ + "Profiles" + ] + } + }, + "/api/v1/admin/profiles/export/{name}": { + "get": { + "description": "Export a profile configuration", + "operationId": "GET_/api/v1/admin/profiles/export/:name", + "parameters": [ + { + "description": "Profile name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Domain name for export", + "in": "query", + "name": "domainName", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileExportResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/ProfileExportResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Export Profile", + "tags": [ + "Profiles" + ] + } + }, + "/api/v1/admin/profiles/{name}": { + "delete": { + "description": "Delete a profile by name", + "operationId": "DELETE_/api/v1/admin/profiles/:name", + "parameters": [ + { + "description": "Profile name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Delete Profile", + "tags": [ + "Profiles" + ] + }, + "get": { + "description": "Retrieve a specific profile by name", + "operationId": "GET_/api/v1/admin/profiles/:name", + "parameters": [ + { + "description": "Profile name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Profile by Name", + "tags": [ + "Profiles" + ] + } + }, + "/api/v1/admin/wirelessconfigs": { + "get": { + "description": "Retrieve all wireless configurations with optional pagination", + "operationId": "GET_/api/v1/admin/wirelessconfigs", + "parameters": [ + { + "description": "Number of records to return", + "in": "query", + "name": "$top", + "schema": { + "type": "integer" + } + }, + { + "description": "Number of records to skip", + "in": "query", + "name": "$skip", + "schema": { + "type": "integer" + } + }, + { + "description": "Include total count", + "in": "query", + "name": "$count", + "schema": { + "type": "boolean" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WirelessConfigCountResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/WirelessConfigCountResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "List Wireless Configurations", + "tags": [ + "Wireless" + ] + }, + "patch": { + "description": "Update an existing wireless configuration", + "operationId": "PATCH_/api/v1/admin/wirelessconfigs", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/WirelessConfig" + } + } + }, + "description": "Request body for dto.WirelessConfig", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WirelessConfig" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/WirelessConfig" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Update Wireless Configuration", + "tags": [ + "Wireless" + ] + }, + "post": { + "description": "Create a new wireless configuration", + "operationId": "POST_/api/v1/admin/wirelessconfigs", + "parameters": [ + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/WirelessConfig" + } + } + }, + "description": "Request body for dto.WirelessConfig", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WirelessConfig" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/WirelessConfig" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Create Wireless Configuration", + "tags": [ + "Wireless" + ] + } + }, + "/api/v1/admin/wirelessconfigs/{name}": { + "delete": { + "description": "Delete a wireless configuration by profile name", + "operationId": "DELETE_/api/v1/admin/wirelessconfigs/:name", + "parameters": [ + { + "description": "Profile name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/unknown-interface" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Delete Wireless Configuration", + "tags": [ + "Wireless" + ] + }, + "get": { + "description": "Retrieve a specific wireless configuration by profile name", + "operationId": "GET_/api/v1/admin/wirelessconfigs/:name", + "parameters": [ + { + "description": "Profile name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WirelessConfig" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/WirelessConfig" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Bad Request _(validation or deserialization error)_" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/HTTPError" + } + } + }, + "description": "Internal Server Error _(panics)_" + }, + "default": { + "description": "" + } + }, + "summary": "Get Wireless Configuration by Name", + "tags": [ + "Wireless" + ] + } + } + } +} \ No newline at end of file diff --git a/config/config.yml b/config/config.yml index 12dc921e..a450acc6 100644 --- a/config/config.yml +++ b/config/config.yml @@ -2,7 +2,7 @@ app: name: console repo: device-management-toolkit/console version: DEVELOPMENT - encryption_key: "" + encryption_key: "base64encodedkey12345678901234567890123456789012" allow_insecure_ciphers: false http: host: localhost diff --git a/internal/controller/httpapi/v1/devicemanagement.go b/internal/controller/httpapi/v1/devicemanagement.go index bd5f474b..3b134786 100644 --- a/internal/controller/httpapi/v1/devicemanagement.go +++ b/internal/controller/httpapi/v1/devicemanagement.go @@ -62,5 +62,8 @@ func NewAmtRoutes(handler *gin.RouterGroup, d devices.Feature, amt amtexplorer.F // KVM display settings h.GET("kvm/displays/:guid", r.getKVMDisplays) h.PUT("kvm/displays/:guid", r.setKVMDisplays) + + // Network link preference + h.POST("network/linkPreference/:guid", r.setLinkPreference) } } diff --git a/internal/controller/httpapi/v1/linkpreference.go b/internal/controller/httpapi/v1/linkpreference.go new file mode 100644 index 00000000..82361203 --- /dev/null +++ b/internal/controller/httpapi/v1/linkpreference.go @@ -0,0 +1,51 @@ +package v1 + +import ( + "errors" + "net/http" + + "github.com/gin-gonic/gin" + + "github.com/device-management-toolkit/console/internal/entity/dto/v1" + "github.com/device-management-toolkit/console/internal/usecase/devices/wsman" +) + +// setLinkPreference sets the link preference (ME or Host) on a device's WiFi interface. +func (r *deviceManagementRoutes) setLinkPreference(c *gin.Context) { + guid := c.Param("guid") + + var req dto.LinkPreferenceRequest + if err := c.ShouldBindJSON(&req); err != nil { + ErrorResponse(c, err) + + return + } + + response, err := r.d.SetLinkPreference(c.Request.Context(), guid, req) + + if err != nil { + r.l.Error(err, "http - v1 - setLinkPreference") + // Handle no WiFi port error with 404 and error message + if errors.Is(err, wsman.ErrNoWiFiPort) { + c.JSON(http.StatusNotFound, gin.H{ + "error": "Set Link Preference failed for guid: " + guid + ". - " + err.Error(), + }) + return + } + // For other errors (device not found, validation, etc.), use standard error response + ErrorResponse(c, err) + return + } + + // Map AMT return value to HTTP status code + // Non-zero return value -> 400 Bad Request with error message + // 0 -> 200 OK with success response + if response.ReturnValue != 0 { + c.JSON(http.StatusBadRequest, gin.H{ + "error": "Set Link Preference failed for guid: " + guid + ".", + }) + return + } + + c.JSON(http.StatusOK, response) +} diff --git a/internal/entity/dto/v1/linkpreference.go b/internal/entity/dto/v1/linkpreference.go new file mode 100644 index 00000000..d53ac587 --- /dev/null +++ b/internal/entity/dto/v1/linkpreference.go @@ -0,0 +1,21 @@ +package dto + +// LinkPreferenceRequest represents the request to set link preference on a device. +type LinkPreferenceRequest struct { + LinkPreference uint32 `json:"linkPreference" binding:"required,min=1,max=2"` // 1 for ME, 2 for HOST + Timeout uint32 `json:"timeout" binding:"required,min=0,max=65535"` // Timeout in seconds +} + +// LinkPreferenceResponse represents the response from setting link preference. +type LinkPreferenceResponse struct { + ReturnValue int `json:"returnValue" example:"0"` // Return code. 0 indicates success, -1 for no WiFi interface +} + +// LinkPreference enumeration values +const ( + LinkPreferenceME = 1 // Management Engine + LinkPreferenceHost = 2 // Host +) + +// Console-specific return value for no WiFi interface found +const ReturnValueNoWiFiPort = -1 diff --git a/internal/mocks/devicemanagement_mocks.go b/internal/mocks/devicemanagement_mocks.go index d66aa276..79b05eec 100644 --- a/internal/mocks/devicemanagement_mocks.go +++ b/internal/mocks/devicemanagement_mocks.go @@ -761,6 +761,21 @@ func (mr *MockDeviceManagementFeatureMockRecorder) GetHardwareInfo(ctx, guid any return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHardwareInfo", reflect.TypeOf((*MockDeviceManagementFeature)(nil).GetHardwareInfo), ctx, guid) } +// SetLinkPreference mocks base method. +func (m *MockDeviceManagementFeature) SetLinkPreference(c context.Context, guid string, req dto.LinkPreferenceRequest) (dto.LinkPreferenceResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetLinkPreference", c, guid, req) + ret0, _ := ret[0].(dto.LinkPreferenceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SetLinkPreference indicates an expected call of SetLinkPreference. +func (mr *MockDeviceManagementFeatureMockRecorder) SetLinkPreference(c, guid, req any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLinkPreference", reflect.TypeOf((*MockDeviceManagementFeature)(nil).SetLinkPreference), c, guid, req) +} + // GetKVMScreenSettings mocks base method. func (m *MockDeviceManagementFeature) GetKVMScreenSettings(c context.Context, guid string) (dto.KVMScreenSettings, error) { m.ctrl.T.Helper() diff --git a/internal/mocks/wsman_mocks.go b/internal/mocks/wsman_mocks.go index 56a1b731..e11ebf0e 100644 --- a/internal/mocks/wsman_mocks.go +++ b/internal/mocks/wsman_mocks.go @@ -733,3 +733,18 @@ func (mr *MockManagementMockRecorder) SetKVMRedirection(enable any) *gomock.Call mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetKVMRedirection", reflect.TypeOf((*MockManagement)(nil).SetKVMRedirection), enable) } + +// SetLinkPreference mocks base method. +func (m *MockManagement) SetLinkPreference(linkPreference, timeout uint32) (int, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetLinkPreference", linkPreference, timeout) + ret0, _ := ret[0].(int) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SetLinkPreference indicates an expected call of SetLinkPreference. +func (mr *MockManagementMockRecorder) SetLinkPreference(linkPreference, timeout any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLinkPreference", reflect.TypeOf((*MockManagement)(nil).SetLinkPreference), linkPreference, timeout) +} diff --git a/internal/mocks/wsv1_mocks.go b/internal/mocks/wsv1_mocks.go index 5b171733..7ab304aa 100644 --- a/internal/mocks/wsv1_mocks.go +++ b/internal/mocks/wsv1_mocks.go @@ -240,6 +240,21 @@ func (mr *MockFeatureMockRecorder) GetAlarmOccurrences(ctx, guid any) *gomock.Ca return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAlarmOccurrences", reflect.TypeOf((*MockFeature)(nil).GetAlarmOccurrences), ctx, guid) } +// SetLinkPreference mocks base method. +func (m *MockFeature) SetLinkPreference(c context.Context, guid string, req dto.LinkPreferenceRequest) (dto.LinkPreferenceResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetLinkPreference", c, guid, req) + ret0, _ := ret[0].(dto.LinkPreferenceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SetLinkPreference indicates an expected call of SetLinkPreference. +func (mr *MockFeatureMockRecorder) SetLinkPreference(c, guid, req any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLinkPreference", reflect.TypeOf((*MockFeature)(nil).SetLinkPreference), c, guid, req) +} + // GetAuditLog mocks base method. func (m *MockFeature) GetAuditLog(ctx context.Context, startIndex int, guid string) (dto.AuditLog, error) { m.ctrl.T.Helper() diff --git a/internal/usecase/devices/interfaces.go b/internal/usecase/devices/interfaces.go index c3441fd2..207df250 100644 --- a/internal/usecase/devices/interfaces.go +++ b/internal/usecase/devices/interfaces.go @@ -86,5 +86,7 @@ type ( // KVM Screen Settings (IPS_ScreenSettingData) GetKVMScreenSettings(c context.Context, guid string) (dto.KVMScreenSettings, error) SetKVMScreenSettings(c context.Context, guid string, req dto.KVMScreenSettingsRequest) (dto.KVMScreenSettings, error) + // Link Preference (AMT_EthernetPortSettings) + SetLinkPreference(c context.Context, guid string, req dto.LinkPreferenceRequest) (dto.LinkPreferenceResponse, error) } ) diff --git a/internal/usecase/devices/linkpreference.go b/internal/usecase/devices/linkpreference.go new file mode 100644 index 00000000..e4ddda8e --- /dev/null +++ b/internal/usecase/devices/linkpreference.go @@ -0,0 +1,38 @@ +package devices + +import ( + "context" + + dto "github.com/device-management-toolkit/console/internal/entity/dto/v1" +) + +// SetLinkPreference sets the link preference (ME or Host) on a device's WiFi interface. +func (uc *UseCase) SetLinkPreference(c context.Context, guid string, req dto.LinkPreferenceRequest) (dto.LinkPreferenceResponse, error) { + item, err := uc.repo.GetByID(c, guid, "") + if err != nil { + return dto.LinkPreferenceResponse{}, err + } + + if item == nil || item.GUID == "" { + return dto.LinkPreferenceResponse{}, ErrNotFound + } + + // Validate link preference value + if req.LinkPreference != dto.LinkPreferenceME && req.LinkPreference != dto.LinkPreferenceHost { + return dto.LinkPreferenceResponse{}, ErrValidationUseCase.Wrap("SetLinkPreference", "validate link preference", "linkPreference must be 1 (ME) or 2 (Host)") + } + + // Validate timeout + if req.Timeout > 65535 { + return dto.LinkPreferenceResponse{}, ErrValidationUseCase.Wrap("SetLinkPreference", "validate timeout", "timeout max value is 65535") + } + + device, _ := uc.device.SetupWsmanClient(*item, false, true) + + returnValue, err := device.SetLinkPreference(req.LinkPreference, req.Timeout) + if err != nil { + return dto.LinkPreferenceResponse{ReturnValue: returnValue}, err + } + + return dto.LinkPreferenceResponse{ReturnValue: returnValue}, nil +} diff --git a/internal/usecase/devices/linkpreference_test.go b/internal/usecase/devices/linkpreference_test.go new file mode 100644 index 00000000..c3a24bb5 --- /dev/null +++ b/internal/usecase/devices/linkpreference_test.go @@ -0,0 +1,192 @@ +package devices_test + +import ( + "context" + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + gomock "go.uber.org/mock/gomock" + + "github.com/device-management-toolkit/console/internal/entity" + "github.com/device-management-toolkit/console/internal/entity/dto/v1" + "github.com/device-management-toolkit/console/internal/mocks" + devices "github.com/device-management-toolkit/console/internal/usecase/devices" + "github.com/device-management-toolkit/console/internal/usecase/devices/wsman" + "github.com/device-management-toolkit/console/pkg/logger" +) + +func initLinkPreferenceTest(t *testing.T) (*devices.UseCase, *mocks.MockWSMAN, *mocks.MockManagement, *mocks.MockDeviceManagementRepository) { + t.Helper() + + mockCtl := gomock.NewController(t) + defer mockCtl.Finish() + + repo := mocks.NewMockDeviceManagementRepository(mockCtl) + wsmanMock := mocks.NewMockWSMAN(mockCtl) + wsmanMock.EXPECT().Worker().Return().AnyTimes() + + management := mocks.NewMockManagement(mockCtl) + log := logger.New("error") + u := devices.New(repo, wsmanMock, mocks.NewMockRedirection(mockCtl), log, mocks.MockCrypto{}) + + return u, wsmanMock, management, repo +} + +func TestSetLinkPreference(t *testing.T) { + t.Parallel() + + device := &entity.Device{ + GUID: "device-guid-123", + TenantID: "tenant-id-456", + } + + request := dto.LinkPreferenceRequest{ + LinkPreference: 1, // ME + Timeout: 300, + } + + tests := []struct { + name string + request dto.LinkPreferenceRequest + manMock func(*mocks.MockWSMAN, *mocks.MockManagement) + repoMock func(*mocks.MockDeviceManagementRepository) + res dto.LinkPreferenceResponse + err error + }{ + { + name: "success - set to ME", + request: request, + manMock: func(man *mocks.MockWSMAN, man2 *mocks.MockManagement) { + man.EXPECT(). + SetupWsmanClient(gomock.Any(), false, true). + Return(wsman.Management(man2), nil) + man2.EXPECT(). + SetLinkPreference(uint32(1), uint32(300)). + Return(0, nil) + }, + repoMock: func(repo *mocks.MockDeviceManagementRepository) { + repo.EXPECT(). + GetByID(context.Background(), device.GUID, ""). + Return(device, nil) + }, + res: dto.LinkPreferenceResponse{ReturnValue: 0}, + err: nil, + }, + { + name: "success - set to HOST", + request: dto.LinkPreferenceRequest{ + LinkPreference: 2, // HOST + Timeout: 60, + }, + manMock: func(man *mocks.MockWSMAN, man2 *mocks.MockManagement) { + man.EXPECT(). + SetupWsmanClient(gomock.Any(), false, true). + Return(wsman.Management(man2), nil) + man2.EXPECT(). + SetLinkPreference(uint32(2), uint32(60)). + Return(0, nil) + }, + repoMock: func(repo *mocks.MockDeviceManagementRepository) { + repo.EXPECT(). + GetByID(context.Background(), device.GUID, ""). + Return(device, nil) + }, + res: dto.LinkPreferenceResponse{ReturnValue: 0}, + err: nil, + }, + { + name: "GetById fails - device not found", + request: request, + manMock: func(_ *mocks.MockWSMAN, _ *mocks.MockManagement) {}, + repoMock: func(repo *mocks.MockDeviceManagementRepository) { + repo.EXPECT(). + GetByID(context.Background(), device.GUID, ""). + Return(nil, ErrGeneral) + }, + res: dto.LinkPreferenceResponse{}, + err: devices.ErrGeneral, + }, + { + name: "no WiFi port found", + request: request, + manMock: func(man *mocks.MockWSMAN, man2 *mocks.MockManagement) { + man.EXPECT(). + SetupWsmanClient(gomock.Any(), false, true). + Return(man2, nil) + man2.EXPECT(). + SetLinkPreference(uint32(1), uint32(300)). + Return(-1, wsman.ErrNoWiFiPort) + }, + repoMock: func(repo *mocks.MockDeviceManagementRepository) { + repo.EXPECT(). + GetByID(context.Background(), device.GUID, ""). + Return(device, nil) + }, + res: dto.LinkPreferenceResponse{ReturnValue: -1}, + err: wsman.ErrNoWiFiPort, + }, + { + name: "SetLinkPreference fails with AMT error", + request: request, + manMock: func(man *mocks.MockWSMAN, man2 *mocks.MockManagement) { + man.EXPECT(). + SetupWsmanClient(gomock.Any(), false, true). + Return(man2, nil) + man2.EXPECT(). + SetLinkPreference(uint32(1), uint32(300)). + Return(5, errors.New("invalid parameter")) + }, + repoMock: func(repo *mocks.MockDeviceManagementRepository) { + repo.EXPECT(). + GetByID(context.Background(), device.GUID, ""). + Return(device, nil) + }, + res: dto.LinkPreferenceResponse{ReturnValue: 5}, + err: errors.New("invalid parameter"), + }, + { + name: "SetLinkPreference fails with general error", + request: request, + manMock: func(man *mocks.MockWSMAN, man2 *mocks.MockManagement) { + man.EXPECT(). + SetupWsmanClient(gomock.Any(), false, true). + Return(man2, nil) + man2.EXPECT(). + SetLinkPreference(uint32(1), uint32(300)). + Return(0, ErrGeneral) + }, + repoMock: func(repo *mocks.MockDeviceManagementRepository) { + repo.EXPECT(). + GetByID(context.Background(), device.GUID, ""). + Return(device, nil) + }, + res: dto.LinkPreferenceResponse{ReturnValue: 0}, + err: ErrGeneral, + }, + } + + for _, tc := range tests { + tc := tc + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + useCase, wsmanMock, management, repo := initLinkPreferenceTest(t) + + if tc.manMock != nil { + tc.manMock(wsmanMock, management) + } + + tc.repoMock(repo) + + res, err := useCase.SetLinkPreference(context.Background(), device.GUID, tc.request) + + require.Equal(t, tc.res, res) + + if tc.err != nil { + assert.Equal(t, err.Error(), tc.err.Error()) + } + }) + } +} diff --git a/internal/usecase/devices/wsman/interfaces.go b/internal/usecase/devices/wsman/interfaces.go index cf345a66..7ff7a5ab 100644 --- a/internal/usecase/devices/wsman/interfaces.go +++ b/internal/usecase/devices/wsman/interfaces.go @@ -71,4 +71,5 @@ type Management interface { GetIPSKVMRedirectionSettingData() (kvmredirection.Response, error) SetIPSKVMRedirectionSettingData(data *kvmredirection.KVMRedirectionSettingsRequest) (kvmredirection.Response, error) DeleteCertificate(instanceID string) error + SetLinkPreference(linkPreference, timeout uint32) (int, error) } diff --git a/internal/usecase/devices/wsman/message.go b/internal/usecase/devices/wsman/message.go index b104bfc3..fa58c269 100644 --- a/internal/usecase/devices/wsman/message.go +++ b/internal/usecase/devices/wsman/message.go @@ -81,6 +81,8 @@ var ( // ErrCIRADeviceNotConnected is returned when a CIRA device is not connected or not found. ErrCIRADeviceNotConnected = errors.New("CIRA device not connected/not found") + // ErrNoWiFiPort is returned when no WiFi interface is found on the device. + ErrNoWiFiPort = errors.New("no WiFi interface found (InstanceID == Intel(r) AMT Ethernet Port Settings 1)") ) type ConnectionEntry struct { @@ -1917,3 +1919,45 @@ func (c *ConnectionEntry) GetIPSKVMRedirectionSettingData() (kvmredirection.Resp func (c *ConnectionEntry) SetIPSKVMRedirectionSettingData(req *kvmredirection.KVMRedirectionSettingsRequest) (kvmredirection.Response, error) { return c.WsmanMessages.IPS.KVMRedirectionSettingData.Put(req) } + +// SetLinkPreference sets the link preference (ME or Host) on the WiFi interface. +// linkPreference: 1 for ME, 2 for Host +// timeout: timeout in seconds +// Returns the return value from the AMT device or an error. +func (c *ConnectionEntry) SetLinkPreference(linkPreference, timeout uint32) (int, error) { + // Get all ethernet port settings to find WiFi interface + enumResponse, err := c.WsmanMessages.AMT.EthernetPortSettings.Enumerate() + if err != nil { + return -1, err + } + + pullResponse, err := c.WsmanMessages.AMT.EthernetPortSettings.Pull(enumResponse.Body.EnumerateResponse.EnumerationContext) + if err != nil { + return -1, err + } + + // Prefer fixed InstanceID for WiFi interface (do not rely on PhysicalConnectionType) + const wifiInstanceIDConst = "Intel(r) AMT Ethernet Port Settings 1" + var wifiInstanceID string + + for i := range pullResponse.Body.PullResponse.EthernetPortItems { + port := &pullResponse.Body.PullResponse.EthernetPortItems[i] + // Select by InstanceID only + if port.InstanceID == wifiInstanceIDConst { + wifiInstanceID = port.InstanceID + break + } + } + + if wifiInstanceID == "" { + return -1, ErrNoWiFiPort + } + + // Call SetLinkPreference on the WiFi interface + response, err := c.WsmanMessages.AMT.EthernetPortSettings.SetLinkPreference(linkPreference, timeout, wifiInstanceID) + if err != nil { + return -1, err + } + + return response.Body.SetLinkPreferenceResponse.ReturnValue, nil +}