20,919,685Total Points24,106Total Sites23,382Cell Towers69,500Racks Monitored56,753HVAC Units Monitored31,322UPS Units Monitored24,788Generators Monitored20,919,685Total Points24,106Total Sites23,382Cell Towers69,500Racks Monitored56,753HVAC Units Monitored31,322UPS Units Monitored24,788Generators Monitored20,919,685Total Points24,106Total Sites23,382Cell Towers69,500Racks Monitored56,753HVAC Units Monitored31,322UPS Units Monitored24,788Generators Monitored

Chapter 3: Data Sources & ProtocolsLesson 20 of 65

Bulk Importing and Editing Data Points

Mass-configure data points with the Bulk data point edit CSV tools, the Data points and related data extended export, Configuration import/export JSON, and the REST bulk endpoints - with the real column paths, action values and request shapes.

  • 15 min read
  • Intermediate
  • Mango 4.x / 5.x

Overview

When deploying Mango by Radix IoT at scale, manually creating data points one at a time is not practical. A building automation system might need hundreds of Modbus registers, a BACnet installation could have thousands of objects, and an enterprise deployment may span dozens of data sources. Mango provides CSV and JSON import/export tools that let you create, modify, and manage large numbers of data points efficiently using spreadsheet software or scripts.

Tip

Need to clone an entire device? If you have a fully configured data source and want to duplicate it for an identical device (same model, different IP), see Duplicate a Device Using JSON Export and Import for a faster workflow.

Prerequisites

  • Mango 4.x or 5.x
  • Superadmin — Bulk data point edit and Configuration import/export are both superadmin-only pages. The REST data point endpoints instead check permission on the points involved
  • A spreadsheet application (Excel, LibreOffice Calc, Google Sheets) for CSV editing
  • Familiarity with your data source type and its point configuration fields

Step 1: Open the Bulk Data Point Edit Page

Go to Data integration > Bulk data point edit.

The page opens with a point browser on the left and an empty table on the right. Nothing loads until you select something in that browser — a watch list, a data source, or a device. The CSV controls change depending on what you pick, so make this selection first.

Both CSV controls are icon buttons in the table toolbar, and each one opens a menu rather than acting immediately:

Control Icon Menu items
Download CSV download Data points and related data, Data points, Event detectors
Upload CSV upload Data points and related data, Data points, Event detectors

Note

Data points and related data is the “extended” export — it carries the data-source-specific point locator fields plus event detectors and published points. It only appears in the Download menu once a watch list or data source is selected, and it only appears in the Upload menu when your selection is not a watch list (select a data source or device instead). If you open the page and see only Data points and Event detectors, that is why.

Step 2: Export Existing Points as CSV

Start by downloading the current configuration as a template:

  1. Select the data source or watch list whose points you want in the point browser
  2. Optionally filter by tags or point name to narrow the export
  3. Click the Download CSV icon and choose Data points
  4. Save the file (e.g., data-points-export.csv)

Tip

Even if you are creating brand-new points, export a few existing points first. This gives you a correctly formatted template with all the required column headers.

Step 3: Understand the CSV Format

The CSV is a flattened view of Mango’s data point REST model. Nested objects become slash-separated column headers — loggingProperties/loggingType, not loggingType. Two columns sit outside the point model itself:

Column Description Example
action What to do with this row — see below UPDATE
originalXid Lookup key: the XID of the existing point this row refers to DP_TEMP_001

Everything else is a field of the point:

Column Description Example
xid The XID to write. For new points, the new unique ID; for renames, the new XID DP_TEMP_001
name Display name of the point Zone Temperature
deviceName Logical device grouping Building A - Floor 1
enabled Whether the point is active true or false
dataSourceXid The data source the point belongs to DS_MODBUS_01
loggingProperties/loggingType How values are logged ON_CHANGE
loggingProperties/intervalLoggingPeriod/periods Logging interval value 1
loggingProperties/intervalLoggingPeriod/periodType Logging interval unit MINUTES
loggingProperties/tolerance Deadband before a change is logged 0.5
purgeOverride Whether this point overrides the data source purge settings true
purgePeriod/periods How long to retain data 6
purgePeriod/periodType Purge period unit MONTHS
unit Engineering unit °F or kW
tags/<key> One column per tag key tags/site, tags/floor
pointLocator/... Data-source-specific fields — see Step 6 pointLocator/offset

loggingProperties/loggingType accepts six values, not four:

Value Meaning
ON_CHANGE When point value changes
ALL All data
NONE Do not log
INTERVAL Interval
ON_TS_CHANGE When point timestamp changes
ON_CHANGE_INTERVAL Interval and point value changes

Both periodType columns accept MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS.

Special cell values

Mango’s CSV reader treats a few cell values as literals rather than text:

Cell value Meaning
(blank) No change — the column is ignored for this row
NULL Set the field to null
EMPTY Set the field to an empty string
TRUE / FALSE Boolean
OBJECT / ARRAY An empty object or array

Warning

