You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by bgoetzmann <bg...@sophia.symag.com> on 2010/03/04 10:13:17 UTC
Getting collections using REST
Hello,
I'm really impressed by Sling!
I have a beginner question: how to get a collection via the REST interface?
For example, with this kind of URL: http://localhost:8080/content/blog/
where Sling should return all nodes under "blog"?
Thank you,
Bertrand.
--
View this message in context: http://n3.nabble.com/Getting-collections-using-REST-tp428146p428146.html
Sent from the Sling - Users mailing list archive at Nabble.com.
Re: Getting collections using REST
Posted by Simon Gaeremynck <ga...@gmail.com>.
Hi Bertrand,
To get the direct childnodes under a node you can do a GET request
to http://localhost:8080/content/blog.1.json
If you want to go 2 levels deep you can do:
GET http://localhost:8080/content/blog.2.json
If you want all of the child nodes you can try
GET http://localhost:8080/content/blog.infinity.json
Keep in mind that if your collection gets bigger then a certain number (iirc 200) Sling will respond with a 300.
Simon
On 4 Mar 2010, at 09:13, bgoetzmann wrote:
>
> Hello,
>
> I'm really impressed by Sling!
>
> I have a beginner question: how to get a collection via the REST interface?
> For example, with this kind of URL: http://localhost:8080/content/blog/
> where Sling should return all nodes under "blog"?
>
> Thank you,
>
>
> Bertrand.
> --
> View this message in context: http://n3.nabble.com/Getting-collections-using-REST-tp428146p428146.html
> Sent from the Sling - Users mailing list archive at Nabble.com.