Open davidwabnitz opened 8 years ago
I think it would be more intuitive, if the endpoint for retrieving all documents from a collection would be curl -X GET "http://dev.digitale-kuratierung.de/api/document-storage/{collection-name} instead of curl -X GET "http://dev.digitale-kuratierung.de/api/document-storage/my-collection/documents"
The document storage API violates the REST principles on purpose because it does not handle simple persistence but also other tasks. There is a /collection/status
endpoint and a /collection/documents
endpoint and therefore I added the `/documents/ to the endpoint to make it more clear that these two endpoints deliver different data.
Additionally this interface could include some metadata about the collection (c.f. #17) and should support pagination
See #17 and #10. We can add pagination when somebody expresses the need for it. Currently the document collections are quiet small so I think there is no need for pagination.
Also I think there should be an endpoint for doing CRUD operations on individual documents within a collection. Currently only adding documents is supported.
Do you have a specific use case in mind? There are so many features we could add to the service but I would like to focus on specific user requirements.
I think it would be more intuitive, if the endpoint for retrieving all documents from a collection would be
curl -X GET "http://dev.digitale-kuratierung.de/api/document-storage/{collection-name}
instead ofcurl -X GET "http://dev.digitale-kuratierung.de/api/document-storage/my-collection/documents"
Additionally this interface could include some metadata about the collection (c.f. #17) and should support paginationAlso I think there should be an endpoint for doing CRUD operations on individual documents within a collection. Currently only adding documents is supported.