Forums

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

How to query Confluence restricted page content using API?

Dom
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 4, 2025

We were trying to retrieve a Confluence page content programmatically using API. 

For example, using python's atlassian library. 

from atlassian import Confluence

confluence.cql("(title='Test Private Page')", start=0, limit=None, expand=None, include_archived_spaces=None, excerpt=None)

 
It would return empty results. API call would work for non-restricted contents.

Is there a way to do that?

1 answer

0 votes
Ziad Bakhiet July 4, 2025

Hello Dom,

If the cql() call is returning empty results for a restricted page, it's likely because the API user doesn't have permission to view it.

Make sure you're authenticated as a user who can actually see the page in the Confluence UI—if you can't see it there, the API won't return it either.

Regards,

Ziad

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events