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,
I'm not sure if this is related but in the example, they use "ElementName" instead of "Name"
If I use ElementName it gives the following error
{
“Message”: “Invalid element name: Name can not be null or empty.”,
“StackTrace”: “”,
“ExceptionType”: “Skyline.DataMiner.Web.Common.WebApiException”
}
Using both and Element Name and Name gives the original error I posted