Hi, a user is interested in using the *AlarmTemplate (e.g.: CreateAlarmTemplate) methods of the DataMiner Web Services and possibly others. Where can a user be directed to in order to find sample working .json requests to get started? It is noted that there are .xml examples in the /API/v1/Json.asmx link on the DMA server but .json examples do not seem to be available.
We don't have json examples for every single web method, but we do have a few examples. Once familiar with the JSON structure, then I find it relatively easy to look at the XML documentation and to translate this into JSON.
A few examples in JSON can be found here.
The documentation of all the web methods can be found here, for example CreateAlarmTemplate. The documentation contains all the input parameters and the expected result.
Example of creating an alarm template via the CreateAlarmTemplate method:
{
“connection”: “1e0b6d61-80d9-428e-97da-81d628ff333a”,
“template”: {
“Name”: “MyKingfisherAlarmTemplate”,
“ProtocolName”: “Ovarro Kingfisher Sensor”,
“ProtocolVersion”: “Production”,
“Description”: “Created via WebAPI”,
“Parameters”: [
{
“ID”: 101,
“CL”: “”,
“MaL”: “”,
“MiL”: “”,
“WaL”: “”,
“Normal”: “0”,
“WaH”: “”,
“MiH”: “”,
“MaH”: “”,
“CH”: “1”,
“Filter”: “”,
“Info”: “”,
“Hysteresis”: “”,
“VarianceMonitor”: false,
“TrendMonitor”: false,
“LevelShiftMonitor”: false,
“DisabledIf”: “”,
“AutoClear”: “Undef”,
“Type”: “NORMAL”,
“Monitored”: true
}
]
}
}