Version: 2011.01.25

Krames StayWell External Web Service Documentation

GetRelatedContent Method

This Method will return a small amount of meta-data for each content object that is related to the content object or MeSH IDs sent to the method. Each content object in the UCR has been mapped to one or more MeSH Unique IDs, and these IDs are used to relate the content objects returned by this method. The ranking number will range from 1 to 5, with 1 being the most related and 5 being the least.

Parameters: XmlRequest
<RelatedContentRequest IncludeBlocked="[true, false]" GetOriginal="[true, false]">
	<MeSHList>
		<MeSH Code="[MeSHUniqueID]"/>
		<MeSH Code="[MeSHUniqueID]"/>
	</MeSHList>
	<Language Code="[LanguageCode]"/>
</RelatedContentRequest >
	
or

<RelatedContentRequest IncludeBlocked="[true, false]" GetOriginal="[true, false]">
	<ContentObject ContentTypeId="[int]" ContentId="[string]"/>
	<Language Code="[LanguageCode]"/>
</RelatedContentRequest >
		
		

Use either the MeSHList element or the ContentObject element, but not both. (If both are used, the MeSHList element will be applied, the other will be ignored.)

  • The attributes in the RelatedContentRequest element are optional.
  • The MeSHList can contain any number of MeSH elements.
  • The attributes in the ContentObject element are all required.

The Language element is optional. If it is supplied, the search will be limited to content in the identified language. If ContentObject is supplied but Language is not, the search will be limited to content objects in the same language as the language of the identified content object.

The code attribute in the Language element accepts an ISO standard language code: "en" for English, "es" for Spanish, etc. See Language Codes for a list of currently available language codes.

Sample Request

http://external.ws.staywell.com/[SiteName]/Content.svc/GetRelatedContent?xmlRequest=<RelatedContentRequest IncludeBlocked="false" GetOriginal="false"><MeSHList><MeSH Code="D039401"/></MeSHList><Language Code="en"/></RelatedContentRequest>

Sample Result XML

<?xml version="1.0" encoding="utf-8" ?>
<ContentList>
	<ContentObject ViewCount="0" ContentTypeId="3" ContentId="82262" IsCustom="false" blocked="false" Rank="1" ContentObjectId="0" ContentObjectType="Document">
		<Language Code="en"/>
		<RegularTitle>The truth about smoking</RegularTitle>
	</ContentObject>
</ContentList>