Admin setting storage and access

I’m a bit confused about the fact that I can’t find a single example on how to store a value (a text string in my case) from an admin page and how I can retrieve that value in a component (a macro in my case, the string value determines behavior for the macro). I’ve been googling for a while now and can’t find any help anywhere.
I’ve been looking over all API documentation and found some indications in there, but I leaves a lot to desire in understanding how this should be done in practice. So, please, no references to existing API documentation (it is not sufficient!), I need an actual working example on how to do this.

Hi @JonasFrantz,

Are you working with Connect or Forge? Assuming you are on Connect, you have two options to store the string you mentioned:

  • Store it in Confluence via the App Properties API
  • Store it in the database of your backend

The bad thing about App Properties is that they’re not really secure. Long story short: any user can read & write them, so they shouldn’t contain any sensitive information.

So, if the string you want to store is for example some kind of auth token, App Properties probably aren’t built for your use case. Depending on what kind of app you want to build it therefore might make sense to store the value in your own DB or wait for Forge which comes with a more sophisticated and secure storage API.

Hope this helps! If you want more guidance on App Properties or how to store stuff in your own DB, please share more information like the framework and language you’re using so we can help you better. :slight_smile:


1 Like

Yeah, this much I figured, but was somewhat confused when it’s not stated anywhere that app properties is the “only” place to store settings. (Shouldn’t this be spelled out somewhere? I’m probably not the only one wondering about this)
Given the case with security of the storage I’ll probably wait for Forge.

1 Like