Better Genealogy Through APIs


Published on

RootsTech 2012 - Better Genealogy Through APIs

Published in: Technology

Better Genealogy Through APIs

  1. 1. Better Genealogy Through APIs Michael Berkovich Platform Tech Lead, February 2, 2012Thursday, February 2, 12
  2. 2. The Brief History of The Web Web 1.0 1990-2004 Static Content Publishing, Sharing, Surfing, Email, Chat, CMS, Personal Websites, Screen Scraping Delivered Through HTTP, HTML, URL, DialupThursday, February 2, 12
  3. 3. The Brief History of The Web Web 2.0 2004-2008 Social Web and User Provided Content Community, Collaboration, Interaction, Participation, Blogging, Wikis, Tagging, Syndication, SEO Delivered Through DHTML, CSS, JavaScript, AJAX, JSON, XML, XSLT, XHTML, XMLHttpRequest, Prototype, jQuery, RSSThursday, February 2, 12
  4. 4. The Brief History of The Web Web 2.0 ++ 2008 - now Integrated Data Web Services, Platforms, Mashups, Cloud, SaaS, Mobile Apps Delivered Through API, SOA, REST, SOAP, OAuth, RSSThursday, February 2, 12
  5. 5. What is an API? n Application Programming Interface n Set of protocols that provide building blocks for developers to build applications n Previously were associated with computer operating systems and native applications n Today mostly refer to web servicesThursday, February 2, 12
  6. 6. What is a Web Service API? Client Applications (Web, Mobile, Desktop) n Request messages along with a definition of the structure of response messages HTTP HTTPS Client-Side SDKs n Data formats - JSON, XML JS, iOS, Android, Java XML JSON n Paradigms - REST, SOAP Web Services Layer n Protocols - HTTP, HTTPS Family Tree Records Media API API API Core Platform and DataThursday, February 2, 12
  7. 7. Total API Over Time Programmable Web Statistics Source:, February 2, 12
  8. 8. Consumer API Categories Programmable Web Statistics Source:, February 2, 12
  9. 9. Mashups Created in the Last 6 Months Programmable Web Statistics Source: http://www.programmableweb.comThursday, February 2, 12
  10. 10. Benefits of Web APIs End Users n Provides users with application choices and better tools Application Developers n Allows unique and creative integration to provide the best value to the end users API Providers n Increases interest in the products and services n Increases web traffic n Outsources a task that is not part of your core businessThursday, February 2, 12
  11. 11. Genealogy Applications Today Documents & Records Maps Biographies Family Tree Family Photos DNA Services ChartsThursday, February 2, 12
  12. 12. Genealogy Applications with API Documents & Records Biographies Maps Family Photos Genealogy Platform DNA Services ChartsThursday, February 2, 12
  13. 13. Why Genealogy API? n Save users time n Provides access to the best tools n Allows for data aggregation n Makes collaboration easy n Enables integrated experienceThursday, February 2, 12
  14. 14. APIs in Genealogy Geni API MyHeritage Family Graph API FamilySearch API, February 2, 12
  15. 15. Geni Platform Features n Free public open API that provides access to Geni users and data n Application security and permissions n API management and documentation n Developer tools, SDKs and metrics n Application directoryThursday, February 2, 12
  16. 16. What Can You Do With Geni Platform? n Geni Connect and Web Widgets n Web, Mobile and Desktop applications n Embedded apps within GeniThursday, February 2, 12
  17. 17. Geni Platform Implementation n Authorization - OAuth 2.0 n RESTful Paradigm n Data Formats - JSON, XML n Protocols - HTTP, HTTPS n Encoding - UTF8Thursday, February 2, 12
  18. 18. What is OAuth? An open protocol to allow secure API authorization in a simple and standard method from desktop and web applications. Source: http://oauth.netThursday, February 2, 12
  19. 19. Who is Using OAuth? Source: http://oauthx.comThursday, February 2, 12
  20. 20. OAuth 2.0 n Consumers n Desktop and mobile applications n Dashboard widgets and gadgets n Javascript browser-based apps n Providers (platform) n Web applications and server-side APIThursday, February 2, 12
  21. 21. OAuth 2.0 - High Level User Web Authorization Browser Server Shared Authorization Store Client Resource Application ServerThursday, February 2, 12
  22. 22. OAuth 2.0 - Authorization Flow Source:, February 2, 12
  23. 23. OAuth 2.0 - Subsequent Requests Source:, February 2, 12
  24. 24. Geni Supported OAuth Flows n Server-side (Authentication Code) n Client-side (Implicit Grant) n Desktop Apps (Implicit Grant) n Mobile Apps (Implicit Grant) n Trusted Apps (Resource Owners) n App Login (Client Credentials)Thursday, February 2, 12
  25. 25. API Access Scope & Permissions User Family Tree user_basic family_basic tree_basic user_email X X user_location family_location tree_location user_about_me family_about_me tree_about_me user_occupation family_occupation tree_occupation user_events family_events tree_events user_contact_info family_contact_info X user_media family_media tree_media update_user X update_profiles publish_media upload tag commentThursday, February 2, 12
  26. 26. RESTFul Paradigm n REpresentational State Transfer n Stateless client-server architecture n Web services are resources and can be identified by their URLs n API is defined as set of remote methods that describe the action to be performed on the resource n HTTP methods such as GET and POST are used to describe the necessary CRUD actions to be performedThursday, February 2, 12
  27. 27. JSON Data Format { “first_name”: “Michael”, “last_name”: “Berkovich”, “gender”: “male”, “email”: “” } n JavaScript Object Notation n Lightweight data-interchange format n Easy for humans to read and write n Easy for machines to parse and generate n Based on a subset of the JavaScript Programming Language n Completely language independentThursday, February 2, 12
  28. 28. Geni Platform Client SDKs n JavaScript SDK n n iOS SDK n n Android SDK (work in progress) n Java SDK (work in progress) n PHP SDK (work in progress)Thursday, February 2, 12
  29. 29. Geni APIThursday, February 2, 12
  30. 30. Profile API Example, February 2, 12
  31. 31. Immediate Family API Example, February 2, 12
  32. 32. Profiles and Unions, February 2, 12
  33. 33. Profile Documents API Example, February 2, 12
  34. 34. Geni JavaScript SDK Example Include Geni JS Client SDK Script <script src=""></script> Initialize Geni Client Geni.init({ app_id: YOUR_APP_KEY, cookie: true, // enables saving the access token to a cookie logging:true // enable log messages to help in debugging }); Connect with Geni Geni.connect(function(response) { if(response.status == authorized) { // User is logged in and has authorized your application. // You can now make authorized calls to the API. } else { // User is either logged out, has not authorized the app or both. } }); Call Geni API Geni.api(/profile-23642470, function(response) { alert( });Thursday, February 2, 12
  35. 35. Geni iOS SDK Example Import Geni Client Library #import "GeniSDK.h" Initialize Geni Client Geni *geni = [[Geni alloc] initWithAppId:@”YOUR_APP_ID”]; Authorize Your App Using OAuth <GeniSessionDelegate> [geni authorize:self]; - (void) geniDidLogin { } - (void) geniDidNotLogin: (BOOL)cancelled { } Call Geni API [geni requestWithPath:@"user/max-family" andDelegate:self]; - (void)request:(GeniRequest *)request didLoadResponse:(GeniResponse *)response { }Thursday, February 2, 12
  36. 36. Let’s write some code !!!Thursday, February 2, 12
  37. 37. Geni Developer Community Over 200 developers are working on more than 70 Geni AppsThursday, February 2, 12
  38. 38. Why Develop with Geni Platform? n Instant access to our Free Public Open API n Reach over 7 million users n Get access to over 115 million profiles n Access public content including historical profiles, family trees, genealogy projects and surnamesThursday, February 2, 12
  39. 39. Getting Started with Geni Platform n Register as a developer n Create a new application n Use key and secret to get an access token n Use Geni’s API to create an amazing user experience n Publish your application in the application directoryThursday, February 2, 12
  40. 40. And One More Thing Geni platform is Open-Sourced!, February 2, 12
  41. 41. Thursday, February 2, 12