Hello Christophe,
First things first, I’m so sorry to hear that the pagination is complicating your work terribly. We will try our best to assist you and ease the troubles.
I checked with our API team and they mentioned that cursors are better suited for frequently changing data because they eliminate the possibility of skipping items and displaying the same item more than once. This pagination approach is also used by other popular API providers.
To help us in assisting you on this, can you please explain or provide more information about the use case and the troubles you are facing. We’ll try our best to provide some guidance once we have more information around the issue.
Thanks and have a good one.
Cheers,
Mira
I use a tool:called denodo. This tool can is “magic” to mix datas from API, database, structured files, …. and let use mix all data like sql table/views.
There is 4 options to fetch data on api with pagination :
HTTP Path — Virtual DataPort Administration Guide (denodo.com)
No one works with cursors.
Hello Christophe,
Thanks for providing more information. Here’s what the team has recommended. Can you please try this out:
The second option (Obtain the “Next Page URL” from the Body of the Response) that your tool provides will work with our pagination:
{
"size": 10,
"limit": 10,
"total": 22,
"data":
...
],
"links": {
"self": "https://api.miro.com/v2/boards/uXjVMOreMKE=/items?limit=10&cursor=",
"next": "https://api.miro.com/v2/boards/uXjVMOreMKE=/items?limit=10&cursor=MzQ1ODc2NDU1MzI2OTExNDI2NH4%3D", <- he can use this link
"last": "https://api.miro.com/v2/boards/uXjVMOreMKE=/items?limit=10&cursor=MzQ1ODc2NDU1MzI2OTExNDI5N34%3D"
},
"cursor": "MzQ1ODc2NDU1MzI2OTExNDI2NH4=",
"type": "cursor-list"
}
Cheers,
Mira
Aaah Nice trick, I would try this and give feedback .
@Mira Balani indeed, this solution is perfect …. for board list but the "links" section doesn’t exist for “members list”
Get boards (miro.com) ← OK
Get organization members (miro.com) ← Not Ok
Hey Christophe,
You’re right, the get organization members API does not have the links parameter implemented at the moment. I will check with the Enterprise team tomorrow on whether they have plans to implement this and also share the user case/feedback you provided to them. I’ll circle back when I have an update on this or if they have a workaround that you can use in the meanwhile.
Cheers,
Mira
Hey there Christophe,
How are you doing? I’m back with a possible solution for you regarding the issue you had with
Get organization members (miro.com)
I checked with the team and they mentioned that based on this document on denodo, we think that the third option should work for your use case.
Parameter in URL for "next" token: cursor
Path to "next" token in response: cursor
The cursor paragraph here sums up cursor-based pagination usage:
The ID of the organization member used as the reference for pagination. To retrieve the first portion of the collection don't pass a cursor value. To retrieve the next portion of the collection, set the cursor parameter value to the ID of the last organization member you received in the response of the previous request.
Can you please check and see if this resolves the issue for you?
Thanks and have a good one.
Cheers,
Mira
Wonderful, it’s works. We can really mark this as solved
Hello Christophe,
Thanks for circling back. Good to know this works for you!
Cheers,
Mira