The mapping groups are used to match a given NorthboundAlarm with the target Trap Definition.
Because a group may contain hundreds or thousands of definitions, it is a good idea to keep them on a separate files to manipulate them easily.
There are some restrictions about how to build these files:
1. The name of the mapping group should match the name of the XML (without the extension)
2. The file has to be placed on $OPENNMS_HOME/etc/snmptrap-northbounder-mappings.d
That way, when using the ReST API, the content of the main trap sink will ignore the auto-populated mappings that come from the external files, and if you need to alter the mappings, you can use the ReST API for that as well.