Import document/database variables via JSON

This feature has been implemented in version 2026.1.11.3
Resolved Implemented

Import document/database variables via JSON

0 vote

avatar

Hello,

I have a powershell script that will read an Excel workbook and then outputs a JSON with all the appropriate connections i need (SSH, Web, Credentials, Folders, etc) for importing into RDM. It works great. In my use case each JSON document is a SQLlite database 1:1. Each database is a customer's worth of servers/credentials/etc.

I would like to add importing of document variables. This could change between JSON imports/customers. So it has to be document based, not application based. I have it working manually--I have $<VARIABLENAME>$ in the connection string and it imports fine. I then manually create the variable and it works.

But I cant figure out how to import a variable. I've tried to reverse engineer it and export the document with the variable to JSON, but it doesnt seem to export either.

Am i missing something or is this not possible?

FYI: I'm importing on both Mac and Windows, but the variable is mostly for use on Mac. I am using IPv6LL addresses and on Mac it requires appending the "%enX" number for for your ethernet adapter. (Windows seems to manage with just the IPv6LL address). The enX changes depending on which USB adapter i use. Sometimes it's en8, en10, en14, etc. So a variable with this would be great. (i'm not sure if MacOS permanently assigns the same enX to USB adapter everytime you use it)

The connection string i create in the JSON is like this:

fe80::1234:56ff:fe78:9ABC%en10

I would like to create

fe80::1234:56ff:fe78:9ABC$INTERFACENAME$

And then import a variable $INTERFACENAME$ as "%enX" as part of the JSON. Then i can change it in one place across the whole document.

Thank you!

All Comments (22)

avatar

Hello,

Would it be possible to provide us with the PowerShell script and a sample Excel file so we can test it on our end? If you prefer, you can send them to service@devolutions.net.

Best regards,

Richard Boisvert

avatar

No. This is just part of a much much much bigger script. And I don't see how or why it's relevant.

The question is not about PowerShell. The question is what is the syntax for importing document level variables via JSON regardless of how that JSON is derived.

Do you support importing variables as part of the JSON import?

I don't see them when I manually create them in a database and then export that to JSON.

avatar

Hello,

Could you confirm where the variable is located in the document entry? Is it in the path when using the a "link to file"? I did a quick test and if there is a variable at that level, it does not seem to be supported.

Best regards,

Richard Boisvert

avatar

I'm not sure I understand your question.

Here is what I'm looking for. Maybe asking it the wrong way. Not in front of a computer to add screen shots. Sorry.

  1. Create new sqllite database

  2. Create at least one object. Anything. Folder ssh rdp etc

  3. Right click on top level folder and go to properties. Then variables bottom left of dialog box.

  4. Add and define variable. This variable should be able to be used by any object in the document.

This is the variable I'm talking about. How do I import a variable (along with all the ssh objects created by my script) into a blank database?

If it's not possible, can you make a feature request for it?

Can we import variables attached to lower level folders?

avatar

Hello,

The custom variables cannot be exported or imported at this time. I have moved your request to the feature request section of the forum.

Best regards,

Richard Boisvert

avatar

Ok. Thank you for the assistance and checking on that.

avatar

Hello,

I have discussed your query with our engineering team, and currently, there are no plans to allow the direct import of custom variables from a file. However, our PowerShell team will explore the possibility of adding this feature to the Devolutions.PowerShell module. I have created a feature request on your behalf, and we will keep you updated on its progress.

Best regards,

Richard Boisvert

avatar

Ok. Thank you for the follow up.

I know of the powershell module, but it doesnt suit my purpose. I am creating the JSON and frequently have to send it to someone else (customer, etc) when we are working remotely with the customer. I tell him to download RDM from your site and i send the JSON to them via email or thru our zoom meeting. I realize this is an edge case and not the typical use case.

In my case, i can just manually create the variable in the database once the JSON is imported, and the pre-defined values will just pick it up. Not a big deal. Was hoping there was a way to be more automated.

Thank you for your help!

avatar

Hello! Is there any update to this? Is it possible to import variables via JSON? Using the powershell module could be an option, but it would be easier for me to add the creation of the variables into the JSON and import the variable with the JSON. Thank you!

avatar

Hello,

I want to confirm with you, are you talking about the custom variables configurable in either File > Settings, at the Vault level, or at the System Settings level?

This is what it looks like for the ones in File > Settings:

If that is the case then we could add an import/export feature to these lists in JSON.

Regards,

Hubert Mireault

This feature has been implemented in version 2026.1.11.3