Skip to main content

Miro Pagination based on cursor-list not working as expected for Audit/logs API.

I guess cursor key should not be there in the last page of the response, but we are getting same value of Cursor key continuously every time in the response.


Can you please suggest on same?

Hi @Deepak Kumar Flexera!

This is a very good question and I think it’s an expected assumption about the cursor being null for the last page. However, due to technical implementation that’s not the actual behavior at the moment. Right now the cursor is the id of the last retrieved data item, and that’s why it’s always the same: it’s the last page, and only one element is returned - which means it is always the last element. 

We’re going to address in the future it either by making it more clear in the documentation or finding a way to provide an expected behavior. In the mean time, please feel free to assume that if the `size` property is less or equal to the `limit` property, then you’ve reached the last page of the items list. 

Thank you,

Elena.


Hi @Deepak Kumar Flexera!

This is a very good question and I think it’s an expected assumption about the cursor being null for the last page. However, due to technical implementation that’s not the actual behavior at the moment. Right now the cursor is the id of the last retrieved data item, and that’s why it’s always the same: it’s the last page, and only one element is returned - which means it is always the last element. 

We’re going to address in the future it either by making it more clear in the documentation or finding a way to provide an expected behavior. In the mean time, please feel free to assume that if the `size` property is less or equal to the `limit` property, then you’ve reached the last page of the items list. 

Thank you,

Elena.

Thanks!

In members API , cursor key is not there for last page in the response and it is working fine. similarly it should not be there for audit logs API.

 


That is correct, the issue only exists for audit API at the moment because of its technical implementation. Members API documentation mentions that cursor will be empty on the last page, while audit API documentation does not. 

We are doing are best to create a seamless experience for our developers, but some parts are still a work in progress :) 


Reply