Creating a video thumbnail
Added by IBM contributorIBM | Edited by Claudia R Elbourn on July 7, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Associate a preview image with a video.

Preview thumbnails are not generated for videos that are uploaded. Therefore, using the Atom Publishing Protocol, also known as AtomPub, you can associate a thumbnail preview image with a video. You may not use this to update the preview image associated with a photo.

 

Discoverability

You can derive the URL from the video document entry. Use the web address specified as the "href" attribute of the "<link rel="http://www.ibm.com/xmlns/prod/sn/cmis/multipart-form/object">" element.

 

Input
Method URI Description
POST /files/{auth}/cmis/repository/{repositoryId}/mobject/{objectId} URL to associate a preview image with a video
You can derive the URL from the video document entry. Use the web address specified as the "href" attribute of the "<link rel="http://www.ibm.com/xmlns/prod/sn/cmis/multipart-form/object">" element.
Content Type: application/atom+xml
Use the table below that represents the expected fields:
Name Type Optional Description
snx:rendition.0.file
string Yes This is the photo data.
snx:rendition.0.title
string Yes String. Use the value "video_preview.jpg"
snx:rendition.0.kind
string Yes String. Use the value "cmis:renditionTemplate"
snx:numRenditions
int Yes Integer. Use the value "1"
snx:deleteRenditions
string Yes String. Use the value "*"
cmis:changeToken
string Yes String. Time of change (Example: 2012-08-07T20:11:34.990Z )
cmis:objectId
string Yes String. Use the "id" of the file to attach the preview image to
cmis:baseTypeId
string Yes String. Use the value "cmis:document"
cmis:objectTypeId
string Yes String. Use the id of the cmis object type you have associated with a video if uploading a video or photo if uploading a photo. See more details on CMIS object types by going to Retrieving CMIS Object Type properties.
snx:tags
string Yes String. Provide a space separated list of tags
Name Type Optional Description
repositoryId
string No ID of the repository containing the media content
objectId
string Yes Object ID. By default the Media Gallery provides and uses a "Social Photo" object type with a CMIS id of "ada30772-31fe-44bf-b8b4-dd7e4f072cd6" and a "Social Video" object type with a CMIS id of "ada30772-31fe-44bf-b8b4-dd7e4f072ad6".
auth
enumerated No The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
Name Type Optional Description
nonce
string Yes String. See Retrieving Nonce and User id for how to retrieve the nonce value.
opId
string Yes String. Use the value "upload_attachment,video_preview.jpg,{numericalDateRepresentation}". Replace {numericalDateRepresentation} with a number that represents the current timestamp.
Name Type Optional Description
X-Method-Override
string Yes String. Use value "PUT".
If-Match
string Yes String. Use the value "uid={userId}" where{userId} is the id of the user adding the preview image.
X-Update-Nonce
string Yes String. See Retrieving Nonce and User id for how to retrieve the nonce value.
Authorization
enumerated No The authentication mechanism selected by your application to access the API.
Basic is the Base64 encoding of the IBM Connections Cloud username and password: Base64(username:password). For example, Base64(twatson@us.ibm.com:password).
Bearer is the oauth 2.0 access token that is generated when the user grants your application access to IBM Connections Cloud services.
See the reference topic "OAuth 2.0 APIs for web server flow" for more information.
Authorized values:
  • bearer
  • basic
Output
Code Description
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.