Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: clarified and added information about limit and offset parameters

...

Code Block
curl -s -H "Accept: application/xml" http://localhost:8080/rest/communities | xmllint --format - 

 
 

Example usage from command line in JSON format with pretty printing:

...

Two other query parameters of note are limit and offset.   Endpoints which return arrays of objects, such as /communities, /collections or /items, are "paginated":  the full list is broken into "pages" which start at offset from the beginning of the list and contain at most limit elements.  By repeated queries you can retrieve any portion of the array or all of it.  Offsets begin at zeroThe default value of offset  is 0 and the default value of limit is 100.  So, as an example, to retrieve the sixth through tenth elements of the full list of Collections, you could do this:

...