Pagination mismatch. Offset != page and Limit != per_page

We should be using Offset and Limit for pagination while calling get Organization Members endpoint,

Could you please let us know how to do that ?

Hi @siddalingappa,

Welcome to the Auth0 Community!

I understand that you need guidance on using the page and per_page parameters in the Management API Get Organization Members endpoint.

Firstly, using the per_page parameter specifies the number of results per page and defaults to 50. So, for example, specifying per_page: 1 will produce only 1 result.

Next, using the page parameter specifies the page index of the results to return, where the first page is indexed 0. For example, calling page: 1 returns the results of the second page.

I hope this answers your questions!

Please let me know if you have any additional questions. I’d be happy to help.

Thank you.

I want to use offset and limit ?

page and per page are different than offset and limit :slight_smile:

So we need to convert offset and limit to page and per page (Happy to know what might be the way to convert )

page and per page are different than offset and limit :slight_smile:

So we need to convert offset and limit to page and per page (Happy to know what might be the way to convert )

Hi @siddalingappa1,

Thank you for your responses.

The equivalent fields for offset and limit are page and per_page when calling the Management API Get Organization Members endpoint.

Could you elaborate on how the page and per_page fields are different from offset and limit?

What observations have you encountered when using page and per_page that would require a conversion?

I am looking forward to your reply.

Thank you.

If I use page and per page with 20 objects per page, assuming that page 1 and per page is 20, returns objects with index 0 - 19, if you are on page 2, then you should be looking at objects with index 20 - 39.

But If I use offset and limit, If I now decide to change my offset to 2 and limit to 10, the most common behavior would be to display objects with index 2 - 11. So here we can use precise selection to get the results

1 Like

I also have another question :
We get this organization members response with following fields
- total
- start
- limit

What are these ?

Is limit means --perpage ?
offset means - page ?

1 Like

Hi @siddalingappa1,

Thank you for your responses.

In this case, I recommend using the from field and take field to accomplish this. The from field can be used to specify the ID which to begin, for example, the second index. And then using the take field to specify the number of results per page, for example, 10.

Could you please share a screenshot of your observations?

I am looking forward to your reply.

Thank you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.