All MediaItem objects must belong to a Content Group. If you are intending to use yospaceCDS as an unstructured store, then you simply need to create a single Content Group in your account and assign all MediaItems to that. There is no limit to the number of MediaItem objects that can exist within a Content Group.
However, if you would like to output items from yospaceCDS within feeds (however for performance reasons, you should limit your output feeds to less than 1,000 items), then you will need to create the Content Groups you need, and assign these to the appropriate Output Feeds. More information can be found on our chapters covering Content Groups and Output Feeds.
The create MediaItem call supports the following parameters:
username)password)contentUrl)contentGroupId)hq)largeFormat)mimeType)rssPubDate)Dates are specified in the format as determined by xsd:dateTime which follows the form defined by Chapter 5.4 in ISO 8601, which is:
CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]
The time zone may be specified as Z (UTC) or (+|-)hh:mm. Time zones that aren't specified are considered undetermined.
Example valid timestamps are:
rssTitle)rssDescription)rssTeaserText)thumbnailUrl)usageProfileId)cuePoints)23.4, 102.3, 201.42yospaceCDS will ingest the content and make cut points at the specified times in the video. These cut points can then be used for mid-roll dynamic insertion of advertising.
metadata)fieldNamevalueURLstateChangeUrl)checksum)The following optional parameters can be set to apply adjustments to the content before it is ingested into the yospaceCDS. To use this settings, we recommend reading the separate article on Content Adjustment Settings.
aspectSwitchMethod)BOX, CROP, CROPNBOX and STRETCH. If not specified, the default value is CROPminAspectRatio and maxAspectRatio)deinterlaceContent)true or false.endCutSeconds)startCutSeconds)horizontalCropPercentage and verticalCropPercentage)thumbnailPointSeconds)volumeMultiplier)An example MediaItem creation request:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:createMediaItemRequest
xmlns:ns2="http://www.yospace.com/tundra/MediaItemManagement/">
<username>petshow</username>
<password>Wf</password>
<contentUrl>http://www.petshow.com/content/video.mov </contentUrl>
<contentGroupId>281928</contentGroupId>
<hq>true</hq>
<largeFormat>true</largeFormat>
<rssTitle>Dog Balancing Biscuit on Nose</rssTitle>
<rssDescription>Fido the dog balances
a chocolate digestive on his nose.</rssDescription>
<rssTeaserText></rssTeaserText>
<rssPubDate>17 March 2010 12:15:00 GMT</rssPubDate>
<thumbnailUrl>http://www.petshow.com/images/video.jpg </thumbnailUrl>
</ns2:createMediaItemRequest>
</soap:Body>
</soap:Envelope>
In the response, you will receive status code of your request, and if successful, the MediaItem ID. You can use this MediaItem in calls to the MediaItem Status and Deletion calls, as well as using to create your own Access URLs to create a single URL that all devices can use to access the video.
Possible status code (with descriptions) are as follows:
An example successful response is given below:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:createMediaItemResponse
xmlns:ns2="http://www.yospace.com/tundra/MediaItemManagement/">
<statusCode>200</statusCode>
<statusDescription>OK</statusDescription>
<mediaItemId>2131019</mediaItemId>
</ns2:createMediaItemResponse>
</soap:Body>
</soap:Envelope>
R2.4.1 of yospaceCDS introduced the ability to set metadata at the same time as creating the Media Item (previously, a separate call was required to set the metadata after creating it). Here is an example of the creation request including metadata fields.
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:createMediaItemRequest
xmlns:ns2="http://www.yospace.com/tundra/MediaItemManagement/">
<username>petshow</username>
<password>Wf</password>
<contentUrl>http://www.petshow.com/content/video.mov </contentUrl>
<contentGroupId>281928</contentGroupId>
<hq>true</hq>
<largeFormat>true</largeFormat>
<rssTitle>Dog Balancing Biscuit on Nose</rssTitle>
<rssDescription>Fido the dog balances
a chocolate digestive on his nose.</rssDescription>
<rssTeaserText></rssTeaserText>
<rssPubDate>17 March 2010 12:15:00 GMT</rssPubDate>
<thumbnailUrl>http://www.petshow.com/images/video.jpg </thumbnailUrl>
<metadata>
<fieldName>Type</fieldName>
<value>Report</value>
</metadata>
</ns2:createMediaItemRequest>
</soap:Body>
</soap:Envelope>
It is possible set the geo-restriction policy on an item via the Media Item API. yospaceCDS uses metadata fields to determine the geo-restriction policy for a given item, therefore to do this via the MediaItem API is simply a matter of setting these fields appropriately.
To be able to set the geo-restriction status of an item via this MediaItem API (or for that matter, via RSS input feeds), your account must have these fields defined within its Metadata Setup.
To understand how the geo restriction fields are defined, see the explanation on this page.
The following example assumes that the account is set-up with the fields Restriction and Restriction Relationship. Please note that when using the MediaItem API to define metadata fields, you should use the display name.
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:createMediaItemRequest
xmlns:ns2="http://www.yospace.com/tundra/MediaItemManagement/">
<username>petshow</username>
<password>Wf</password>
<contentUrl>http://www.petshow.com/content/video.mov </contentUrl>
<contentGroupId>281928</contentGroupId>
<hq>true</hq>
<largeFormat>true</largeFormat>
<rssTitle>Dog Balancing Biscuit on Nose</rssTitle>
<rssDescription>Fido the dog balances
a chocolate digestive on his nose.</rssDescription>
<rssTeaserText></rssTeaserText>
<rssPubDate>17 March 2010 12:15:00 GMT</rssPubDate>
<thumbnailUrl>http://www.petshow.com/images/video.jpg </thumbnailUrl>
<metadata>
<fieldName>Restriction</fieldName>
<value>ca us</value>
</metadata>
<metadata>
<fieldName>Restriction Relationship</fieldName>
<value>allow</value>
</metadata>
</ns2:createMediaItemRequest>
</soap:Body>
</soap:Envelope>