A blank cell is skipped, not applied. You cannot clear a field by emptying its cell — write NULL instead. This matters most for tags: blanking a tags/site cell leaves the existing tag untouched.

The Action Column

The action column controls what happens to each row. It takes four values:

Action Behavior
CREATE Create the point. Fails if the XID already exists.
UPDATE Update the existing point identified by originalXid. Fails if it does not exist.
DELETE Delete the data point matching this XID.
GET Read the point without changing it.

Danger

A blank action cell means UPDATE, not “create or update”. Mango does not decide for you based on the XID. If you add new rows and leave action empty, every one of them is attempted as an update against a point that does not exist, and every one fails. New rows must say CREATE.

Danger

Using the DELETE action permanently removes the data point and all its historical data. There is no undo. Always back up before performing bulk deletes.

Step 4: Modify or Create Points in the Spreadsheet

Adding New Points

  1. Copy an existing row as a template
  2. Change the xid to a new unique value (e.g., DP_TEMP_002)
  3. Clear the originalXid cell — there is no existing point to look up
  4. Set the action column to CREATE. This is required, not optional; a blank action is treated as UPDATE and the row will fail
  5. Update the name, deviceName, and other fields as needed
  6. Repeat for each new point

Bulk Editing Existing Points

To change a property across many points at once:

  1. Export the points you want to modify
  2. Use spreadsheet features (find-and-replace, formulas, fill-down) to make changes
  3. For example, to change all logging types from ALL to ON_CHANGE, filter the loggingProperties/loggingType column and replace
  4. Leave action blank or set it to UPDATE — both mean update
  5. Save the CSV

Warning

Exported CSVs include both originalXid and xid. Mango uses originalXid to find the existing point and xid as the identifier to save; if originalXid is absent it falls back to the row’s xid. If you change xid without understanding this, you rename points instead of updating them in place. To edit properties without renaming, keep xid equal to originalXid (or only edit other columns).

Bulk Editing Tags

Tags are key-value pairs used for organizing and querying data points. In the CSV:

  • Each tag key is its own column, written as tags/<key> — for example tags/site, tags/floor, tags/equipment
  • Add a new tag by adding a header like tags/building and filling in values
  • To clear a tag, write NULL in the cell. Leaving it blank changes nothing.

Step 5: Import the CSV

  1. With your selection still made in the point browser, click the Upload CSV icon
  2. Choose Data points
  3. Select your modified CSV file

Mango uploads the file and runs the whole batch immediately, then reports the outcome per row:

  • CREATE / UPDATE: the action Mango took for that row
  • Errors: rows that failed, with the reason (XID not found, validation failure, missing required fields)

Review the report and fix any errors, then re-upload just the corrected rows.

Warning

There is no preview step and no separate confirmation — the upload is the commit. Check the file before you upload it, not after.

Warning

Large imports (1000+ points) may take several minutes. The import runs as a background task on the server, so the work continues even if the page is closed, but you will lose the per-row result report.

The plain Data points export covers the point model. The Data points and related data export additionally carries:

  • the data-source-specific point locator fields, as pointLocator/... columns
  • event detectors attached to each point
  • published points, where configured

Use it when you need to bulk-edit protocol addressing:

  1. Select a data source or device in the point browser — not a watch list, or the matching Upload option will be hidden
  2. Click Download CSV and choose Data points and related data
  3. Edit the pointLocator/... columns in your spreadsheet
  4. Upload with Upload CSV > Data points and related data

Locator column names come from the data source type. For example:

  • Modbus: pointLocator/range, pointLocator/offset, pointLocator/modbusDataType, pointLocator/slaveId, pointLocator/registerCount
  • BACnet: the BACnet locator’s object type, instance number, and property identifier fields
  • SQL: the configured table and field names

Note

The Modbus register range field is called range, not registerRange. Its values are COIL_STATUS, INPUT_STATUS, INPUT_REGISTER, and HOLDING_REGISTER.

Warning

The extended upload requires the event-detector columns to be present. Always start from an extended download rather than hand-building the file, or the upload is rejected for missing detectors.

Step 7: JSON Configuration Import/Export

For whole-configuration work, Mango has a single Configuration import/export page. Its menu item is under Data integration, and the same page has a button on the Utilities card of Administration > Admin home. Unlike the CSV tools, it covers every configuration element — data sources, data points, event handlers, users, mailing lists — not just points.

Export as JSON

  1. Go to Data integration > Configuration import/export
  2. Tick the object types to export (data sources, data points — which carry their event detectors — event handlers, and so on), or Select all
  3. Click Export. The JSON document appears in the editor
  4. Click Download JSON file to save it

Import from JSON

  1. Go to the same Configuration import/export page
  2. Paste or upload the JSON configuration
  3. Click Import
  4. Review the results summary

Note

Configuration import/export requires the superadmin role. Data-source-edit permission is not enough — every json-emport API mapping checks isAdmin(), which means superadmin.

The JSON format uses flat property names, which are not the same as the CSV column paths. In JSON a point’s logging type is loggingType; in CSV it is loggingProperties/loggingType.

