Community articleGetting a feed of the files and subfolders in a folder
Added by IBM contributorIBM | Edited by Elizabeth J Bowling on July 13, 2016
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 files and subfolders contained within a specific folder or community folder.

The URI determines whether to retrieve the contents of a folder or a community folder.

Note: {collection-id} is the value of the <td:uuid> element in the collection's Atom document.

Discoverability


You can derive the URL from the folders feed, such as My Folders. Find the entry representing the folder, and then get the value of the href attribute of the <link> element with the rel="files" attribute.

Authentication


The user authenticating the request must have access to the folder for which they want a list of files.

Request parameters


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

 

Input
Method URI Description
GET /files/basic/api/collection/{collection-id}/feed {collection-id} is the value of the <td:uuid> element in the collection's Atom document.
GET /files/basic/api/communitycollection/{community-id}/feed Return the list of subfolders and documents in the specified community folder.
Name Type Optional Description
collection-id
string No {collection-id} is the value of the <td:uuid> element in the collection's Atom document.
community-id
string No String. The uuid of the community whose folders and documents you want to retrieve.
Name Type Optional Description
added
int Yes Long integer representing a timestamp. Returns all files that were added to the folder after the specified date and time.
addedBy
string Yes User ID. String. Specifies to return only file folders created by the user specified by the user ID.
created
int Yes Long integer representing a timestamp. Returns all files created after the specified date and time.
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.
sl
int Yes Start index. Specifies the start index (number) in the folder from which the results should be returned. This parameter is ignored if a page parameter is provided.
sortBy
enumerated Yes String. Specifies what to sort the returned entries by. Options are:
created
Sorts the entries by the date the item was created.
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).
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.
updated
Sorts the entries by the last time the item was updated.
The default value of this parameter is modified.
Authorized values:
  • created
  • modified
  • published
  • title
  • 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 String. Filters the returns by the specified tag. You can specify up to three tag parameters.
category
enumerated Yes Enumerated:
For category=document, only documents contained within the specified folder (collection) are returned. The list of documents is organized according to the 'page' and 'ps' (page size) parameters.
For category=collection, only subfolders contained within the specified folder (collection) are returned. The list of subfolders is organized according to the 'page' and 'ps' (page size) parameters.
For category=page, a list of wiki pages is returned.
For category=all, a combined list of subfolders and documents is returned, with subfolders at the beginning of the list. The combined list is organized according to the 'page' and 'ps' (page size) parameters. To distinguish between documents and subfolders, the response includes the category information in each entry (for subfolders, this will be 'collection' while for documents it will be 'document').
Authorized values:
  • document
  • collection
  • page
  • all
Output
Content Type: application/atom+xml
Code Description
200
OK. Indicates that the request was received successfully.