Using Element API I would like to remove the limit to how many entries are in the JSON output.

The default is 100 entries, with pagination. I would like 1 response with all entries.

Here is my current call:

return [
'endpoints' => [
    'fullmembers.json' => [
        'elementType' => 'User',
        'criteria' => ['group' => 'fullMembership'],
        'transformer' => function(UserModel $member) {

Thanks in advance guys!


You have to set the criteria model's limit parameter to null and disable pagination.

'criteria' => [
    'group' => 'fullMembership',
    'limit' => null,
'paginate' => false,
  • Thanks Carlcs, but that still results in this: {"pagination":{"total":409,"count":100,"per_page":100,"current_page":1,"total_pages":5,"links":{"next":"http:\/\/craft.fira\/fullmembers.json?page=2"}}}} – Adam Menczykowski Jan 29 '16 at 11:48
  • Oh, you have to disable pagination. Will update the answer. – carlcs Jan 29 '16 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.