• Join - It's Free

The ancestors API - any successful calls?

Started by Harald Tveit Alvestrand on Tuesday, January 7, 2025
Problem with this page?

Participants:

Related Projects:

Showing all 5 posts

I'm trying to use the ancestors API, but I'm getting an error.

Code:

Geni.api('/profile-3768075/ancestors', {generations: 2}, data => {

           console.log(JSON.stringify(data, null, 2));

Result:

{

 "error": {
   "type": "ApiException",
   "message": "Permission denied"
 }

}

Any idea what's going on here?

I think the /ancestors call requires special permission.

You can get the parents of the profile and get all of the ancestors recursively, but you have to add a 10 second delay for each call. You can see the example I made here: https://github.com/Joelis57/geni-caf/blob/main/app.js#L71C18-L71C38

Thank you so much! This example has so many things that are on my list of "I have to add code for this"!

(I'm getting enough feel for the API now that I'm considering ditching Geni.api() calls and instead using the fetch API - it seems more transparent to do it that way, but I'm sure there will be gotchas along the way....)

In the dveloper docs there is no resource 'ancestors'. According the documentation you should use immediate ffamily. Am ii missing something?

Showing all 5 posts

Create a free account or login to participate in this discussion