Page 1 of 1

[Implemented] Config differences API/Webhook

Posted: Wed Aug 22, 2018 12:33 pm
by sbrconsulting
I would like to have a set of API calls that allows me to get all the devices that have had configuration changes in some time period. Something like
http://example.unimus/api/v2/devices/ch ... d=datatime
{"address4": IPv4address, "address6": IPv6address, "name": "devicename", "count":number of change}

Then, for each device be able, to get the changes in plain text, similar to what the current email notification provides.
http://example.unimus/api/v2/device/changes/:changeid
{"device":deviceid, "date": datetime, "delete":"deleted text", "add": "added text"}
http://example.unimus/api/v2/device/:device/changes
{"device":deviceid, "changes": [changeid0: [ "delete":"deleted text", "add": "added text"]. changeid1: [ "delete":"deleted text", "add": "added text"]. changeid2: [ "delete":"deleted text", "add": "added text"]. ..., changeidN: [ "delete":"deleted text", "add": "added text"]]}

Closely related would be a webhook that calls my listener every time there is a configuration change detected. It could either pass the device that had the change or the device and the changes.
{"device":"deviceid"}
{"device":"deviceid, "changes":[change0, change1, ... , changeN]}

Another webhook that notifies the summary information, similar to the email, that list all the devices that have changed and the time period the changes occur.
{"system":"systemname", "RanOn": device count, "Succeeded":success count, "failed": failed count, "successes":[device0, device1, device2, ..., deviceN], "failures": [device0, device1, device2, ..., deviceN]}

A webhook that notifies on failed discovery, failed login, etc. would also be helpful.
"system":"systemname", "failedon": "discovery|login|update", "device": deviceid}

All the webhooks should return the date and time and the system running on

Re: Config differences API/Webhook

Posted: Thu Aug 30, 2018 1:57 pm
by Sachtilah
Hi,

Sorry for the late reply.

I have created a ticked https://tracker.unimus.net/browse/UN-362 for new API endpoint. We'r planing to have next release in 2 weeks, if i will find a bit time to implement this task it will be included in 1.8.3v. If not i will definitely put this task in to the next sprint. 1.9.0v ETA is around middle of october.

Also i have created a ticked for webhooks https://tracker.unimus.net/browse/UN-363 but I need to talk with my colleagues to properly design it and find a time to implement it so no ETA atm, sorry.

Re: Config differences API/Webhook

Posted: Sat Oct 06, 2018 12:54 pm
by sbrconsulting
Thank you for scheduling this. Looking forward to being able to use it.

Re: Config differences API/Webhook

Posted: Mon Nov 12, 2018 10:55 am
by Tomas
API endpoints for diffs are now available starting with 1.9.0 Beta1 and going forward:
viewtopic.php?p=1705#p1705

API documentation was also updated with the new endpoints and examples:
https://wiki.unimus.net/display/UNPUB/F ... ation-Diff

I am just the messenger here, all credit for development goes to @Sachtilah :)