Getting a feed of public files
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 30, 2015
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 all public files.

Discoverability

You can derive the URL from the service document. Use the web address specified in the href attribute of the <collection> element that contains the <title type="text">Documents Feed</title> element.


Request parameters

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

 

The search parameter will help looking for specific files performing a basic name matching. If needed, the Search APIs provides the functionality for accessing indexed content with complex queries.

 

Input
Method URI Description
GET /files/{auth}/api/documents/feed You can derive the URL from the service document. Use the web address specified in the href attribute of the <collection> element that contains the <title type="text">Documents Feed</title> element.
Name Type Optional Description
auth
enumerated No The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
Name Type Optional Description
includePath
boolean Yes Specifies whether or not to return the <td:path> element that shows the path to the object. This parameter takes a Boolean value of either true or false. By default, the path is not returned.
visibility
string No Defines who has access to the files. Set this parameter equal to public, which specifies that you want to return all of the files that can be accessed by anyone who can log in to the Files application. Note: This parameter is required if the search parameter is not passed.
includeTags
boolean Yes Specifies whether or not the tags that are displayed on the file welcome page are included in the returned Atom document. This parameter takes a Boolean value of either true or false. By default, the tags are not returned.
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.
sI
int Yes Start index. Specifies the start index (as a number) in the collection from which the results should be returned. This parameter is ignored if a page parameter is provided.
since
number Yes Returns only those files that were added or last updated after the specified time. Specify the time in the number of milliseconds since January 1, 1970, 00:00:00 GMT time.
sortBy
enumerated Yes String. Specifies what to sort the returned entries by. 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.
recommended
Sorts the entries by the number of times the item was recommended.
The default value of this parameter is created.
Authorized values:
  • commented
  • created
  • downloaded
  • recommended
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 String. Returns all files tagged with the specified keyword. You can specify up to three keywords by default. Separate multiple tag names with commas. The administrator can configure Files to allow for searching more or fewer tags.
isExternal
boolean Yes Shows also file marked public for external viewing
Name Type Optional Description
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
Content Type: application/atom+xml
Code Description
200
OK. Indicates that the request was received successfully.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
Examples
To search for all public files:
> GET /files/basic/anonymous/api/documents/feed?visibility=public 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:18:13 GMT

Content-Language: en-US

Set-Cookie: JSESSIONID=xxx

Transfer-Encoding: chunked

Date: Wed, 15 Jul 2009 21:18:12 GMT

Server: WebSphere Application Server/6.1

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

Cache-Control: public, max-age=30, no-cache=set-cookie


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

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

  <link 

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

   rel="self" /> 

  <title type="text">Public Files</title> 

  <updated>2009-07-15T21:18:13.312Z</updated> 

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

   IBM Connections Files

  </generator> 

  <snx:rank 

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

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

     2

  </snx:rank> 

  <opensearch:totalResults 

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

     2

  </opensearch:totalResults> 

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

    <td:label xmlns:td="urn:ibm.com/td">folder.gif</td:label> 

    <link 

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

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

     rel="self" /> 

    <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/entry" 

     rel="edit" /> 

    <link 

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

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

     rel="edit-media" /> 

    <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" /> 

    <link 

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

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

     rel="qkr-media-anonymous" /> 

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

    <link 

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

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

     rel="replies" 

     type="application/atom+xml" 

     xmlns:thr="http://purl.org/syndication/thread/1.0" 

     thr:count="0" /> 

    <author>

      <name>Jay Michaels</name> 

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

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

      </snx:userid> 

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

    </author>

    <title type="text">folder.gif</title> 

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

    <updated>2009-07-15T21:14:41.078Z</updated> 

    <td:created xmlns:td="urn:ibm.com/td">2009-07-15T21:13:04.671Z</td:created> 

    <td:modified xmlns:td="urn:ibm.com/td">2009-07-15T21:13:04.671Z</td:modified> 

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

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

      <name>Jay Michaels</name> 

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

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

      </snx:userid> 

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

    </td:modifier>

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

    <td:versionUuid 

     xmlns:td="urn:ibm.com/td">bf8f77a5-0151-4b9a-b609-1ddf133f7a2b

    </td:versionUuid> 

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

    <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/recommendations">

       0

    </snx:rank> 

    <snx:rank 

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

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

       0

    </snx:rank> 

    <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/anonymous_hit">

       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> 

    <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/attachments">

       0

    </snx:rank> 

    <snx:rank 

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

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

       1

    </snx:rank> 

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

    <summary type="text" /> 

    <content 

     type="image/gif" 

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

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

      media"/> 

  </entry>

</feed>