This facility can be used to export and import various aspects of your Mango configuration. This ability provides several benefits:
You can choose to export your entire configuration by checking each of the options within Select what you would like to export. Or, you can choose to only export portions as required. The result of the export operation will be displayed in the Data text area, from which you can copy and paste elsewhere, or make direct changes.
Similar to how users can select what to export, you may also choose to import only a small portion of your entire configuration. For the most part any information that is excluded from your import file will remain unchanged. For example, if your import data does not include the "eventDetectors" attribute within a data point, that point's event detectors list will remain unchanged. However, if the attribute is included the list will be replaced with the contents of the attribute.
In general, any Mango object that has a unique identifier is capable of being created and updated—but not deleted. Such objects that are supported by this facility will have and Export Id, or XID. This attribute is specifically designated to provide unique indentification of objects between Mango instances. This is similar to a database-generated primary key, but primary keys cannot be made to match over multiple Mango instances. When an object—such as a data source—is created using the Mango interface it is automatically given an instance-unique XID. Although it cannot be guaranteed to be unique across all of your Mango instances, there is a high probability that it will be. You may change the XID to any 50 character value you like as long as the value is still unique for that object type within the instance.
Imports may fail for multiple reasons:
The import/export facility uses the JSON format (see http://www.json.org/ for more information) as the data format for configuration files. JSON is a very simlar data format that is easy to understand and use. (For users familiar with Javascript JSON will be immediately familiar.) JSON was chosen over the more common XML format because it provides better mapping to the actual Mango object structure, and is also more compact.
Mango will automatically create "pretty" JSON export files, i.e. it will format the output with appropriate line breaks and indenting. The amount of indenting can be controlled with the Indent level attribute.