I've been issuing SQL statements against Confluence Database to add likes to blog/page. But I just saw "Confluence Like REST API" on Confluence Administration page, Add-on section. Does it mean that there's a REST API to add likes? I searched online but there's no result relating to that. Anyone know, if that's possible?
It's a private method, but it's certainly possible. You can see it if you monitor your traffic (when clicking the like button) and/or use the REST API Browser. It is:
and you can do either a GET (to see likes), POST (to like), and DELETE (to unlike). The limitation is that the like is applied to the currently logged-in user, so you can't like a page for someone else. To do that, you would have to use a server method or modify the database.
It maybe a better option even though I still need to update the database. Because, right now, I need to generate id for every like I insert(I just increment the largest id by one) and it kind of scares me. With REST approach, I don't need to generate id. I just need to update the username and creationdate. That said, you mentioned server method and I'm not familiar with that. How do I access those methods? Our Confluence is hosted on Cloud by the way.
I don't think the REST interface handles like yet. The basics are at https://docs.atlassian.com/atlassian-confluence/REST/latest/ and doesn't mention it.
(I am mildly intrigued by your SQL though - how do you handle the cache clearing and reindexing after running the SQL?)
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...
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!
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