[ZBXNEXT-4104] Create API method for retrieving template XML (e.g. template.export) Created: 2017 Sep 14  Updated: 2019 Feb 21

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: API (A)
Affects Version/s: 3.2.6, 3.2.7, 3.2.8
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: Charles Inglese Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The user-facing front-end employs a templates.php page to support exporting a Zabbix template in XML format, however, the JSON RPC API does not offer the equivalent functionality. It would be tremendously helpful if a template.export in JSON RPC API (api_jsonrpc.php) method were added which performed the same logic and returned a deserialized object.

When using configuration management frameworks such as Puppet or Chef, it is important to be aware of state, and currently, there is no good way of returning the source XML object that was ingested into Zabbix (e.g. via configuration.import or WebUI), as configuration.export does not return the same XML representation as what was ingested.



 Comments   
Comment by Charles Inglese [ 2017 Sep 14 ]

Reference: https://www.zabbix.com/documentation/3.2/manual/xml_export_import

Comment by richlv [ 2019 Feb 21 ]

The configuration.export method supports a format parameter at least since Zabbix 2.0, and this parameter allows to choose between XML and JSON (this is also the easiest way to obtain templates in JSON format that Ansible needs).

Could you please clarify what is the concern here?

Generated at Fri Apr 19 02:31:09 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.