Configuring exportersWhen third-party tools and scripts require configuration data and settings, often they only require a subset of the full data set and/or a specific structure of configuration data. And different tools require data from the same data set, but with different granularity, structure or format. That is where exporters are coming into the picture. Exporters allow obtaining a subset of the snapshot content based upon a configurable logic. That logic is defined in a javascript snippet that is executed whenever another toolset requests data for a given config data set. When using the exporter the requester can send additional arguments along which are available in the exporter logic as an array of arguments (variable "args"). Input Config data set The parser logic is applied to the content of the selected config data set. Note that in the exporter editor this is the current active stored snapshot and not the pending data. Arguments When calling the parserLogic the requester can send additional arguments along. Those are available in the parserLogic as an array of arguments (variable "args"). Using the input field for the user's custom variables input it is possible to test run the logic for a specific set of arguments and see the results immediately in the export preview after clicking the "play" button. !! When entering an argument value, make sure to press enter so that the argument value appears as a green text block. Otherwise, the argument is not picked up by the editor. The values entered are for test purposes only and will not be used at run time. Logic The supported logic is javascript. The editor provides basic javaScript syntax checking. Output The output is the result of the logic and can be provided on JSON, YAML, XML, and CSV (depending on the formatting during the logic). It is best practice to apply proper error handling. The parserLogic execution will automatically stop long-running javaScript processes (30 seconds). Draft and published Every exporter parser logic has 2 "versions": a "draft / editing" version and a "published version". Users can save a "work in progress" logic and return to it later. If there is a draft version, then this is automatically loaded when the user enters into the parser configuration screen. The published version of the exporter parser logic. This is the logic that is applied to the snapshot of the config data when it is requested through the API (not yet publicly available this moment) There is no history of published parser logics. When a parser logic gets published, it "overwrites" the current published parser logic and any new requests are immediately executed with the new published parser logic.