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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 bradley likes this

Suggest an answer

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

Atlassian Community Events