getting all the concept of openmrs Api

Hello everyone I started using the Api openmrs reading this document: REST Web Services API For Clients - Documentation - OpenMRS Wiki and following it I succeeded :), but thay something I do not know if this Api allows and it is to obtain all the concepts since the EndPoint

only gets me the top 50 Someone managed to get everyone using the Api? Is there any other EndPoint that I can use to get all the concepts? first of all, Thanks

On a side note, what is the use case for fetching all concepts in one call?

For your info this paging size is controlled via the global property:

REST resources are designed with paging in mind. As Daniel asked, in what context would you want to bypass paging?

Hello @dkayiwa @mksd thanks for your reply. I’m doing a script with this Api and I need to call all the concepts and not just the top 50. I do not really want to alter the paging of the openmrs. Would there be another way to get them all or would this be the only one?

The REST API is paged like this, by design.

The alternatives I can think of are (1) to do a SQL query, instead of REST, (2) to do that SQL query via the reporting module, if you want to get its results via reporting rest, or (3) to compile a custom rest endpoint that will return all concepts.

If it’s a one-off script then I would just run a one off SQL query.

-Darius (by phone)

1 Like

Thanks, I’ll give a try and keep you posted about the result @darius