dell/OpenManage-Enterprise

@odata.nextLink is in data when using the top odata query

Closed this issue · 2 comments

In all of our programs we check for the presence of @odata.nextLink and if it is present we continue to iterate. I noticed when using the top query I would end up getting all objects in OME, but it would take a very long time. On further inspection this is because @odata.nextLink is present even though there shouldn't be a next page because in my case there is only one result. Is this behavior correct?

image

The usage of $top over-rides the pagination constructs internally (as in if page size is x and top is set to y where y > x, then y results are returned in the response) - there isn't a clear spec entry that I could find (and on discussion with colleagues) that indicates that the nextLink shouldn't exist in the returned response, though it does seem like it would be preferable behavior.

Even if we change the behavior to drop the nextLink in the returned response, , the code may need to change to not handle nextlink when using $top in the GET request, since older versions of OME / OME-M will continue returning it.

@RaajeevKalyan I'll give it some thought and come up with a stable way to handle the behavior.