Forums

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

How to get records of database by REST API?

Yadav, Rahul [X] August 13, 2024

I am using REST API to get the data stored in table on a page earlier I used this path 

wiki/rest/api/content/845089606?expand=body.storage

to fetch the data it worked fine 

Now we are using database to store the same data and I need to fetch the records of that database by REST API 

I am using OAuth 2.0 3LO for Authentication and applied all the scopes needed

This are some classic scopes I used 

'read:confluence-space.summary',
'read:confluence-props',
'read:confluence-content.all',
'read:database:confluence',
'read:confluence-content.summary',
'readonly:content.attachment:confluence',
'read:confluence-user',
'read:confluence-content.permission',
'read:confluence-groups',
'search:confluence',
'offline_access',

And this are some granular scopes 

'read:content:confluence',
'read:page:confluence',
'read:attachment:confluence',
'read:database:confluence',
'offline_access',

I also tried using this database path
/wiki/api/v2/databases/{id}

with granular scopes faced 401 error on it.
If it is accessible somehow will I get the records by using this path?

1 answer

2 votes
marc -Collabello--Phase Locked-
Community Champion
August 13, 2024

Confluence databases are not (yet) accessible by API.

Yadav, Rahul [X] August 13, 2024

Thanks @marc -Collabello--Phase Locked- for the quick response
Any idea till when databases will be available in REST API?

Like Arshiya Sultana likes this
marc -Collabello--Phase Locked-
Community Champion
August 13, 2024

I believe there's no formal announcement by Atlassian.

Yadav, Rahul [X] August 13, 2024

Thanks @marc -Collabello--Phase Locked-  it helps.

Sebastian Wendler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 6, 2024

@marc -Collabello--Phase Locked- 
Hello, has there been any update on this yet?

@Yadav, Rahul [X] have you found a workaround?

 

marc -Collabello--Phase Locked-
Community Champion
December 6, 2024

no updates by Atlassian

Yadav, Rahul [X] December 9, 2024

No there's no workaround, I had to take those records to Confluence Page and add it to the table and then I got the records in rest api, 
hope it helps.

Bruno M_ December 12, 2024

I just refactored my entire data just because I saw a "database" menu on the API page. For nothing.... waste of time.

If you landed on this page trying to find a solution for the obvious reason of fetching your data, just because you can't believe what you read on the API docs page, then yes, tough luck.

With this API, you only get back the database Id that you sent in the first place, nothing more.

Like # people like this
Francisco Paiva Knebel May 10, 2025

What is the purpose of a "database" where you can't insert or retrieve information exactly?

Solution I'm doing for this: From the web UI you can export databases to CSV, HTML and PDF at least, so you can manually extract the entire table content that way.

 

Yadav, Rahul [X] May 11, 2025

But manual is of no use in my case I need it to show on frontend directly from confluence page.

Santtu Kumpulainen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 31, 2025

Indeed - this is one of the most powerful functionalities so far in Confluence for organizing data, but with no means to even get it out easily, it does not make a lot of sense to ask users to maintain that data in Confluence. That's a bit shame, since the UX is quite good and ability to create relational tables is very good. I would like to use this capability to let people to build an asset library - then use that library in other applications. 

It's an option to take the data out manually periodically - but who really likes difficult and boring options when there would be easy automated alternatives?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events