Version: 2011.01.25

Krames StayWell External Web Service Documentation

GetContent Method

This Method will return all the available data for a single content object in the UCR.

Parameters: XmlRequest
<GetContent ContentTypeId="[int]" ContentId="[string]" IncludeBlocked="[true, false]" GetOriginal="[true, false]" />

ContentTypeId is a numeric value which matches the content type of the content object that is being requested; for example: 1 for the Wellness Library.

ContentId is of course the content id for the content object being requested, and is a string value.

IncludeBlocked is a flag which indicates whether or not to include content that you have marked as blocked for your license. For example if you have marked a particular news article as blocked because it contains inappropriate content for your website, this flag will determine the presence of that article in the result. If you request a content object that is blocked, and mark IncludeBlocked as true, then the content object will be returned, but the root element will have a Blocked attribute that will have a value of “true”. If you mark IncludeBlocked as false, then the result of the GetContent call will be a “Content Not Found” error.

GetOriginal is a flag which will allow you to get the original version of the content object. If you have a custom version of a content object, you will normally see only the custom version in web service calls, but if you wish to see the original, then setting this flag to true will return the original content instead.

Sample Request

http://external.ws.staywell.com/[SiteName]/Content.svc/GetContent?xmlRequest=<GetContent ContentTypeId="22" ContentId="AsthmaCustom" IncludeBlocked="false" GetOriginal="false" />

In the result XML, the ViewCount attribute shows the number of times this particular content object has been requested through the GetContent method, not including the current call. For example, if the content had been viewed 10 times, the ViewCount attribute will have a value of 10, but the database entry will be updated to 11. Other methods that show ViewCount will also show the exact value from the database but only the GetContent method will increment the value after reading it.

Sample Result XML


<ContentList>
	<ContentObject ViewCount="2" ContentTypeId="22" ContentId="AsthmaCustom" IsCustom="true" Blocked="false" IsValid="true" CreatedDate="6/16/2010" ContentObjectType="Document" PublishedDate="9/17/2010">
		<Language Code="en">English</Language>
		<RegularTitle>Asthma - Custom Document</RegularTitle> 
		<Blurb><p>Test Blurb</p></Blurb> 
		<Keywords /> 
		<GenderCode>A</GenderCode> 
		<Rating Total="0" Count="0" Average="0" /> 
		<AgeGroups>
			<AgeGroup>Infant (0 - 11 mo)</AgeGroup> 
			<AgeGroup>Childhood (11 mo - 12 yrs)</AgeGroup> 
			<AgeGroup>Teen (12 - 18 yrs)</AgeGroup> 
			<AgeGroup>Adult (18+)</AgeGroup> 
			<AgeGroup>Senior</AgeGroup> 
		</AgeGroups>
		<CopyrightStatement /> 
		<PostingDate /> 
		<Content>
			<body>
				<h2>More Study Urged on Risks, Benefits of Earlier HIV Therapy</h2>
				<p>THURSDAY, July 15 (HealthDay News) -- Among HIV patients with a high level of CD4 immune cells, those who aren't taking antiretroviral therapy have a moderately increased risk of death, a new study has found.</p>
				<p>The researchers said their findings point to the need for continuing studies to examine the risks and benefits of starting antiretroviral therapy, or ART, for patients with high CD4 cell counts.</p>
				<p>As HIV infection progresses, CD4 cell levels decrease. Currently, treatment with ART is recommended when a patient's CD4 count drops below 350 cells per microliter.</p>
				...
				<p>SOURCE: <i>The Lancet</i>, news release, July 15, 2010</p>
			</body>
		</Content>
		<Disclaimer /> 
		<ReadingLevel /> 
		<Authors /> 
		<OnlineEditors /> 
		<OnlineMedicalReviewers /> 
		<PrintSources /> 
		<AdditionalTitles>
			<AdditionalTitle>AsthmaCustomAdditionalTitle1</AdditionalTitle> 
		</AdditionalTitles>
		<OnlineSources /> 
		<RecommendedSites /> 
		<OtherLanguages>
			<ContentObject Owner="UCR Web Service Unit Tests">
				<Language Code="es" Direction="ltr" /> 
				<RegularTitle>Asthma - Custom Document</RegularTitle> 
				<InvertedTitle /> 
				<Blurb><p>Test Blurb</p></Blurb> 
				<GenderCode>A</GenderCode> 
				<PostingDate>1/1/0001</PostingDate> 
			</ContentObject>
			<ContentObject Owner="UCR Web Service Unit Tests">
				<Language Code="fa" Direction="rtl" /> 
				<RegularTitle>Asthma - Custom Document</RegularTitle> 
				<InvertedTitle /> 
				<Blurb><p>Test Blurb</p></Blurb> 
				<GenderCode>A</GenderCode> 
				<PostingDate>1/1/0001</PostingDate> 
			</ContentObject>
		</OtherLanguages>
	  </ContentObject>
</ContentList>

Sample Result XML of Streaming Media Content

The new ClosedCaptions element complies with the W3C TTAF DXFS standard.

<?xml version="1.0" encoding="utf-8"?>
<ContentList xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<ContentObject ViewCount="5" ContentTypeId="138" ContentId="D1184" IsCustom="false" Blocked="false" IsValid="true" ThumbnailId="222842" CreatedDate="1/21/2011" ContentObjectType="StreamingMedia" PublishedDate="1/20/2011">
	<Language Code="en">English</Language>
	<RegularTitle>AC Arthritis</RegularTitle>
	<InvertedTitle />
	<Blurb>&lt;p&gt;Osteoarthritis of the AC joint in the shoulder is common in middle-aged or older adults. This video explains how this condition develops and how you can minimize its effects.&lt;/p&gt;</Blurb>
	<Keywords />
	<GenderCode>A</GenderCode>
	<Rating Total="0" Count="0" Average="0" />
	<CopyrightStatement>© 2000-2011 Krames StayWell, 780 Township Line Road, Yardley, PA 19067. All rights reserved. This information is not intended as a substitute for professional medical care. Always follow your healthcare professional's instructions.</CopyrightStatement>
	<PostingDate />
	<Transcript />
	<ClosedCaptions>
		<tt xml:lang="en" xmlns="http://www.w3.org/2006/10/ttaf1" xmlns:tts="http://www.w3.org/2006/10/ttaf1#styling">
			...
		</tt>
	</ClosedCaptions>
	<RunningTime>654</RunningTime>
	<Disclaimer />
	<ReadingLevel />
	<Authors />
	<OnlineEditors />
	<OnlineMedicalReviewers />
	<PrintSources />
	<AdditionalTitles />
	<OnlineSources />
	<RecommendedSites />
	<Indexing>
		<MeSHList>
			<MeSH Code="D000173" />
			<MeSH Code="D001168" />
		</MeSHList>
		<CPTList />
		<ICD9List>
			<ICD9 Code="716.91" />
		</ICD9List>
	</Indexing>
	<OtherLanguages />
	<Formats>
		<Format Url="rtmp://contentdelivery.com/video1.flv" MimeType="video/x-flv" AudioKbps="64" VideoKbps="568" Height="360" Width="640" />
		<Format Url="rtmp://contentdelivery.com/video1.mp4" MimeType="video/mp4" AudioKbps="64" VideoKbps="568" Height="360" Width="640" />
	</Formats>
	</ContentObject>
</ContentList>