Example JSON Data Point

{
  "dataPoints": [
    {
      "xid": "DP_ZONE_TEMP_101",
      "name": "Zone 101 Temperature",
      "enabled": true,
      "loggingType": "ON_CHANGE",
      "tolerance": 0.5,
      "purgeType": "MONTHS",
      "purgePeriod": 12,
      "unit": "°F",
      "dataSourceXid": "DS_MODBUS_01",
      "pointLocator": {
        "offset": 100,
        "modbusDataType": "TWO_BYTE_INT_SIGNED",
        "range": "HOLDING_REGISTER"
      },
      "tags": {
        "site": "Building A",
        "floor": "1",
        "zone": "101"
      }
    }
  ]
}

Step 8: REST API Bulk Operations

For automated or CI/CD workflows, use the Mango REST API to perform bulk operations programmatically.

Export and re-import a configuration

Use the json-emport endpoint for both halves of the round trip. The data point query endpoint returns a paged query result, not a configuration document, so it cannot be fed back into an import.

GET /json-emport requires an exportElements parameter naming what to include — a bare GET is rejected. GET /json-emport/list returns the available element names.

# Export the data sources and data points
curl -X GET "https://mango-server:8443/rest/latest/json-emport?exportElements=dataSources&exportElements=dataPoints" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json" > config.json

# Import the modified configuration
curl -X POST "https://mango-server:8443/rest/latest/json-emport" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d @config.json

The element names double as the JSON document’s top-level keys, which is why an exported document opens with dataSources and dataPoints arrays. Other values include users, eventHandlers, eventDetectors, mailingLists, publishers, publishedPoints, jsonData, systemSettings, roles, and permissions.

Bulk Create/Update via CSV

The same CSV the UI uploads can be posted directly. Send it as text/csv:

curl -X POST "https://mango-server:8443/rest/latest/data-points/bulk" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: text/csv" \
  --data-binary @data-points-export.csv

Bulk Tag Update

The bulk endpoints take an action, a shared body, and a requests array — one entry per point:

curl -X POST "https://mango-server:8443/rest/latest/data-point-tags/bulk-sync" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "MERGE",
    "body": {"region": "Northeast"},
    "requests": [
      {"xid": "DP_TEMP_001"},
      {"xid": "DP_TEMP_002"},
      {"xid": "DP_TEMP_003"}
    ]
  }'

action accepts GET, SET, MERGE, or UPDATE (a synonym for MERGE). MERGE adds and overwrites the listed tags and leaves other tags alone; SET replaces the point’s whole tag set.

Note

/bulk-sync completes before responding. The /bulk variant returns 202 with a temporary resource id that you then poll at GET /rest/latest/data-point-tags/bulk/{id} — use it for batches large enough to time out a synchronous call. The data point endpoints follow the same pattern.

Verification

Confirm your bulk import was successful:

  • Import report shows the expected number of created/updated points
  • No error rows in the import results
  • New data points appear in the data source and on watch lists
  • Point properties (names, tags, units, logging) match your spreadsheet
  • Data sources are polling and new points are receiving values
  • Tags are searchable and correct in the tag manager

Troubleshooting

New rows fail with “not found” or nothing is created
The action cell is blank, which Mango reads as UPDATE. Set action to CREATE on every new row.

“XID already exists” errors on import
The row is marked CREATE but the XID is already in use. Either change the xid, or switch the row to UPDATE and put the existing XID in originalXid.

A column I edited had no effect
The cell was blank, and blank means “no change”. Write NULL to clear a field, or EMPTY for an empty string.

Tags will not clear
Same cause. Blanking a tags/<key> cell leaves the tag as it was; write NULL.

CSV encoding issues (garbled characters)
Save the CSV as UTF-8 in your spreadsheet application. Special characters in point names or units — degree signs especially — corrupt if the wrong encoding is used.

Missing columns after editing in Excel
Excel sometimes drops empty columns on save. Verify all required column headers are present before uploading. Re-export a fresh template if needed.

Import succeeds but points have wrong data types
The data type comes from the point locator, not a CSV column of its own. Correct it in the pointLocator/... columns of an extended export, or delete and recreate the point.

REST API returns 403 Forbidden
Check which endpoint you called. The data point and tag endpoints need read/edit permission on the points involved; json-emport needs the superadmin role. Also confirm the bearer token is valid and not expired.

A spreadsheet added an unnamed first column
Delete it before uploading. Mango’s own export never writes an unnamed column, but spreadsheets sometimes add a row-number column on save. A column with a missing header is ignored harmlessly, but a column with an empty header and a value in it makes Mango read the whole row as that single value and discard the rest of the row, so the row fails.

Get free access to all 65 Mango by Radix IoT training lessons

One short form unlocks every lesson and its video in this browser.

This form is hosted by Zoho. It loads only after you enable support cookies or choose to load it below.

We honored your browser’s Global Privacy Control signal — optional cookies are off and nothing is tracked.