TopLevel getRecordXml.php - jcobban/Genealogy GitHub Wiki

Up: Top Level Implementation

Source Code

This script provides the ability for the dynamic code of any web page to obtain the contents of almost all of the records in the database provided by this site as an XML document.

The user must be signed in as a user to use this feature. The contents of the response to a request depends upon the level of authorization of the requesting user. In particular a requesting user can only see information that the user is authorized to see. For example private information about an individual in the family tree is only visible to members of that individual's family who have been granted that privilege.

The parameters are passed by method=get are:

name description
'table' the name of the table to be read.
'id' unique key of auto-increment table
'domain' default 'CAON'
'year' registration year
'number' registration number within the year
'county' county abbreviation
'townshipcode abbreviation
'townshipname full name
'volume' volume number for vital statistics
'reportno' report number within volume of county marriage
'reports'
'itemno' item within a county marriage report
'iduser' key of Users table
'idblog' key of Blogs table
'censusid' identifier of a census, usually country code plus enumeration year
'district' numeric district within census
'subdistrict' sub-district within district
'division' enumeration division if required
'page' page number
'line' line number within page
'offset' starting offset in results
'limit' max number of records to return
other field name within database, e.g. surname

The parameters which must be specified to identify a specific record depend upon the table.

table Content keys
'Addresses' records representing a fully structured postal address. For example this is used for the addresses of repositories. This table is implied if the idar parameter is specified. For further information see class Address id or idar
'PictureBases' records representing a folder on the Web which contains images. id or idbp
'Pictures' records representing images. id or idbr
'Children' records representing the relationship between a Child and a Family id or idcr
'DontMergeEntries' pairs of Persons who are not to be accidentally merged idirleft and idirright
'Events' facts or events id or ider
'Bookmarks' id or idhb
'HistoryList' id or idar
'Header' general information about the database no parameters required
'Persons' individuals in the family tree id or idir
'Locations' locations of facts or events id or idlr
'Families' connect two spouses in a relationship id or idmr
'Surnames' a family name surname
'Names' name by which a Person is known id or idnx
'Nicknames' alternate spellings of given names for searching nickname
'Sources' source documents id or idsr
'Citations' citations to source documents id or idsx
'Temples' LDS temples for sacraments id or idtr
'RemovedPersons' no longer used keys of Persons id or idxi
'RemovedFamilies' no longer used keys of Fammilies id or idxm
'Users' registered contributors id or username
'Blogs' messages bl_index
'MethodistBaptisms' baptism transcriptions id or idmb
'Births' birth transcriptions domain, year, regnum
'Deaths' death transcriptions domain, year, regnum
'Marriages' marriage transcriptions domain, year, regnum
'CountyMarriages' marriage transcriptions Domain, Volume, ReportNo, ItemNo
'CountyMarriageReports' reports of marriage transcriptions Domain, Volume, ReportNo
'Countries' countries code
'Domains' sub-national administration unit domain
'Counties' counties within a Domain domain, county
'Townships' unit within a county domain, county, code
'Censuses' census enumeration censusid
'Districts' top level organization of census censusid, district
'Subdistricts' enumeration divisions censusid, district, subdistrict, division
'Pages' pages within a division censusid, district, subdistrict, division, page
'Census.....' individuals lines within a page censusid, district, subdistrict, division, page, line

For some tables if the lowest level identifier is omitted then the output will include all of the records at that level.

For example:

getRecordXml.php?table=Picture&idtype=0&idir=5 displays all pictures associated with individual 5.

getRecordXml.php?table=Counties&domain=USMI displays all counties in Michigan.

getRecordXml.php?table=Census1881&district=59&subdistrict=A&division=2&page=7 displays all of the transcribed lines from the identified page of the 1881 census of Canada.

Next: LanguagesEdit.php