Media Types | Agents || Home | About | Content Negotiation by Profile

Alternate Representations

See this content according to other profiles/views and Media Type/formats:

Alternates View


Of Agent class instances


Automated Pagination

To page through these items, use query string arguments 'page' and 'per_page'. HTTP Link headers of first, prev, next & last are given in web responses.

Example, assuming 500 items, page 7, of 50 per page, is given by:


Link header with a response assuming 500 items would be:

Link:   <.../?per_page=500> rel="first",
<.../?per_page=500&page=6> rel="prev",
<.../?per_page=500&page=8> rel="next",
<.../?per_page=500&page=10> rel="last"

If you want to page through the whole collection, start at first and follow link headers until you reach last or until no last is given. You shouldn't try to calculate each page query string argument yourself.