Community articleGetting photos and videos feed
Added by IBM contributorIBM on March 27, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Get a feed of photos and videos in the Media Gallery

Get a feed that lists the photos and videos in a Media Gallery. All photos and videos stored in the Media Gallery are associated with a CMIS object type, which has a unique 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".
 

Input
Method URI Description
GET /files/{authType}/anonymous/cmis/repository/{repositoryId}/query URL to retrieve files when accessing as an anonymous user
You can derive the URL from the service document's query template. Use the web address specified in the element that has a sibling query element.
GET /files/{authType}/cmis/repository/{repositoryId}/query URL to retrieve files when accessing as a logged in user
You can derive the URL from the service document's query template. Use the web address specified in the element that has a sibling query element.
Name Type Optional Description
repositoryId
string No ID of the repository containing the media content
authType
enumerated No Authentication type
Authorized values:
  • basic
  • form
  • oauth
Name Type Optional Description
includeAdditionalAllowableActions
boolean Yes Boolean. Specifies whether to return the actions the current user is allowed to perform on each of the entries in the response.
includeAddtionalObjectsById
string Yes String. Use the value "snx:files"
maxItems
int Yes Integer. Represents the maximum number of entries to return
orderBy
string Yes String. Represents the field to use for ordering and the sort order. (Example: "snx:contentStreamLastModified DESC")
q
string Yes String. Represents the CMIS query to use to retrieve the entries.(Example:
"SELECT cmis:name,cmis:lastModifiedBy,snx:contentStreamLastModified,
cmis:contentStreamId,cmis:objectTypeId,cmis:objectId,
cmis:contentStreamLength,snx:commentCount,snx:downloadCount
FROM snx:file
WHERE cmis:objectTypeId IN ('{photoObjectTypeId}', '{videoObjectTypeId}') ORDER BY snx:contentStreamLastModified DESC")
Note: Replace {photoObjectTypeId} and {videoObjectTypeId} with the CMIS object id that your Media Gallery has been configured to use. Only include the CMIS object id of the types that you would like to retrieve.
renditionFilter
string Yes String. Use the value "*" to return all preview thumbnails associated with each entry.
Output
Content Type: application/atom+xml