Search

Description

The Search operation allows for advanced searching of the OneGreatFamily system. Search request details are specified in a SearchRequest structure.

Version

2011-02-02

URI

REST URI [POST]:
/v11.02/Search.svc/Search?SessionId={SessionId}

Content-Type: Application/xml

Example

Request POST
http://wsdev.onegreatfamily.com/v11.02/Search.svc/Search?SessionId=gl4q23cwofpshi55sg1dvc3o
Request Headers
Content-Type: Application/xml
Request Payload
<SearchRequest xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<FirstName>John</FirstName> 
	<MiddleName></MiddleName> 
	<Surname>Smith</Surname> 
	<FirstNameAlternatesInclude>true</FirstNameAlternatesInclude> 
	<SurnameAlternatesInclude>true</SurnameAlternatesInclude> 
	<BirthPlace>San Fransisco, CA, USA</BirthPlace> 
	<BornCountsInclude>true</BornCountsInclude> 
	<CensusCountsInclude>true</CensusCountsInclude> 
	<DateStart>1 Jan 1910</DateStart> 
	<DateEnd>1 Dec 1910</DateEnd> 
	<DeathDateStart>1 Jan 1990</DeathDateStart> 
	<DeathDateEnd>1 Dec 1990</DeathDateEnd> 
	<DeathPlace></DeathPlace> 
	<DetailsInclude>true</DetailsInclude> 
	<FamilyTreeNamesInclude>true</FamilyTreeNamesInclude> 
	<Gender>male</Gender> 
	<RowIndexStart>0</RowIndexStart> 
	<RowsMaximum>50</RowsMaximum> 
	<SSDINamesInclude>true</SSDINamesInclude> 
	<SummaryInclude>true</SummaryInclude> 
</SearchRequest>
Success Response Payload
<SearchResults xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<AlternateDetails>
		<SearchResultEntry>
			<Ogfn>123456</Ogfn> 
			<Name>Smith, John</Name> 
			<BirthDateString>1 Jan 1910</BirthDateString> 
			<BirthPlaceString>Manhatten, New York County, NY, USA</BirthPlaceString> 
			<DeathDateString>1 Jan 1980</DeathDateString> 
			<DeathPlaceString>Manhatten, New York County, NY, USA</DeathPlaceString> 
			<Gender>Male</Gender> 
		</SearchResultEntry>
	</AlternateDetails>
	<AlternateNames xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
		<a:string>John Smythe</a:string> 
		<a:string>Jon Smith</a:string> 
	</AlternateNames>
	<OGFDetails>
		<SearchResultEntry>
			<Ogfn>123456</Ogfn> 
			<Name>Smith, John</Name> 
			<BirthDateString>1 Jan 1910</BirthDateString> 
			<BirthPlaceString>Manhatten, New York County, NY, USA</BirthPlaceString> 
			<DeathDateString>1 Jan 1980</DeathDateString> 
			<DeathPlaceString>Manhatten, New York County, NY, USA</DeathPlaceString> 
			<Gender>Male</Gender> 
		</SearchResultEntry>
	</OGFDetails>
	<SSDIDetails>
		<SearchResultEntry>
			<Ogfn>123456</Ogfn> 
			<Name>Smith, John</Name> 
			<BirthDateString>1 Jan 1910</BirthDateString> 
			<BirthPlaceString>Manhatten, New York County, NY, USA</BirthPlaceString> 
			<DeathDateString>1 Jan 1980</DeathDateString> 
			<DeathPlaceString>Manhatten, New York County, NY, USA</DeathPlaceString> 
			<Gender>Male</Gender> 
		</SearchResultEntry>
	</SSDIDetails>
	<Summary>
		<Born1500>100</Born1500> 
		<Born1600>125</Born1600> 
		<Born1700>150</Born1700> 
		<Born1800>175</Born1800> 
		<Born1900>25</Born1900> 
		<BornBefore1500>1000</BornBefore1500> 
		<BornUnknown>20</BornUnknown> 
		<Census1990ApproxCount>5000</Census1990ApproxCount> 
		<OGFCountApprox>10000</OGFCountApprox> 
		<SSDICount>6000</SSDICount> 
	</Summary>
</SearchResults>
Fault Response Payload
<RestFault xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<ErrorCode>551</ErrorCode>
	<FaultMessage>An unhandled exception has occurred</FaultMessage>
</RestFault>

Query String Parameters

Name Description Required

SessionId

The current session Id

Type: string

Default: None

Yes

Post Payload

Name Required

SearchRequest

The search request aggregate.

Type: SearchRequest

Default: None

Constraints: Must be a valid SearchRequest aggregate.

Yes

Response Elements

Name Description

SearchResults

This operation returns a SearchResult aggregate upon success. Otherwise an error is returned.

Type: SearchResult

HTTP Status Code

The Web Server returns a status code which indicates if the operation was successful. Anything other than 200 should be regarded as a failure.

HTTP Status Code of 417

The Web Server threw an exception and contains a RestFault aggregate. Retrieve the RestFault from the Webexception response property.