I am attempting to create an element via the API and am getting the following response:
{
"Message": "Invalid port configuration: expected SNMPV2/SNMPV3-Serial but received SNMPV2.",
"StackTrace": "",
"ExceptionType": "Skyline.DataMiner.Web.Common.WebApiException"
}
This is the POST request, which matches the syntax outlined here https://docs.dataminer.services/develop/webservices/WS_v1/WS_About_v1/WS_v1_examples.html#createelement-request-1
POST https://dataminer-agent1/API/v1/Json.asmx/CreateElement
Content-Type: application/json
{
"connection": "xxxxxxxxxxxxxxxxxx",
"dmaID": 127911,
"viewIDs": [72],
"configuration": {
"Name": "test device",
"ProtocolName": "Linux Platform",
"ProtocolVersion": "Production",
"Ports": [
{ "__type": "Skyline.DataMiner.Web.Common.v1.DMAElementSNMPPortInfo", "IPAddress": "xxx.xx.xxx.xxx", "GetCommunity": "public", "SetCommunity": "private", "PortNumber": 161 }
]
}
}
Hi Oscar,
Looking further into this, the port configuration you've created doesn't match the port configuration of the "Linux Platform protocol".
You need to have at least:
- 1 port config for SNMPV2/SNMPV3
- 1 port config for SSH
Ok, how are either of those specified, the docs only give the following port options: DMASerialPortInfo, DMAElementSNMPPortInfo,
DMAElementSNMPV3PortInfo. Which apply here? I can use all three but that gives
{
“Message”: “Invalid port configuration: expected SNMPV2/SNMPV3-Serial but received SNMPV2-SNMPV3-Serial.”,
“StackTrace”: “”,
“ExceptionType”: “Skyline.DataMiner.Web.Common.WebApiException”
}