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,content.version,content.ancestors&cql=type=attachment and lastModified >="2026-07-15" and lastModified <="2026-07-29 23:30"'--header 'Authorization: ••••••'This request gives 0 records
Basic Auth- 'https://<domain>.atlassian.net/wiki/rest/api/search?expand=content.space,content.version,content.ancestors%,content.body.storage,content.body.atlas_doc_format&cql=type=attachment and lastModified >="2026-07-15" and lastModified <="2026-07-29 23:30"&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
Very often the main issue with the OAuth API is the authentication. Do you have the OAuth credentials, and where did you get them?
Hi @Dheeraj Kholia _xWF_
Welcome to the community.
As mentioned by @marc -Collabello--Phase Locked- where is your token in the call using OAuth, you first have to make a cal to get an OAuth token and use this token in the cal to get results.
@marc -Collabello--Phase Locked- I have generated access token using Atlassian token endpoint - https://auth.atlassian.com/oauth/tokenAfter generating the token I have added in the authorization header
@Marc -Devoteam- I have generated access token using Atlassian token endpoint - https://auth.atlassian.com/oauth/tokenAfter generating the token I have added in the authorization header.
It looks like you're new here. Sign in or register to get started.