Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Where does Confluence store page and comment likes?

ITops123
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 12, 2013

I'd like to query them and don't know where to look.

3 answers

1 accepted

3 votes
Answer accepted
Immanuel Siagian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 12, 2013

Hey there,

The likes are stored on the table called likes.

As for pages and comments, there're stored on two different tables, content and bodycontent. The content table stores the overall info of changes, such who made it, time, version, and etc. The actual content is stored on the table bodycontent.

You can use these query to search for them:

SELECT * FROM bodycontent WHERE contentid IN (SELECT contentid FROM content WHERE contenttype = 'COMMENT');

SELECT * FROM bodycontent WHERE contentid IN (SELECT contentid FROM content WHERE contenttype = 'PAGE');

Hope this helps :)

0 votes
Scott Brown December 9, 2013

Can I write directly to the bodycontent table (I want to add text to the body field).

Daniel Wester
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 9, 2013

As a general rule - don't write to the database directly(unless you want to have a world of hurt - or you have the app down).

Confluence (and the other Atlassian apps) usually have some type of app cache going (and they may change the data scheme on you). Rest api usage is the safest route.

0 votes
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 13, 2013

In addition to Immanuel's answer, there's also a REST API for getting and adding Likes. See my answer here: https://answers.atlassian.com/questions/108634/is-there-a-way-to-like-a-page-or-blog-entry-from-the-json-rpc-api/116072

Depending on your situation, it might be easier for you to use this, rather than querying the database directly.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events