I'm trying to use the REST API to add users to the watch lists of a space's blog page (for example: https://confluence.com/pages/viewrecentblogposts.action?key=XYZ), so the equivalent of pressing this 'Watch this Blog' button on the blog page: Using the API to get the content ID of any page or blog post is super easy but for the life of me I can't seem to find a way to get the contentID of the page where all the blog posts for a space are listed. Frustratingly this also seems to be the only page without a 'Page Information' tab either.
If such a blog page doesn't have an contentID then how could I replicate the process of going to an individual blogpost and selecting the 'Watch for new blogs in this space' option when clicking the 'Watch' button of a blogpost: This also allows the user to watch the space's blog page instead of just the individual blog post.
Dear @Sam Joynson ,
welcome to the community.
Have you tried this already?
https://myhost/rest/api/content?type=blogpost&spaceKey=SPACE&expand=body.view
So long
Thomas
@Thomas Deiler it's worked! Thank you!)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I suspect the page you are referring to in "...get the contentID of the page where all the blog posts for a space are listed..." is not a page!
I mean, yes, it is a web page, but it is not a Confluence page. It is generated by the system for each space, there's no contentID for it because it's not content, it's structural! That's also why it has no page information - it's not a confluence page!
I don't think it's possible to set the "watch all blogs in this space" via the REST API. Closest you might get is probably to ask for all the blogs in the space, iterate over the result and add the flag manually, and have to repeat that regularly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.