Person.Search

Summary

Returns people that match the given criteria in their username, email address, first or last name.

Signatures

Web Service Method Signature
PersonPagedResults Search(string apiKey, string site, string criteria, int pageSize, int pageNumber)
REST Signature
/rest/person/Search?apiKey={apiKey}&site={site}&criteria={criteria}&pageSize={pageSize}&pageNumber={pageNumber}

Return Value

The people that match the search criteria.

Arguments

apiKey

Your API key. For more information see here.

site

The site the API should be executed against, e.g. www.ditto.net.

criteria

The criteria to search for.

pageSize (Optional)

The size of the page of data to return.

If this argument is omitted, it defaults to 10.

The minimum allowed value is 1 and the maximum is 50.

pageNumber (Optional)

The page number of the results to return.

If this argument is omitted or set to less than 1, it defaults to 1.

REST Example

http://api.ditto.net/rest/person/Search?apiKey=xxxx&site=www.ditto.net&criteria=James&pageSize=3

Response Example

<PersonPagedResults xmlns="http://www.ditto.net" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<PageNumber>0</PageNumber>
	<PageSize>3</PageSize>
	<Results>
		<Person>
            <DittoUrl>http://www.ditto.net/Members/jamesbondguy/</DittoUrl>
			<Id>1417</Id>
			<Slug>jamesbondguy</Slug>
			<UserName>jamesbondguy</UserName>
		</Person>
		<Person>
            <DittoUrl>http://www.ditto.net/Members/James/</DittoUrl>
			<Id>50</Id>
			<Slug>James</Slug>
			<UserName>James</UserName>
		</Person>
		<Person>
            <DittoUrl>http://www.ditto.net/Members/JamesCounter/</DittoUrl>
			<Id>82</Id>
			<Slug>JamesCounter</Slug>
			<UserName>James Counter</UserName>
		</Person>
	</Results>
	<TotalResultCount>36</TotalResultCount>
</PersonPagedResults>