Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to include a category or parent/ancestor to blogpost in confluence via API ?

Shaurya Chawla November 29, 2018

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?

1 answer

1 accepted

0 votes
Answer accepted
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 5, 2018

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!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events