-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request movement- and reproduction-history of a single animal #493
Comments
Hi, my point of view is that it could be a solution to add a single animal as request parameter on all relevant message. like this ex. Then you can request the history of a new animal entering the location. If a new endpoint for history is made, we have to add all event messages into one new endpoint. This will be another kind approach of sharing data then the existing. |
Thanks Ditlev for your comment. Nevertheless, a disadvantage is, that one has to request all endpoints to get the data of one single animal collected --> one request vs.
Really a lot of complexity! Each of this requests could fail, deliver a bad request, all of them have to be collected, etc. |
If it will be an single endpoint where you can get all event of an animal, what is the reason to have all the other endpoints? Then this endpoint only can be use by single animal, right? |
We agreed that @AndreasSchultzGEA will propose a pull request that demonstrates filtering the existing API end points by animal identifier as @dirbSEGES proposed. This may be easier for people to implement serialisation and deserialisation of resources, even though it requires more calls. It may also allow collection of missing events of a single type for an animal. |
I'm in favour of the filter style --> is conform with API design rules --> the endpoint in the example is pregancy -checks, and you want this for one animal, or you want a specifc period, or a modified-since, or only those with value true .... /location/pregnancy-checks/animals/scheme/id |
Discussed at Nov 27 meeting
|
Discussed at Nov 28 meeting
|
Good solution. I thought of it as well, but then I had to prepare a third PR. What about
The advantage is to have only one parameter (key-value) instead of two. |
As the |
Users of our interfaces of request for getting the history of a single animal at once instead of requesting several endpoint without proper filtering.
And - in our own business - we often have to request the history of single animals as well from national cattle-register to insert them in complete into our database, but some of them limit the data to be delivered by the dedicated endpoints in concerns of date/time probably for performance/payload reasons.
#492
The text was updated successfully, but these errors were encountered: