Community articleGetting a feed of file shares
Added by IBM contributorIBM | Edited by IBM contributorLorenzo Boccaccia on December 19, 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 that lists the share entries. A share entry describes an instance in which access that has been given to a file.




Gets a feed of file entries that are shared. By default it lists file entries that have been shared by you, but the API can also return file entries that have been shared to you, using the inbound parameter.
 

Authentication

You must authenticate this request.

Request parameters


Use one or more of the input parameters to narrow the search. Separate multiple parameters with an ampersand (&).
 

Note: You can find out a person's user ID by retrieving the person's profile feed or by Retrieving the Profiles service document. See Searching for a user's profile for more information.

 


Getting a feed of file shares (2.5)
Gets a feed of file entries that are shared. This API has been superseded by the newer API documented in the topic Getting a feed of file shares. It is provided here for backwards compatibility.
Input
Method URI Description
GET /files/basic/api/documents/shared/feed Get a feed that lists the share entries. A share entry describes an instance in which access that has been given to a file.
This returns a feed of shares to which the authenticated user has access.
Name Type Optional Description
direction
enumerated Yes Specifies which files to return. Options are:
inbound
Files shared with you.
outbound
Files you have shared.
The default value is inbound.
Authorized values:
  • inbound
  • outbound
includePath
boolean Yes If set to true , an entry extension <td:path> that specifies the path to the object is returned in the resulting feed. This parameter takes a Boolean value of either true or false. By default, the path information is not returned.
page
int Yes Page number. Specifies the page to be returned. The default value is 1, which returns the first page.
When using pagination the link to the next page is available in the feed as an entry of type link having an attribute rel of value next.
ps
int Yes Page size. Specifies the number of entries to return per page. The default value is 10. The maximum value you can specify is 500.
Note: This parameter replaces the pageSize parameter. The pageSize parameter is supported for backwards compatibility only; it will be deprecated in a future release.
sC
enumerated Yes Specifies which type of item to sort by the returned feed. Options are:
document
Represents a file.
docshare
Represents a share.
The type you specify using this parameter affects the available options for the sortBy parameter and how are considered in sorting
Authorized values:
  • document
  • docshare
search
string Yes Filter the list of results based on the specified string. The 'includePath', 'category' and 'tag' parameters are ignored if this parameter is specified. This value is only supported when the direction parameter is not specified or equal to 'inbound'.
sharedBy
string Yes User ID. Filter the list of results by the creator of the share. When unspecified the API returns all shared files regardless of the person who created it.
sharedWith
string Yes User ID. Filter the list of results based on a person with whom the file has been shared. When unspecified the API returns all shares regardless of the person it was shared with. If direction=inbound is also specified, this parameter is ignored. Does not support multivalue.
sharePermission
enumerated Yes Filters the list of results based on the permission level granted in the share. The options are Edit or View. When unspecified the API returns all shares regardless of the permissions.
Authorized values:
  • Edit
  • View
sl
int Yes Start index. Specifies the start index (number) in the collection from which the results should be returned. This parameter is ignored if a page parameter is provided.
sortBy
enumerated Yes Specifies what to sort the returned entries by. The options depend on the value you specify in the sC parameter.
If sC=docshare, meaning you want to sort by the files share attribute, the options are:
author
Sorts the entries alphabetically by the name of the author of the item.
created
Sorts the entries by the date the item was created.
createdBy
Sorts the entries alphabetically by the name of the user who created the item.
published
Sorts the entries by the date the item was published (usually related to atom:published element).
sharedBy
Sorts the entries alphabetically by the name of the person who shared the item.
sharedWith
Sorts the entries alphabetically by the name of the person with whom the item was shared.
The default value for shares is created.
If sC=document, meaning you want to sort by files attributes, the options are:
commented
Sorts the entries by the number of comments or replies an item has received.
created
Sorts the entries by the date the item was created.
downloaded
Sorts the entries by the number of times the item was downloaded.
label
Sorts alphabetically by the label.
length
Sorts the entries by the size of the file.
modified
Sorts the entries by the last modified date.
published
Sorts the entries by the date the item was published (usually related to atom:published element).
recommended
Sorts the entries by the number of times the item was recommended.
title
Sorts the entries alphabetically by title. The title used is the text that is displayed in the <title> element of each entry in the feed.
totalMediaSize
Sorts the entries by the size of the media associated with the item.
updated
Sorts the entries by the last time the item was updated.
The default value for files is modified.
Authorized values:
  • author
  • created
  • createdBy
  • published
  • sharedBy
  • sharedWith
  • commented
  • created
  • downloaded
  • label
  • length
  • modified
  • published
  • recommended
  • title
  • totalMediaSize
  • updated
sortOrder
enumerated Yes Specifies the order in which to sort the results. The options are:
asc
Sorts the results in ascending order.
desc
Sorts the results in descending order.
If a value is specified for the sortBy parameter, but none is specified for this parameter, then this parameter defaults to asc. If neither is specified, this parameter defaults to desc.
Authorized values:
  • asc
  • desc
