Community articleGetting a feed of file shares (2.5)
Added by IBM contributorIBM on June 23, 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. 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.



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 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.

This returns a feed of shares to which the authenticated user has access.

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. See Searching Profiles for more information.

Example


To search for all of the files that you have shared with others, send the following HTTP request:


 

Input
Method URI Description
GET /files/basic/api/myshares/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 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.
This returns a feed of shares to which the authenticated user has access.
Name Type Optional Description
acls
boolean Yes Specifies whether or not the permissions for each user should be displayed for each entry in the returned Atom document. This parameter takes a Boolean value of either true or false. By default, the permission information is not returned.
direction
enumerated Yes Specifies which shares 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.
owner
string Yes User ID of the person whose files you want to return. Specify null if you want to return all files no matter the owner.
page
int Yes Page number. Specifies the page to be returned. The default value is 1, which returns the first page.
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. 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.
Authorized values:
  • document
  • docshare
search
string Yes Filter the list of results based on the specified string. 'acls', 'includePath', 'category', '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. Passing null returns all shared 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. Passing a null value 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. Passing null returns all shares regardless of the permissions.
Authorized values:
  • Edit
  • View
  • null
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 see file shares, 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 see files, 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.
Examples
To search for all of the files that you have shared with others:
> GET /files/basic/api/myshares/feed?direction=outbound HTTP/1.1

> Authorization: Basic ...

> Host: files.enterprise.example.com:9088

> Accept: */*


Response returned by the server
< HTTP/1.1 200 OK

< X-LConn-Auth: true

< Content-Type: application/atom+xml; charset=UTF-8

< Last-Modified: Wed, 15 Jul 2009 21:17:23 GMT

< ETag: "myshares:modified=1247692643484:updated=1247692643484"

< Content-Language: en-US

< Set-Cookie: LtpaToken2=xxx

< Set-Cookie: LtpaToken=xxx

< Set-Cookie: JSESSIONID=xxx

< Transfer-Encoding: chunked

< Date: Wed, 15 Jul 2009 21:17:22 GMT

< Server: WebSphere Application Server/6.1

< Expires: Thu, 01 Dec 1994 16:00:00 GMT

< Cache-Control: private, must-revalidate, max-age=0, no-cache=set-cookie


<feed xmlns="http://www.w3.org/2005/Atom">

  <generator version="2.5.0.0" uri="http://www.ibm.com/xmlns/prod/sn">

   IBM Connections Files

  </generator> 

  <id>urn:lsid:ibm.com:td:myshares</id> 

  <title type="text">Shared by Ingrid Stillman</title> 

  <link href="http://enterprise.example.com:9088/files/basic/api/myshares/feed" rel="self" /> 

  <author>

    <name>Ingrid Stillman</name> 

    <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">

      5b788f40-7d67-102c-845c-e2ebc3ec5536

    </snx:userid> 

    <email>istillman@us.example.com</email> 

  </author>

  <updated>2009-07-15T21:17:23.484Z</updated> 

  <opensearch:totalResults 

   xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">

     1

  </opensearch:totalResults> 

  <collection 

   xmlns="http://www.w3.org/2007/app" 

   href="http://enterprise.example.com:9088/files/basic/api/myshares/feed">

    <title xmlns="http://www.w3.org/2005/Atom" type="text">myshares</title> 

  </collection>

  <entry>

    <id>urn:lsid:ibm.com:td:4c46657e-4c58-4a3a-9ab4-df0217361e4f</id> 

    <td:uuid xmlns:td="urn:ibm.com/td">4c46657e-4c58-4a3a-9ab4-df0217361e4f</td:uuid> 

    <category term="share" scheme="tag:ibm.com,2006:td/type" label="share" /> 

    <author>

      <name>Ingrid Stillman</name> 

      <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">

        5b788f40-7d67-102c-845c-e2ebc3ec5536

      </snx:userid> 

      <email>istillman@us.example.com</email> 

    </author>

    <title type="text">folder.gif shared by Ingrid Stillman</title> 

    <published>2009-07-15T21:13:33.140Z</published> 

    <updated>2009-07-15T21:13:33.140Z</updated> 

    <td:sharedWith xmlns:td="urn:ibm.com/td">

      <td:sharedWithCount>1</td:sharedWithCount> 

    </td:sharedWith>

    <link 

     href="http://enterprise.example.com:9088/files/basic/api/library/4031b3d3-dfb3-

      4a38-ac74-1230ff1ad272/document/4c46657e-4c58-4a3a-9ab4-df0217361e4f/entry" 

     rel="related" /> 

    <link 

     href="http://enterprise.example.com:9088/files/app/file/4c46657e-4c58-4a3a-9ab4-

      df0217361e4f" 

     rel="alternate" 

     type="text/html" /> 

    <link 

     href="http://enterprise.example.com:9088/files/basic/anonymous/api/library/

      4031b3d3-dfb3-4a38-ac74-1230ff1ad272/document/4c46657e-4c58-4a3a-9ab4-

      df0217361e4f/media/folder.gif" 

     rel="enclosure" 

     type="image/gif" 

     title="folder.gif" 

     hreflang="en" 

     length="887" /> 

    <td:documentOwner xmlns:td="urn:ibm.com/td">

      <name>Ingrid Stillman</name> 

      <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">

       5b788f40-7d67-102c-845c-e2ebc3ec5536

      </snx:userid> 

      <email>istillman@us.example.com</email> 

    </td:documentOwner>

    <td:libraryId xmlns:td="urn:ibm.com/td">

     4031b3d3-dfb3-4a38-ac74-1230ff1ad272

    </td:libraryId> 

    <td:sharedWhat xmlns:td="urn:ibm.com/td">

     4c46657e-4c58-4a3a-9ab4-df0217361e4f

    </td:sharedWhat> 

    <td:sharedResourceType xmlns:td="urn:ibm.com/td">document</td:sharedResourceType> 

    <td:visibility xmlns:td="urn:ibm.com/td">public</td:visibility> 

    <td:propagation xmlns:td="urn:ibm.com/td">true</td:propagation> 

    <snx:rank 

     xmlns:snx="http://www.ibm.com/xmlns/prod/sn" 

     scheme="http://www.ibm.com/xmlns/prod/sn/hit">

       0

    </snx:rank> 

    <snx:rank 

     xmlns:snx="http://www.ibm.com/xmlns/prod/sn" 

     scheme="http://www.ibm.com/xmlns/prod/sn/collections">

       0

    </snx:rank> 

    <snx:rank 

     xmlns:snx="http://www.ibm.com/xmlns/prod/sn" 

     scheme="http://www.ibm.com/xmlns/prod/sn/user">

       1

    </snx:rank> 

  </entry>

</feed>