Confluence cql to get only size?

hi, is there is way to get only the size in cql response ? like in Jira maxresults = 0 returns the total count only and not the expandable list

Hello @AbhishekBiswas

Get the size of what? Using which REST API endpoint? Using what call to that endpoint? Using what CQL request? Using which toolset?

Refer to the How to ask a good question sticky thread.

thanks for the reply,
sorry for the non detailed question. here are some more details:

I am trying to use cql like these

/wiki/rest/api/content/search?cql=type=comment+and+creator=currentUser()+and+created>=startOfDay()

the thing is, I do not need the detail results or values in the response, but only the count of comments for example. So I was thinking is there a way to get only the count of return values in rest api response (maybe only from the first page if paginated, or without considering the pagination in this case).

I found the count value only by querying ?maxresults=0 in jira, which returns only the total count.

I saw the size field in confluence responses having the exact data I need, but not sure how to only get the size field with cql ?
I am making a forge app on confluence cloud.

Hope this adds a bit more light to the question, or please let me know again.
Also, is reducing the response content like this, helpful performance wise in any case ?

thanks,
Abhishek

1 Like