Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paging for GET /api/resource #74

Open
kba opened this issue Nov 30, 2015 · 0 comments
Open

Paging for GET /api/resource #74

kba opened this issue Nov 30, 2015 · 0 comments

Comments

@kba
Copy link
Contributor

kba commented Nov 30, 2015

Since there can be resources in the range of millions, it's unfeasible to return every resource in a collection on a GET call to the resource.

This is what caused #71 and was fixed ad-hoc by infolis/mongoose-jsonld@3d70378.

Implementing this is simple, just need to make sure not to miss anything:

  • Define number of results (documents, not triples) per collection in schema.tson, default to 100 (or something)
  • Add page to GET /api/{modelName} Swagger docs
  • Add page to GET /api/{modelName} RESTful call, default to 0
  • Add some form of hypermedia control to the HTTP Response (probably Link in some form, need to investigate)
  • Define the default sorting behavior in such a way that this is stable (per default: oldest to newest?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant