Skip to content

Paging for GET /api/resource #74

Description

@kba

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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions