Requirement : I need an way to get the alarms for a specific element. Since we don't have any inbuilt API to fetch an alarm specific to an element I thought of using the inbuilt API to pull all the alarms and then filter the response data to get the element specific alarms.
Based on the below documentation I am trying to fetch the alarms from one of the data miner agent.
https://docs.dataminer.services/develop/webservices/WS_v1/WS_About_v1/WS_v1_examples.html
But receiving the below 500 exception.
{
"Message": "There's no connection.",
"StackTrace": "",
"ExceptionType": "Skyline.DataMiner.Web.Common.NoConnectionWebApiException"
}
Kindly find the below details that I tired to make a post request on postman
Post : http://awsdmat701a/API/v1/Json.asmx/GetAlarms
Content-Type: application/json
Body:
{
"connection": "(GUID taken from the Apps-->about-->connection section on dataminer)",
"filter": {
"History": false,
"SlidingWindow": false,
"FilterItem": {
"__type": "Skyline.DataMiner.Web.Common.v1.DMAAlarmFilterSavedFilter",
"Filter": "sharedusersettings:My public alarm filter",
"Match": true
},
"StartTime": 0,
"EndTime": 0,
"Masked": false,
"InfoEvents": false,
"Columns": [],
"Limit": -1,
"SortBy": null,
"SortAscending": true
}
}
As this question has now been inactive for a long time, I will close it. If you still want more information about this, could you post a new question?
Hi Ramesh,
The connection string used in the call seems to be incorrect. To retrieve the correct connection string
- You first need to make a call to DataMiner API to authenticate. This is done by using the ConnectApp call. You can find details on this page under authentication https://docs.dataminer.services/develop/webservices/WS_v1/WS_About_v1/Using_the_Web_Services_v1.html
- The call above returns a token, this token will be used in the connection property in your call.
Hopefully, that solves your issue!
I see that this question has been inactive for some time. Do you still need help with this? If not, could you select the answer (using the ✓ icon) to indicate that the question is resolved?