Confluence API of Page Properties Macro

It's possible get the properties added in Page Properties Macro of a Page via REST API?

 

Thanks!.

 

 

2 answers

This widget could not be displayed.
Davin Studer Community Champion Sep 18, 2014

You could, but I think you will have to parse the page and insert it that way.

This widget could not be displayed.

Hi Sergio, you may want to check this doc to see if it's what you're trying to achieve. I've added a custom property using the example JSON and it worked:

$ curl -D- -u admin:admin -X POST --data "{\"key\":\"example-property-key\",\"value\":{\"anything\":\"goes\"},\"content\":{\"id\":\"360456\",\"type\":\"page\",\"_links\":{\"self\":\"http://192.168.10.224:8561/rest/api/content/360456\"},\"_expandable\":{\"body\":\"\",\"container\":\"\",\"ancestors\":\"\",\"children\":\"\",\"descendants\":\"\",\"metadata\":\"\"}},\"version\":{\"number\":2,\"minorEdit\":false},\"_links\":{\"base\":\"http://192.168.10.224:8561\",\"context\":\"\",\"self\":\"http://192.168.10.224:8561/rest/api/content/360456/property/example-property-key\"}}" -H "Content-Type: application/json" http://192.168.10.224:8561/rest/api/content/360456/property
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-ASEN: SEN-L3897800
Set-Cookie: JSESSIONID=CF1289EE83FD4FBD3772C34DEB65CB9D; Path=/; HttpOnly
X-Seraph-LoginReason: OK
X-AUSERNAME: admin
X-Content-Type-Options: nosniff
Content-Type: application/json
Transfer-Encoding: chunked
Date: Tue, 09 Sep 2014 14:04:24 GMT

{"id":"360457","key":"example-property-key","value":{"anything":"goes"},"version":{"when":"2014-09-09T11:04:24.136-0300","message":"","number":1,"minorEdit":false},"_links":{"base":"http://192.168.10.224:8561","context":"","self":"http://192.168.10.224:8561/rest/api/content/360456/property/example-property-key"},"_expandable":{"content":"/rest/api/content/360456"}}

Cheers

Davin Studer Community Champion Sep 18, 2014

He is referring the page properties macro, not content properties.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

468 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you