vulcan-sql icon indicating copy to clipboard operation
vulcan-sql copied to clipboard

Provide the information about pagination in API responses

Open oscar60310 opened this issue 3 years ago • 0 comments

What’s the problem you're trying to solve

We've implemented offset-based pagination #104, but our API response didn't give extra information about it, e.g. total count.

Describe the solution you’d like

We can wrap our result to "results" property, and add extra information about pagination like below:

{
    "_links": {
        "next": "/api/users?limit=20&offset=20",
    },
    "offset": 0
    "limit": 20,
    "results": [
        // Data gose here
    ],
    "total_count": 100,
}

Additional context

oscar60310 avatar Oct 14 '22 06:10 oscar60310