Ad Widget

Collapse

API configuration.export does not give the same output as web export

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zbxwoof
    Junior Member
    • Sep 2013
    • 2

    #1

    API configuration.export does not give the same output as web export

    I am working with pyzabbix and found that configuration.export outputs more configuration than the web interface export does. You get ALL triggers and graphs, instead of just the associated triggers and graphs with a host or template.

    Are there parameters that need to be passed to the configuration.export API to get it to pass the same data that the Web interface export would give?

    Andy
  • zbxwoof
    Junior Member
    • Sep 2013
    • 2

    #2
    I figured out my problem. I needed to put a comma for the single tuple defining the options.

    Code:
    xmlout = zapi.configuration.export(format="xml",options={'templates':(h['templateid'],)},)
    Last edited by tchjts1; 06-09-2013, 22:28. Reason: Added code brackets

    Comment

    Working...