Open steffenkleinle opened 2 years ago
Just to clarify, the new words
endpoint does not satisfy your needs?
If it's really necessary to filter the documents by multiple ids, what is the preferred way for you to pass them? As GET-parameters, e.g. words/?ids[]=1&ids[]=2
, words/?ids=1,2
or in the POST data as JSON list?
Ah yes, it does, sorry and thanks! Didn't know about that. I think it is necessary to filter by multiple ids. Query params would be my preferred way to do so. Is there documentation for the endpoints somewhere already?
Alright! Yes, we do have documentations, in my opinion even a bit too many :see_no_evil::
@lukasboehm97 I think we should decide on a single source of truth, keep that one up to date and remove all other documentations.
Ideally we would get our sphinx documentation up-to-date and keep it as single point of truth
Summary of To-Do's regardings this issue:
discipline_by_id
(which is only used internally within the cms GUI) and words
. It makes sense to merge these endpoints into onediscipline_by_id
etc.)
Motivation
For several purposes like favorites we need to save documents in the app. While saving the whole documents is of course possible, there is no way of updating these if e.g. images, alternatives or the words of a document is changed. Fur us the better alternative would be to just save document ids and request the actual documents using a cms endpoint.
Proposed Solution
Implement an endpoint accepting one or multiple document ids and returns an array of the corresponding documents. If an id does not point to a valid document (anymore), the request should not fail but instead just not return a document for that id.
Alternatives
Additional Context
Corresponding app issue: https://issues.tuerantuer.org/browse/LUN-307