Creating/Getting Config Values

I’m trying to figure out how to set values in a server configuration file and use these files serverside.

For example, I want to store values encrypted in a table but don’t want to hard-code the encryption password with the action step. I want to be able to store the encryption password in a file (i.e. a .ini file, then grab the encryption password from there when it’s used.

I’ve figured out how to set a global server value, but haven’t figured out how to use that value in a different file. There doesn’t seem to be an option on the server connect side to create server side includes. Basically I just want to be able to set multiple key value pairs, then return the value based on the key provided.

I don’t want to store this in a database.

Thanks!

Although you could do it by reading and writing files in server connect, we are planning soon to add global variables for server connect as configuration options that might be perfect for such case.

1 Like

Do you have a timeframe when that’s going to be released?

What I ended up doing for now was creating an app connect service with a condition based on the key name. If the key name matches, then I return the text value as a status 200 response. Not sure if there’s a better way to do this in the interim.

I had looked at reading/writing files in server connect but couldn’t find a good resource on how to do this. I found how to load a file but couldn’t figure out how to access values.

Here was the solution I came up with:
Creating the api:

Then accessing the API:
https://{{$_SERVER[HTTP_HOST’]}}/dmxConnect/api/config/config_get.php