API request: Get sources based on list of ids
Currently, all the GET methods we have works with an identifier
Would it make sense to have an API where we can send a list of identifiers and get list of objects as results. This would help to optimize the performance of the clients when multiple queries need to be performed. e.g. requesting set of sources based on source-ids. Not sure how "REST-ful" this would be.
Further, It would be nice to have another api where we can get source-summary or MinimalSourceDetails
Any thoughts? @blootsvoets @dennyverbeeck
Those set of sources would still belong (or have belonged) to a single user, right? Using that user ID in the path seems more straightforward. Could be with a query parameter like detail=minimal or detail=full.
Query parameter for detail sounds good. However, the reason for the API with list of source-ids is to retrieve data of sources that are recorded in MongoDB, but not currently assigned for Subject in MP. I asked for that API till we get the history-tracking features implemented in MP. If that is not a nice solution, I think GET api/sources/{source-id} is sufficient to do what we want for now.
We can definitely have something like GET /api/sources?id=id1,id2,id3 if that is needed. Looking at the SourceDTO, it has a MinimalProjectDetailsDTO field, but also a 'full' SourceTypeDTO field. I think regardless of our decision on the sources API, changing the SourceTypeDTO to a MinimalSourceTypeDTO would make sense (have referenced entities be minimal), and would make it so that SourceDTO does not require a Minimal... counterpart.