Switching from deprecated properties API to new API

Bianca Stadler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 28, 2024

We have some confluence macros which we are currently updating and rewriting. Most of the use the now deprecated properties API (https://developer.atlassian.com/platform/forge/runtime-reference/properties-api/) which we are now changing to use the new API calls instead (https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-content-properties/#api-pages-page-id-properties-get).

The calls to get the properties work just fine, also the POST request to create a single property with a string value is working. However, we also have requests that set multiple properties for a page at once, and those property values are objects, not just strings, and I cannot get this to work with the new API calls..

The old request looks something like this:

 properties.onConfluencePage(contentId).set(key, value)...
where in the value, all of the property objects that need to be set are present, and they are objects. When trying something similar with the new API calls (the POST request to create a property), I get a Bad Request. When I try updating them one by one, I also get Bad Request.
Maybe I am misunderstanding the structure of the new API, and the properties, but I don't quite know what else to try.
Does anybody have a similar problem?

1 answer

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 20, 2024

@Bianca Stadler welcome to the Atlassian community 

Looking at the provided documentation I did not see a way to do what you were asking about. Did you find a way to do it? 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events