[Implemented] Config differences API/Webhook

Share your Config Push presets or discuss automation in general
Post Reply
sbrconsulting
Posts: 19
Joined: Tue Aug 07, 2018 5:20 pm

Wed Aug 22, 2018 12:33 pm

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
Sachtilah
Posts: 4
Joined: Wed Oct 05, 2016 4:11 pm

Thu Aug 30, 2018 1:57 pm

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.
sbrconsulting
Posts: 19
Joined: Tue Aug 07, 2018 5:20 pm

Sat Oct 06, 2018 12:54 pm

Thank you for scheduling this. Looking forward to being able to use it.
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Mon Nov 12, 2018 10:55 am

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 :)
Post Reply