I am developing a Confluence Data Center app and I need to persist some data. I would rather not have to create my own REST API to store a couple values so I went looking through the built-in REST endpoints and found these endpoints.
/rest/api/content/{id}/property
/rest/api/content/{id}/property/{key}
/rest/api/space/{spaceKey}/property
/rest/api/space/{spaceKey}/property/{key}
These look like they would do what I want except that the first two are scoped to a content id and the last two are scoped to a space. Unfortunately, since content id's and spaces are variable between systems that won't work as I would not programmatically know which content id or space to go to to look up the stored properties. Does anyone know if there is a REST endpoint that I am just not finding or maybe is undocumented that is globally scoped so that I wouldn't need to know a content id or space key before I can look up the value?
I could probably get a list of the spaces and then loop through them and try them against the /rest/api/space/{spaceKey}/property to see if the data I want to store exists in that space till I find the correct space but that is a terrible solution and honestly would make my soul weep. It seems like I may have to make my own REST endpoint in the end but I figured I would throw this question out there just in case.
@Davin Studer What you look for is called app properties and they do exist on Cloud. As far as I remember they never existed on Data Center.
If I were you, I'd create my own REST API (quite easy, as app can define their end-point) and save values using ActiveObjects (quite easy, too).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.