fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
478 stars 301 forks source link

Feature request: An API for external data manipulation in Webtrees #1665

Open mrfatguy opened 6 years ago

mrfatguy commented 6 years ago

A continuity of Webtrees forum's post. A feature request to create an API for external data manipulation of of all data structures available in Webtrees.

Key assumption here: All the business logic must be developed on API side.

Example 1: Updating single field in a single GEDCOM record of a single individual.

If you want to update a birth record then corresponding API method accepts individual's ID and new birth date and does all the magic of updating entire record on its own / on API side. That shouldn't be very hard to achieve, right? If I have individual's ID, I can:

Example 2: Linking two individuals.

I (the thin client) expect corresponding API method to expect (i.e. individual/merge) only IDs of two individuals and to do everything is needed (i.e. create a family record and update two individual records -- as you said) by itself.

If we go with the suggested approach (that entire logic should be on client-side) then we stick with a horrible assumption that this logic must be recreated (and then updated) in every connecting thin client on its own. That would be a kind of madness or the beginning of all hell -- to cite popular devs source.

Amgine0 commented 6 years ago

Use cases: