Skip to content
Guides & References

Automate a file feed into rConfig

Keep rConfig in step with a device list another system exports as a file: a scheduled script and the REST API, as there is no built-in automated importer.

Inventory & MigrationUpdated
On this page

Automate a file feed into rConfig

Plenty of systems can export a device list on a schedule (a CMDB report, an IPAM export, a spreadsheet the network team maintains) but have no Device Sync driver. To keep rConfig following that list, run a small script on a schedule that reads the file and makes the changes through the REST API.


If this is you

  • Another system owns the device list and can export it as a file on a timer.
  • That system isn’t one of the platforms Device Sync supports, or you only have access to its exports, not its API.
  • You want rConfig to follow the file: new devices added, changed ones updated, removed ones taken out of service.

Start from the API & Developer recipe that does exactly this. It reads a CSV export, compares it with rConfig, then:

  • creates devices that are in the file but not in rConfig;
  • updates devices whose IP address or model has changed;
  • disables devices it created that have left the file. It never deletes, so their configuration history is kept.

It only ever disables devices carrying its own tag, so devices added by hand or by Device Sync are never touched. It runs as a dry run until you add --apply.

Uplink guideSync rConfig devices from your own source of truthA recipe that keeps rConfig's device list in step with a CMDB export or in-house inventory: create, update and disable devices through the REST API.Read the guide

Decisions to make first

  • Who owns which devices: give the feed its own tag, and never let it change devices it didn’t create.
  • Remove or disable: disabling keeps a device’s history and is easy to undo. Deleting loses the history. Keep the recipe’s disable behaviour unless you have a reason not to.
  • Where it runs and how often: the script needs network access to rConfig and a token with devices.read and devices.write. Run it from a service account on a scheduler you already monitor, as often as the export changes.
  • Defaults for new devices: the file usually carries only a name, address and model. Decide the template, command group, credential set and tags the script gives every new device.

How to know it worked

The dry run prints the plan (creates, updates, disables) before anything changes. After an applied run, the new devices appear with the feed’s tag and back up, because a device created through the API queues a first backup straight away. Compare the device count for the feed’s tag with the number of rows in the file.


Type to search.