Change limit of expanded children (REST API)

Gary Sharp April 14, 2016

I am fetching several levels of children through the REST API using the expand functionality, but I am unable to figure out how to change the limit of the number of children returned.  It is always 25, even if I raise the limit on the top level.  Is this possible?  If so what is the syntax?

 

The call I am making is rest/api/content/search?cql=id=111&limit=200&expand=children.page,children.page.children.page

6 answers

0 votes
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 27, 2019

Firstly, there are a number of questions that are about the REST APIs. Usually, the best location to go to ask these questions are the Developer Community: https://community.developer.atlassian.com

As for the problems themselves, it seems that people are trying to iterate the children of a single piece of content using the REST APIs.

If you are:

If you can't successfully make those requests work then I would recommend either raising  thread on the Developer Community to seek help OR if you are confident that it is a bug (as per Gabriel's case) it would be a good idea to raise a bug against Confluence Cloud in jira.atlassian.com).

I hope this helps get everybody started in the right direction. Cheers!

Tova Pozen May 4, 2021

Are these APIs existing for server as well?
Especially the API for fetching all of the ultimate descendants of a single piece of conten?

0 votes
gabrielfreiberg August 26, 2019

Any help here, @Robert Massaioli _Atlassian_ ?

I am also trying to use the Content API to get content. Any time you include some expands, the API ignores the Start and Limit parameters.

 

e.g. content/653690267?start=10&limit=25&expand=descendants.page

0 votes
HuguesGauthier January 4, 2019

I tried this and it works

/rest/api/content/9666655/child/page?limit=200

9666655 is a page with a lot of child.

Gary Sharp January 4, 2019

The issue is when using the expand functionality on the search.  Using the child endpoint does not provide the same data.

0 votes
M T January 18, 2017

Anybody found the answer to this?

Running into the same issue as Gary so I tried to call children directly attached to a page, with the hopes that the API would accept a limit on that call: 

 

/rest/api/content/14778915/child?expand=page.body.view&limit=250

0 votes
Gary Sharp April 18, 2016

Good point @Robert Massaioli, updated my question to include the path that I am using.

0 votes
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 17, 2016

You probably need to provide more details on exactly which REST api you are using and with what arguments?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events