tag
string Yes Filters the list of results by tag. To specify multiple tags, either separate the tag names with commas or provide the tag parameter multiple times. Providing more than one tag has the effect of an AND operator.
visibility
enumerated Yes Defines who has access to the files. Options are: public or private. If you set this parameter equal to public, only public files are returned. If you set this parameter equal to private, only private files are returned.
Authorized values:
  • public
  • private
Output
Content Type: application/atom+xml
Code Description
200
OK. Indicates that the request was received successfully.
401
Unauthorized. Returned when the request is not authenticated.
400
Bad Request. Returned when the API cannot parse the request parameters.
Examples
Returns all file that have been shared to the authenticated user and which the user can edit. Notice the uppercase in the sharePermission parameter Edit
GET https://apps.na.collabserv.com//files/basic/api/documents/shared/feed?direction=outbound&Remove%20sharePermission=Edit

Response returned by the server
<feed xmlns="http://www.w3.org/2005/Atom"
  xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
  xmlns:snx="http://www.ibm.com/xmlns/prod/sn" xmlns:td="urn:ibm.com/td" xmlns:thr="http://purl.org/syndication/thread/1.0">
  <id>urn:lsid:ibm.com:td:documents</id>
  <link
    href="https://apps.na.collabserv.com/files/basic/api/documents/feed" rel="self"/>
  <title type="text">Files Shared By You</title>
  <updated>2014-12-19T10:06:16.354Z</updated>
  <generator uri="http://www.ibm.com/xmlns/prod/sn" version="5.0.0.0">IBM Connections - Files</generator>
  <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/item">2</snx:rank>
  <opensearch:totalResults>2</opensearch:totalResults>
  <entry>
    <id>urn:lsid:ibm.com:td:7ad60c3e-5e65-4775-b379-4893ac2aa649</id>
    <td:uuid>7ad60c3e-5e65-4775-b379-4893ac2aa649</td:uuid>
    <td:label>test file.txt</td:label>
    <link
      href="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/7ad60c3e-5e65-4775-b379-4893ac2aa649/entry" rel="self"/>
    <link
      href="https://apps.na.collabserv.com/files/app/file/7ad60c3e-5e65-4775-b379-4893ac2aa649"
      rel="alternate" type="text/html"/>
    <link
      href="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/7ad60c3e-5e65-4775-b379-4893ac2aa649/entry" rel="edit"/>
    <link
      href="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/7ad60c3e-5e65-4775-b379-4893ac2aa649/media" rel="edit-media"/>
    <link
      href="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/7ad60c3e-5e65-4775-b379-4893ac2aa649/media/test%20file.txt"
      hreflang="en" length="0" rel="enclosure" title="test file.txt" type="text/plain"/>
    <link href="" rel="thumbnail"/>
    <category label="document" scheme="tag:ibm.com,2006:td/type" term="document"/>
    <link
      href="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/7ad60c3e-5e65-4775-b379-4893ac2aa649/feed"
      rel="replies" thr:count="1" type="application/atom+xml" xmlns:thr="http://purl.org/syndication/thread/1.0"/>
    <author>
      <name>Frank Adams</name>
      <snx:userid>20547574</snx:userid>
      <snx:orgId>20542369</snx:orgId>
      <snx:orgName>IBM Test - SDK Renovations</snx:orgName>
      <email/>
      <snx:userState>active</snx:userState>
    </author>
    <title type="text">test file.txt</title>
    <published>2014-08-05T08:57:17.259Z</published>
    <updated>2014-12-05T11:42:05.845Z</updated>
    <td:created>2014-08-05T08:57:17.259Z</td:created>
    <td:modified>2014-08-05T09:57:54.571Z</td:modified>
    <td:lastAccessed/>
    <td:modifier>
      <name>Frank Adams</name>
      <snx:userid>20547574</snx:userid>
      <snx:orgId>20542369</snx:orgId>
      <snx:orgName>IBM Test - SDK Renovations</snx:orgName>
      <email/>
      <snx:userState>active</snx:userState>
    </td:modifier>
    <td:shared>2014-08-05T08:57:17.388Z</td:shared>
    <td:visibility>shared</td:visibility>
    <snx:isExternal>true</snx:isExternal>
    <td:libraryId>72340930-3547-4a94-8b8c-f19e87283606</td:libraryId>
    <td:libraryType>personalFiles</td:libraryType>
    <td:isSyncable>false</td:isSyncable>
    <td:policy>
      <td:organizationPublic>true</td:organizationPublic>
      <td:contentFollowing>true</td:contentFollowing>
    </td:policy>
    <td:versionUuid>e2edb799-1d40-45fb-a1a2-1bb0775da5e3</td:versionUuid>
    <td:versionLabel>3</td:versionLabel>
    <td:propagation>false</td:propagation>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/recommendations">0</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/comment">1</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/share">2</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/collections">0</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/attachments">0</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/versions">3</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/references">0</snx:rank>
    <td:totalMediaSize>0</td:totalMediaSize>
    <summary type="text"/>
    <content
      src="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/7ad60c3e-5e65-4775-b379-4893ac2aa649/media" type="text/plain"/>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/hit">23</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/anonymous_hit">0</snx:rank>
    <td:restrictedVisibility>false</td:restrictedVisibility>
    <td:objectTypeName>snx:file</td:objectTypeName>
    <td:lock type="NONE"/>
    <snx:encrypt>false</snx:encrypt>
    <snx:isExternal>true</snx:isExternal>
    <snx:orgId>20542369</snx:orgId>
    <snx:orgName>IBM Test - SDK Renovations</snx:orgName>
  </entry>
  <entry>
    <id>urn:lsid:ibm.com:td:f6f6418b-bf34-40d7-8b75-2d6e100e7f81</id>
    <td:uuid>f6f6418b-bf34-40d7-8b75-2d6e100e7f81</td:uuid>
    <td:label>Updated Label</td:label>
    <link
      href="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/f6f6418b-bf34-40d7-8b75-2d6e100e7f81/entry" rel="self"/>
    <link
      href="https://apps.na.collabserv.com/files/app/file/f6f6418b-bf34-40d7-8b75-2d6e100e7f81"
      rel="alternate" type="text/html"/>
    <link
      href="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/f6f6418b-bf34-40d7-8b75-2d6e100e7f81/entry" rel="edit"/>
    <link
      href="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/f6f6418b-bf34-40d7-8b75-2d6e100e7f81/media" rel="edit-media"/>
    <link
      href="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/f6f6418b-bf34-40d7-8b75-2d6e100e7f81/media/Updated%20Label"
      hreflang="en" length="896062" rel="enclosure"
      title="Updated Label" type="binary/octet-stream"/>
    <link href="" rel="thumbnail"/>
    <category label="document" scheme="tag:ibm.com,2006:td/type" term="document"/>
    <link
      href="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/f6f6418b-bf34-40d7-8b75-2d6e100e7f81/feed"
      rel="replies" thr:count="3" type="application/atom+xml" xmlns:thr="http://purl.org/syndication/thread/1.0"/>
    <author>
      <name>Frank Adams</name>
      <snx:userid>20547574</snx:userid>
      <snx:orgId>20542369</snx:orgId>
      <snx:orgName>IBM Test - SDK Renovations</snx:orgName>
      <email/>
      <snx:userState>active</snx:userState>
    </author>
    <title type="text">Updated Label</title>
    <published>2012-12-03T05:28:14.446Z</published>
    <updated>2014-12-05T11:42:05.839Z</updated>
    <td:created>2012-12-03T05:28:14.446Z</td:created>
    <td:modified>2013-03-22T10:21:20.449Z</td:modified>
    <td:lastAccessed/>
    <td:modifier>
      <name>Frank Adams</name>
      <snx:userid>20547574</snx:userid>
      <snx:orgId>20542369</snx:orgId>
      <snx:orgName>IBM Test - SDK Renovations</snx:orgName>
      <email/>
      <snx:userState>active</snx:userState>
    </td:modifier>
    <td:shared>2012-12-03T05:28:44.285Z</td:shared>
    <td:visibility>public</td:visibility>
    <snx:isExternal>false</snx:isExternal>
    <td:libraryId>72340930-3547-4a94-8b8c-f19e87283606</td:libraryId>
    <td:libraryType>personalFiles</td:libraryType>
    <td:isSyncable>false</td:isSyncable>
    <td:policy>
      <td:organizationPublic>true</td:organizationPublic>
      <td:contentFollowing>true</td:contentFollowing>
    </td:policy>
    <td:versionUuid>dfc83cba-4baf-484e-8a27-6d760cb37b71</td:versionUuid>
    <td:versionLabel>4</td:versionLabel>
    <td:propagation>false</td:propagation>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/recommendations">0</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/comment">3</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/share">1</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/collections">0</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/attachments">0</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/versions">4</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/references">0</snx:rank>
    <td:totalMediaSize>3283470</td:totalMediaSize>
    <summary type="text">Updated Summary</summary>
    <content
      src="https://apps.na.collabserv.com/files/basic/api/library/72340930-3547-4a94-8b8c-f19e87283606/document/f6f6418b-bf34-40d7-8b75-2d6e100e7f81/media" type="binary/octet-stream"/>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/hit">18</snx:rank>
    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/anonymous_hit">0</snx:rank>
    <td:restrictedVisibility>false</td:restrictedVisibility>
    <td:objectTypeName>snx:file</td:objectTypeName>
    <td:lock type="NONE"/>
    <snx:encrypt>false</snx:encrypt>
    <snx:isExternal>false</snx:isExternal>
    <snx:orgId>20542369</snx:orgId>
    <snx:orgName>IBM Test - SDK Renovations</snx:orgName>
  </entry>
</feed>