This Method will return a small amount of meta-data for each content object that matches the supplied criteria. For a content object to be included, it must match all of the specified criteria. For multi-valued criteria, the content object must match at least one of the supplied values. For instance if two age groups are supplied in the criteria, a content object matches if it is mapped to either one or both of the age groups even if it is also mapped to additional age groups.
Please note that if the search criteria identifies a large result set you should expect a longer response time. Adding or refining the search paramters will shorten the response time.
Parameters: XmlRequest
<SearchCriteria ReturnAdditionalTitles="[true, false]" IncludeBlocked="[true, false]" SortBy="[Rating, ViewCount, PublishedDate, Title]" SortDirection="[Ascending, Descending]" >
<Paging PageSize="[int]" PageNumber="[int]" />
<FullText LogicalOperator="[And,Or]">[string(s)]</FullText>
<ByTitle IncludeAdditionalTitles="[true, false]">[Title]</ByTitle>
<ByLetter IncludeAdditionalTitles="[true, false]">[Single Character]</ByLetter>
<PostingDate>[Date (yyyy-mm-dd)]</PostingDate>
<EndPostingDate>[Date (yyyy-mm-dd)]</EndPostingDate>
<Language Code="[en,es]"/>
<Gender>[All, Male, Female]</Gender>
<AgeGroups>
<AgeGroup>[Infant (0 - 11 mo), Childhood (11 mo - 12 yrs), Teen (12 - 18 yrs), Adult (18+), Senior]</AgeGroup>
</AgeGroups>
<ContentTypes>
<ContentType ContentTypeId="[int]"/>
<ContentType ContentTypeId="[int]"/>
</ContentTypes>
<Subtopics>
<Subtopic RootSubtopicId="[int]"/>
<Subtopic RootSubtopicId="[int]"/>
<Subtopic SubtopicId="[int]"/>
<Subtopic SubtopicId="[int]"/>
</Subtopics>
<MeSHList>
<MeSH Code="[MeSH Code]"/>
<MeSH Code="[MeSH Code]"/>
</MeSHList>
<ICD9List>
<ICD9 Code="[ICD9 Code]"/>
<ICD9 Code="[ICD9 Code]"/>
</ICD9List>
<CPTList>
<CPT Code="[CPT Code]"/>
<CPT Code="[CPT Code]"/>
</CPTList>
<Servicelines>
<Serviceline ServicelineKeyword="[string]" PageKeyword="[string]" Audience="[string]" />
</Servicelines>
</SearchCriteria>
At least one of the SearchCriteria child elements is required; a request with just <SearchCriteria /> will result in an error. The order of the elements is not important.
The optional ReturnAdditionalTitles attribute will add a content object's AdditionalTitles to the returned XML if its' value is set to "true". If this attribute is not included, the value is assumed to be "false".
The optional IncludeBlocked attribute will cause the results to include content that is licensed to, but have been blocked by, the client. If this attribute is not included, the default value is "false". It may be useful to include blocked content in search results for client-based administrative or monitoring tools, but generally not for end-user applications.
The optional SortBy and SortDirection attributes are used to return a specific sorting of the content when doing a FullText search. Options for SortBy are Rating, ViewCount, PublishedDate and Title. By default all but Title are sorted in descending order. To return a different sort direction use SortDirection with the value of either Ascending or Descending. If SortDirection is provided without a SortBy then this attribute is ignored.
Search Request template
http://external.ws.staywell.com/[SiteName]/Content.svc/SearchContent?xmlRequest=[SearchCriteria]
Sample values for [SearchCriteria]
Return all licensed content containing the words "pain" and "angina"
<SearchCriteria><FullText LogicalOperator="And">pain angina</FullText></SearchCriteria>
Return all licensed content containing either "pain" or "angina" or both:
<SearchCriteria><FullText LogicalOperator="Or">pain angina</FullText></SearchCriteria>
Return all licensed content containing "heart" in the title:
<SearchCriteria><ByTitle>heart</ByTitle></SearchCriteria>
Return all licensed content of ContentType 1 or 2:
<SearchCriteria><ContentTypes><ContentType ContentTypeId="1"/><ContentType ContentTypeId="2"/></ContentTypes></SearchCriteria>
Return all licensed content with a PostingDate of January 1, 2004:
<SearchCriteria><PostingDate>2004-01-01</PostingDate></SearchCriteria>
Return all licensed content of ContentType 1 containing "heart" in the title and "pain" in the body:
<SearchCriteria><ContentTypes><ContentType ContentTypeId="1"/></ContentTypes><Title>heart</Title> <FullText LogicalOperator="And">pain</FullText></SearchCriteria>
Return all licensed content in the Diseases and Conditions Encyclopedia collection (RootSubtopicId 32) with the string "eat" in the title:
<SearchCriteria> <ByTitle>eat</ByTitle> <Subtopics> <Subtopic RootSubtopicId="32"/> </Subtopics> </SearchCriteria>
Sample Search Request
http://external.ws.staywell.com/[SiteName]/Content.svc/SearchContent?xmlRequest=<SearchCriteria><ByTitle>heart</ByTitle></SearchCriteria>
Sample Result XML
<?xml version="1.0" encoding="utf-8"?>
<ContentList PageNumber="1" PageSize="10" TotalPages="5" TotalContent="53">
<ContentObject ContentObjectType="Document" ContentTypeId="1" ContentId="1" IsCustom="false" ViewCount="6">
<Language Code="en"/>
<RegularTitle>Helping the Heart Through Cardiac Rehab</RegularTitle>
<Gender>All</Gender>
<Rating Count="1" Total="4" Average="4" />
</ContentObject >
<ContentObject ContentObjectType="StreamingMedia" ContentTypeId="1" ContentId="12" IsCustom="false" RunningTime="120" ViewCount="6">
<Language code="en"/>
<RegularTitle>Heart Quiz for Women Only</RegularTitle>
<Blurb>
<p>What do you know about a woman's heart?</p>
</Blurb>
<Gender>Female</Gender>
<Rating Count="1" Total="4" Average="4" />
</ContentObject >
<ContentObject ContentObjectType="Document" ContentTypeId="6" ContentId="514918" IsCustom="false" ViewCount="6">
<Language code="en"/>
<RegularTitle>New Hope for People With Heart Failure</RegularTitle>
<Gender>All</Gender>
<PostingDate>2003-09-03T00:00:00.0000000-06:00</PostingDate>
<Rating Count="1" Total="4" Average="4" />
</ContentObject >
<ContentObject ContentObjectType="StreamingMedia" ContentTypeId="22" ContentId="ClientHeart" ThumbnailId="1234" RunningTime="680" IsCustom="true" Owner="ClientSiteName" RunningTime="120" ViewCount="6">
<Language code="en"/>
<RegularTitle>Visit Our Heart Health Center</RegularTitle>
<Gender>All</Gender>
<Rating Count="1" Total="4" Average="4" />
</ContentObject >
</ContentList >