What Is the XID?
The XID (Export ID) is a system-wide unique identifier assigned to every configurable object in Mango — data sources, data points, event detectors, users, JSON store entries, and more.
Why XIDs exist
Every object in Mango also has a numeric database ID that is specific to that installation. If you export a data source from one Mango instance and import it into another, the database IDs will almost certainly be different. XIDs solve this by providing a stable, portable identifier that works across installations.
| Identifier | Scope | Example | Use case |
|---|---|---|---|
| Database ID | Single installation | 42 | Internal database joins, time-series storage |
| XID | Cross-installation | DS_a1b2c3 | JSON config export/import, REST API, dashboard references |
How they work
- Automatically generated — When you create a new object, Mango assigns a random XID (e.g.,
DP_f7e2a1). - Editable — You can change an XID to something more meaningful (e.g.,
DS_building_a_modbus). This is recommended for objects you plan to export or reference in custom pages. - Must be unique — No two objects of any type can share the same XID within a Mango instance.
- Used in JSON configuration — When exporting or importing configurations (via the JSON import/export tool or the REST API), all cross-references between objects use XIDs, not database IDs.
Practical examples
Dashboard references: When you build a custom dashboard page that displays a specific data point, the page markup references the point by XID. If you export and import that page to another Mango instance that has a point with the same XID, the reference resolves automatically.
Configuration migration: To move a complete setup from a development instance to production:
- Export the configuration as JSON from development
- Import the JSON into production
- Mango matches objects by XID — existing objects are updated, new ones are created
REST API: The REST API uses XIDs to reference objects:
GET /rest/latest/data-points/DP_building_a_temp
Best practices
- Use descriptive XIDs for objects you reference in dashboards or integrations (e.g.,
DS_bacnet_hvac,DP_room_101_temp). - Keep auto-generated XIDs for objects you don't reference directly — the random format prevents accidental collisions.
- Document your XID naming convention if multiple people manage the Mango configuration.
- Never change an XID after other objects or dashboards reference it, unless you update all references.
Related Pages
- What Is a Data Source? — Data sources that XIDs identify
- What Is a Data Point? — Data points that XIDs reference
- REST API Overview — Use XIDs to access resources through the API