Confluence REST API is behaving differently based on which auth mechanism is used.
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}
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