# \[SOLVED\] How to increase the maximum page\_size of request?

**URL:** <https://forum.mattermost.com/t/solved-how-to-increase-the-maximum-page-size-of-request/4476>\
**Category:** Troubleshooting\
**Created:** [February 5, 2018, 7:13am UTC](https://forum.mattermost.com/t/solved-how-to-increase-the-maximum-page-size-of-request/4476 "2018-02-05T07:13:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bibekdari](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/bibekdari/32/1869_2.png) [@bibekdari](https://forum.mattermost.com/u/bibekdari)\
**Post date:** [February 5, 2018, 7:13am UTC](https://forum.mattermost.com/t/solved-how-to-increase-the-maximum-page-size-of-request/4476/1 "2018-02-05T07:13:40Z")

</div>

Its currently 200 I want to increase to 1000.  
/api/v4/channels/{channel\_id}/members?page=0&per\_page=600  
will give only 200 results. i.e. max allowed per\_page is 200.

---

<div class="post-metadata">

**Author:** ![amy.blais](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/amy.blais/32/7481_2.png) [@amy.blais](https://forum.mattermost.com/u/amy.blais)\
**Post date:** [February 7, 2018, 8:48pm UTC](https://forum.mattermost.com/t/solved-how-to-increase-the-maximum-page-size-of-request/4476/2 "2018-02-07T20:48:57Z")

</div>

Thanks @bibekdari! What’s your use case to return 1000 results?

---

<div class="post-metadata">

**Author:** ![bibekdari](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/bibekdari/32/1869_2.png) [@bibekdari](https://forum.mattermost.com/u/bibekdari)\
**Post date:** [February 10, 2018, 4:33am UTC](https://forum.mattermost.com/t/solved-how-to-increase-the-maximum-page-size-of-request/4476/3 "2018-02-10T04:33:39Z")

</div>

I want all channel members at once so that I can sort them on my own way.  
actually by display name which I have created based on priority given to nickname \> full name \> username. like below. I want to sort users based on that display name so I need all users. I have 1000 users on my team that’s why I want to increase that page\_size.  
func displayName(user: User) -\> String {  
if user.nickname.exists {  
return user.nickname  
}

if user.fullName.exists {  
return user.fullname  
}

return user.username  
}

---

<div class="post-metadata">

**Author:** ![jwilander](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/jwilander/32/8440_2.png) [@jwilander](https://forum.mattermost.com/u/jwilander)\
**Post date:** [February 12, 2018, 4:18pm UTC](https://forum.mattermost.com/t/solved-how-to-increase-the-maximum-page-size-of-request/4476/4 "2018-02-12T16:18:30Z")

</div>

Hi @bibekdari,

I would suggest making multiple requests until you get all the channel members you need

e.g. `/api/v4/channels/{channel_id}/members?page=0&per_page=200`, `/api/v4/channels/{channel_id}/members?page=1&per_page=200`, and so on until you receive less than 200 results, meaning you’ve hit the end.

Then once you have all the channel members you can sort them however you like

---

<div class="post-metadata">

**Author:** ![awky](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@awky](https://forum.mattermost.com/u/awky)\
**Post date:** [June 25, 2025, 3:51pm UTC](https://forum.mattermost.com/t/solved-how-to-increase-the-maximum-page-size-of-request/4476/5 "2025-06-25T15:51:30Z")

</div>

I’m also interested in this. In my case I’m trying to work around a bug with mmctl export:

> <https://github.com/mattermost/mattermost/issues/32125>
>
> \### Before you file a bug report
> 
> \- \[x\] I have checked the \[issue tracker\](https…://github.com/mattermost/mattermost/issues) and have not found an issue that matches the one I'm filing.
> \- \[x\] This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16.
> \- \[x\] This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.uservoice.com/forums/306457-general/.
> \- \[x\] This issue reproduces on one of the \[currently supported server versions\](https://docs.mattermost.com/about/mattermost-server-releases.html#latest-releases).
> \- \[x\] I have read the \[contribution guidelines\](https://github.com/mattermost/mattermost/blob/master/CONTRIBUTING.md) and the \[Mattermost Handbook Contribution Guidelines\](https://handbook.mattermost.com/contributors/contributors/guidelines/contribution-guidelines).
> 
> \### Mattermost Server Version
> 
> 10.7.0
> 
> \### Operating System
> 
> Debian 10
> 
> \### Steps to reproduce
> 
> 1. On the Mattermost server, create an export:
> \`\`\`
> cd /opt/mattermost/
> bin/mmctl --local export create
> 2. Check the logs:
> \`\`\`
> tail -f /opt/mattermost/logs/mattermost.log
> \`\`\`
> 
> \### Expected behavior
> 
> Create a full export of server, including messages.
> 
> \### Observed behavior
> 
> No messages are in the resulting export. The file itself is only 8 kb:
> \`\`\`
> du -sh /var/mattermost/export/16444px4epretb4b37yeowqsga\_export.zip
> 8.0K	/var/mattermost/export/16444px4epretb4b37yeowqsga\_export.zip
> \`\`\`
> 
> \### Log Output
> 
> \`\`\`shell
> {"timestamp":"2025-06-25 14:02:26.667 +01:00","level":"info","msg":"Bulk export: exporting version","caller":"app/export.go:138","worker\_name":"ExportProcess","job\_id":"16444px4epretb4b37yeowqsga","job\_type":"export\_process","job\_create\_at":"Jun 25 13:02:19.193"}
> {"timestamp":"2025-06-25 14:02:26.667 +01:00","level":"info","msg":"Bulk export: exporting team schemes","caller":"app/export.go:312","worker\_name":"ExportProcess","job\_id":"16444px4epretb4b37yeowqsga","job\_type":"export\_process","job\_create\_at":"Jun 25 13:02:19.193"}
> {"timestamp":"2025-06-25 14:02:26.668 +01:00","level":"info","msg":"Bulk export: exporting channel schemes","caller":"app/export.go:317","worker\_name":"ExportProcess","job\_id":"16444px4epretb4b37yeowqsga","job\_type":"export\_process","job\_create\_at":"Jun 25 13:02:19.193"}
> {"timestamp":"2025-06-25 14:02:26.669 +01:00","level":"info","msg":"Bulk export: exporting roles","caller":"app/export.go:322","worker\_name":"ExportProcess","job\_id":"16444px4epretb4b37yeowqsga","job\_type":"export\_process","job\_create\_at":"Jun 25 13:02:19.193"}
> {"timestamp":"2025-06-25 14:02:26.670 +01:00","level":"info","msg":"Bulk export: exporting teams","caller":"app/export.go:149","worker\_name":"ExportProcess","job\_id":"16444px4epretb4b37yeowqsga","job\_type":"export\_process","job\_create\_at":"Jun 25 13:02:19.193"}
> {"timestamp":"2025-06-25 14:02:26.671 +01:00","level":"info","msg":"Bulk export: exporting channels","caller":"app/export.go:155","worker\_name":"ExportProcess","job\_id":"16444px4epretb4b37yeowqsga","job\_type":"export\_process","job\_create\_at":"Jun 25 13:02:19.193"}
> {"timestamp":"2025-06-25 14:02:26.673 +01:00","level":"info","msg":"Bulk export: exporting users","caller":"app/export.go:160","worker\_name":"ExportProcess","job\_id":"16444px4epretb4b37yeowqsga","job\_type":"export\_process","job\_create\_at":"Jun 25 13:02:19.193"}
> {"timestamp":"2025-06-25 14:02:26.686 +01:00","level":"info","msg":"Bulk export: exporting bots","caller":"app/export.go:166","worker\_name":"ExportProcess","job\_id":"16444px4epretb4b37yeowqsga","job\_type":"export\_process","job\_create\_at":"Jun 25 13:02:19.193"}
> {"timestamp":"2025-06-25 14:02:26.689 +01:00","level":"info","msg":"Bulk export: exporting posts","caller":"app/export.go:173","worker\_name":"ExportProcess","job\_id":"16444px4epretb4b37yeowqsga","job\_type":"export\_process","job\_create\_at":"Jun 25 13:02:19.193"}
> {"timestamp":"2025-06-25 14:02:26.690 +01:00","level":"error","msg":"SimpleWorker: job execution error","caller":"jobs/base\_workers.go:86","worker\_name":"ExportProcess","job\_id":"16444px4epretb4b37yeowqsga","job\_type":"export\_process","job\_create\_at":"Jun 25 13:02:19.193","error":"exportAllPosts: Limit exceeded for paging., failed to find Posts: Error 1305 (42000): FUNCTION mattermost.JSON\_ARRAYAGG does not exist"}
> \`\`\`
> 
> \### Additional Information
> 
> \_No response\_

At least I think it’s a bug 🙂
