I couldn’t find API for getting folder in v2.
So I tried “/wiki/rest/api/content” v1 API but it doesn’t return folder.
Below v1 APIs return correctly folders under a page, but I could not figure out how to get folders on first-depth in a space.
/wiki/rest/api/content/{id}/child
/wiki/rest/api/content/{id}/descendant/
/wiki/rest/api/content/{id}/descendant/{type}
Thanks for the answer @Corentin !
I have few more questions.
search v1 api with cql(cql=type=folder) returns all folders. it is hard to know the hierarchy of folders. is there good approach to get only top level folder?
in search v1 api document, there is no explanation about expand. where can I find details of expand?
If you’re looking for first-level folders in the space, I think you could have the pageId of the homepage, or the space id in your cql. Something like cql=ancestor=<homepageId>, or cql=parent=<homepageId>
I don’t really know where expands are documented. You can think of expands as an Atlassian made graphql replacement. I usually try to send requests and look at the _expandable field in the response for discovery.