learningtapestry / metadataregistry

DEPRECATED - THIS CODE BASE IS NO LONGER MAINTAINED. Metadata Registry
Apache License 2.0
7 stars 5 forks source link

List documents #4

Closed aspino closed 8 years ago

aspino commented 8 years ago
science commented 8 years ago

Feature request: Developers are asking for a feature where the envelope returns a decoded version of the interior envelope as well as the jwt signed version. This makes the envelope human readable right off the wire. This would be an optional (off by default) feature - something like "?decode_envelope=true" or whatever you think is easiest. Format would be something like:

{
  "doc_type": "resource_data",
  "doc_version": "0.52.0",
  "doc_id": "ac0c5f52-68b8-4438-bf34-6a63b1b95b56",
  "user_envelope": "[user_envelope]",
  "user_envelope_format": "json",
  "user_envelope_signature": "jwt",
  "user_envelope_decoded": "[user_envelope text without jwt signing]"
}
aspino commented 8 years ago

Pagination is implemented and uses Link headers. I prefer this approach because it avoids adding this metadata to the response payload, resulting in a cleaner and more straightforward JSON response.

It also follows the exact same mechanism used by Github in its API (https://developer.github.com/guides/traversing-with-pagination/#basics-of-pagination), so from the point of view of the developer it's something they're probably familiar with.