Forums

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

Date based filters not working with Confluence v1 search API using OAuth credential

Dheeraj Kholia _xWF_
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 29, 2026

Confluence REST API is behaving differently based on which auth mechanism is used.

  1. Using OAuth API URL is constructed using cloudId- cloudId is fetched using the domain/site of confluence account. https://api.atlassian.com/ex/confluence/{cloudid}/{api}

  2. Using Basic auth(API key), REST API is directly used with domain url https://<domain>.atlassian.net/wiki/rest/{api}

v1 search endpoints are behaving inconsistently with OAuth URL. While with basic auth the v1 search API works fine with date filters, OAuth based URL is not returning data with the same date filters.

OAuth Request- https://api.atlassian.com/ex/confluence/<cloudId>/wiki/rest/api/search?limit=250&expand=content.space%2Ccontent.version%2Ccontent.ancestors&cql=type%3Dattachment%20and%20lastModified%20%3E%3D%222026-07-15%22%20and%20lastModified%20%3C%3D%222026-07-29%2023%3A30%22'
--header 'Authorization: ••••••'

This request gives 0 records


Basic Auth- 'https://<domain>.atlassian.net/wiki/rest/api/search?expand=content.space%2Ccontent.version%2Ccontent.ancestors%%2Ccontent.body.storage%2Ccontent.body.atlas_doc_format&cql=type%3Dattachment%20and%20lastModified%20%3E%3D%222026-07-15%22%20and%20lastModified%20%3C%3D%222026-07-29%2023%3A30%22&limit=205'
--header 'Accept: application/json'
--header 'Authorization: ••••••'

This returns correct data count.


Is there a configuration or known issue due to which records are missing when we use cloudId based URL with OAuth credentails

0 answers

Suggest an answer

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

Atlassian Community Events