restful-open-annotation / spec

RESTful Open Annotation API specification
http://restful-open-annotation.github.io/spec/
1 stars 0 forks source link

Pagination #1

Closed spyysalo closed 9 years ago

spyysalo commented 9 years ago

Many annotation collections will be too large to provide in a single response, so we'll almost certainly need something like pagination.

Possible solutions / ideas:

spyysalo commented 9 years ago

The standard link relations (http://www.iana.org/assignments/link-relations/link-relations.xhtml) should take care of most if not all of this. We just need URIs for them (see also e.g. https://github.com/mnot/I-D/issues/39).

spyysalo commented 9 years ago

No authoritative URI seems to exist, but http://www.iana.org/assignments/link-relations/ is good enough for now. Suggest to just extend the @context with e.g.

"@context": {
  "lrel" :  "http://www.iana.org/assignments/link-relations/#",
  "next":   "lrel:next",
  "prev":   "lrel:prev",
  "first":  "lrel:first",
  "last":   "lrel:last",
}

And simply use the short forms in examples etc. The context can be tweaked later if a better base is found.

spyysalo commented 9 years ago

Actually, those should rather be

"next":   { "@type": "@id", "@id": "lrel:next" },

etc.

spyysalo commented 9 years ago

Draft context up at http://nlplab.org/ns/restoa-context-20150307.json, documentatation draft at http://restful-open-annotation.github.io/spec/context.html, draft reference implementation at https://github.com/restful-open-annotation/eve-restoa . Closing, please open more specific issues if some part remains.