zammad / zammad

Zammad is a web based open source helpdesk/customer support system
https://zammad.org
GNU Affero General Public License v3.0
4.49k stars 761 forks source link

API GET organizations / GET users Limited? #768

Open kernbrand opened 7 years ago

kernbrand commented 7 years ago

hi there,

may it be possible that the api's response is limited to 500 datasets?

thanks, lorenz

thorsteneckel commented 7 years ago

It's actually limited...

https://github.com/zammad/zammad/blob/cd28e904ac122b410f7c28e8284bb0c22411e342/app/controllers/organizations_controller.rb#L58

I'll find out why and let you know.

rkaldung commented 7 years ago

@kernbrand Die you tried the page parameter?

martini commented 7 years ago

Yes. All resources are limited to 500 for one page for load reasons. You can use pagination to get all entries.

https://docs.zammad.org/en/latest/api-intro.html#pagination

Feedback is welcome.

kernbrand commented 7 years ago

yes i know about pagination, but i don't see the use of the limitation. i run zammad on very basic hardware and querying the api causes less load than the frequent running scheduler.rb (ok, reading data through the api. writing data leads to up to 50% cpu load). so maybe we can agree that it might be a nice feature to make that limit configurable.

rkaldung commented 7 years ago

@kernbrand Did you tried an extreme high value for the parameter per_page? This should work right now.

@martini I agree with the OP that a configurable (not disable) per_page value would be a nice feature.

kernbrand commented 7 years ago

@rkaldung

no, to be honest i expected the per_page limit to be limited to 500 results too. thanks for the suggestion!