The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Not able to fetch all spaces using httpRequest

Vinay Patil
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!
May 29, 2024

we are executing one httpRequest with base url (https://vinaypatil88vsp.atlassian.net/wiki/rest/api/search), cql ((type="space" and space.title~"*")),limit (10) and authHeader which is returning the response of spaces &  we are getting only spaces which are custom but, knowledge-based and collaboration spaces are not fetched, I checked cql & tried analyzing and creating various cql still not worked, checked it on community also and readed documentation also but not found the rootcause and solution for it.
{
"_links": {
"base": "https://vinaypatil88vsp.atlassian.net/wiki",
"context": "/wiki",
"self": "https://vinaypatil88vsp.atlassian.net/wiki/rest/api/search?space.key=T2&cql=type=space%20"
}
Also I tried with the CQL (type="space" ) but still its giving the same result in its response its returning size=”5” and total Size=”9” and so 4 knowledge-based and collaboration spaces are missing in result array.
Please do provide a potential solution for it.
Thanks and regards,

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Matthias Gaiser _K15t_
Community Champion
May 29, 2024

Hi @Vinay Patil

welcome to the Atlassian Community.

Is there a specific reason why you're using the search endpoint to retrieve the spaces. I'd recommend to use the Get Spaces endpoint which seems to return all the spaces when I try it out.

Be also sure to check if it contains information about paging, e.g. with a next link in the response.

Cheers,
Matthias.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events