Is there a built-in globally scoped REST storage mechanism?

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2024

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.

1 answer

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 22, 2024

@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).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events