Currently POSTing the stuff to confluence blog using REST API(type:blogpost); creates new page and posts it by default under 2018. How can I have API json body include an ancestor or parent category instead of 2018 or under 2018 itself for categorizing the pages that will be posted?
Hello there Shaurya!
Currently, Confluence does not have a feature that allows blogposts to be categorized in such fashion, with or without REST.
We can, however, use labels in blogposts to categorize them right after creation, with another call to REST. An example of such call is this:
curl -u username:password -X POST -H "Content-Type: application/json" -d '{"prefix": "global", "name": "abc"}' "https://myconfluence/rest/api/content/9999999999/label"
In this thread here, we have a customer who was able to implement the label via REST. The thread get to this at February 19:
Add Lavel With REST API
Also, you can take a look into our REST documentation for more insights on this:
Confluence Server REST API examples
While there is no native method to create categories for blogposts, a third-party add-on may be able to help you out. Just keep in mind that this plugin may not work with REST:
Lively Blogs for Confluence
Let the community know your thoughts!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.