Home› Welcome to the FamilySearch Community!› Ask a Question› Family Tree

'Changes' API: identifying Merge target Person based on the source Person (rather than vice versa)

MandyShaw1
MandyShaw1 ✭✭✭✭✭
October 12, 2023 edited September 26, 2024 in Family Tree

Hello

I have been analysing some merge history via the output of the Changes API, https://www.familysearch.org/platform/tree/persons/<id>/changes.

I have found that, where there has been a Merge, I can track down the source Person given the target Person, but not vice versa.

On the source Person change history, the change is just shown as 'Person Removed', with no indication that it was caused by a Merge.

The target Person's change history does show a Merge, and gives the source Person ID, but that's not much use if you are starting from the source Person.

Has anyone found a API-based way of automatically identifying the target Person given the source Person?

Thanks.

0

Best Answer

  • Alan E. Brown
    Alan E. Brown ✭✭✭✭✭
    October 12, 2023 Answer ✓

    You can get the source person by doing a GET on https://www.familysearch.org/platform/tree/persons/<id>

    If you get a 301 redirect, then that means that that Person ID was removed in a merge, and the redirect (in the Location header) will be to the surviving person (what you are calling the target person).

    1

Answers

  • Julia Szent-Györgyi
    Julia Szent-Györgyi ✭✭✭✭✭
    October 12, 2023

    I know nothing about APIs beyond the fact that they exist, but have you tried simply going to the PID of the merge-deleted profile (which I'm guessing must be what you mean by "source Person")? That is, you can just plug the ID in at the end of https://www.familysearch.org/tree/person/details/. The second line on the black stripe across the resulting page will end with a link to the surviving profile (presumably what you mean by "target Person").

    1
  • MandyShaw1
    MandyShaw1 ✭✭✭✭✭
    October 12, 2023 edited October 12, 2023

    Julia - Many thanks, I can get the information in the way you suggest, but I really need to automate this.

    Alan - Brilliant, thank you. I have slightly tweaked the getmyancestors Python module and am now getting exactly what I want, i.e. the target Person ID.

    0
  • Julia Szent-Györgyi
    Julia Szent-Györgyi ✭✭✭✭✭
    October 13, 2023

    Mandy, apologies for my somewhat-clueless contribution. I'm glad Alan knew the answer!

    (Python is more my spouse's wheelhouse than mine. I can just about keep track of two flavors of wiki markup.)

    1
  • MandyShaw1
    MandyShaw1 ✭✭✭✭✭
    October 13, 2023 edited October 13, 2023

    No problem at all, Julia!

    0
This discussion has been closed.
Clear
No Groups Found

Categories

  • All Categories
  • 43K Ask a Question
  • 3.4K General Questions
  • 571 FamilySearch Center
  • 6.8K Get Involved/Indexing
  • 644 FamilySearch Account
  • 6.5K Family Tree
  • 5.2K Search
  • 1K Memories
  • 2 Suggest an Idea
  • 476 Other Languages
  • 62 Community News
  • Groups