Hello, I am working on a project that uses the Confluence search API. However, I am finding that when I make a search that goes over 25 characters, the API returns 0 results. When it is under 25 characters, the search works normally and returns me the list of search results. Is there a way to fix this?
For reference the way I am calling the API is with:
https://mysite.atlassian.net/wiki/rest/api/content/search?cql=text~"my search"
Hi @Dong, Kevin and welcome to the community,
According to the API documentation, limit is for pagination and not for seaching over 25 characters:
limit integer The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. Default: 25, Minimum: 0, Format: int32
integer
The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.
25
0
int32
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search/#api-wiki-rest-api-search-get
So what you are saying is that on the request you provided, when "my search" is over 25 characters, then the response returns 0?
Hi Alex, yes that is the case. Doing searches on larger items through the API will return nothing but using the search normally on the website using the same exact search terms will return something.
Can you provide an example of your text string?
Yes, my text string is this:
search?cql=text~"Error%20code%20CAA52202"
It looks like you're new here. Sign in or register to get started.