REST API Needs (for an Angular 2 UI)
Opened this issue · 2 comments
This ticket is simply a list of known "gaps" in the current (DSpace 5/6) REST API which were encountered during the building of the Angular 2 Prototype.
Please feel free to add to this list!
REST API Needs:
- CORS Headers - Currently this prototype "injects" such necessary headers via a Proxy
Recently Added Itemsitem sorting parameters (for homepage / Community/Collection homepages)- Search capabilities (via Solr)
- Counts of sub-communities / collections in a Community request (see https://jira.duraspace.org/browse/DS-3126)
MIT has developed their own "read-only" backport DSpace REST API, which is an entirely custom implementation. This may be a resource for ways to simplify our existing REST implementation: https://github.com/MITLibraries/backrest
What Richard also suggested we use instead of REST API is GraphQL, which gives API clients much bigger flexibility to specify what exactly they want instead of asking for fields (default set of fields or all fields) and then throwing most of them away.
To get the idea of GraphQL in a few words, see: https://medium.com/chute-engineering/graphql-in-the-age-of-rest-apis-b10f2bf09bba#44f9