Is there a way to use the API to export all PropertySources (like you can with DataSources)?
I'd like to take an occasional backup of all the PropertySources so we can track changes and be able to fail back easily.
Is there a way to do this via the API today?
Similar to this - https://www.logicmonitor.com/support/rest-api-developers-guide/v1/datasources/export-datasources-to-xml
Export All Datasources to XML
HTTP Method:GET
URI: /setting/datasources?format=xml
(I believe I already know the answer)
Yes, they can be exported, but not AFAIK as XML. We use a script to backup (and track via git) pretty much everything in LM including those. Our script also has a check mode to validate various endpoints that otherwise fail silently (like busted widgets) and tend to otherwise show up in embarrassing situations, like review meetings with clients.
This is the profile we use to get propertysources:
"/setting/propertyrules" => { file => "propertysources", saveoptions => { mode => "oneperfile", format => "dumper" }, },
It might be an undocumented endpoint, not recalling at the moment :).
Mark