Javier
4 years agoNeophyte
Unable to get eventsources list using REST API
I am trying to get eventsources information using REST API, as documented here.
I am using a small python script to try to get any results, but can only get this output:
('Response Status:', 406) ('Response Body:', '<!doctype html><html lang="en"><head><title>HTTP Status 406 \xe2\x80\x93 Not Acceptable</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 406 \xe2\x80\x93 Not Acceptable</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Not Acceptable</p><p><b>Description</b> The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.</p><hr class="line" /><h3>LogicMonitor Technical Operations</h3></body></html>')
Did anybody get this type of call working anytime?
Apart from this, I would like to add new eventsources using the REST API. It looks like there is only an import method to get this, using a XML file.
Are there any examples or templates of that XML file?
Thanks and regards.