Community articleGetting a feed of a person's library
Added by IBM contributorIBM on November 9, 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 the files in a person's library.
{userid} is the user ID of the person. You can find out a person's user ID by retrieving the person's profile feed. See Searching Profiles for more information.


Request parameters

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

Authentication

This method does not require authentication to retrieve public resources. If authentication is provided, the user must have 'View' authority on the specified resource.

Visibility Filter

When viewing another user's library the default view will show all media that you are permitted to see. This means all public media for that user as well as all private media that user has shared with you. If a visibility flag is passed the list of media is further
filtered as follows:

  • public - shows only media marked as public
  • private - unavailable on a library that is not your own, unless combined with shared=true

Search string and tag filter

/userlibrary/userid/documents/feed?tag=tag1&tag=tag2&search=
Returns documents tagged with tag1 and tag2 in this personal library that the current user has view permission on.

/userlibrary/userid/documents/feed?tag=tag1&tag=tag2&search=foo
Returns documents tagged with tag1 and tag2 in this personal library that the current user has view permission on filtered by the keyword 'foo'.

Note : If seach string is specified, the documents will be included in the response only when they are indexed by Search engine.

Input
Method URI Description
GET /files/basic/anonymous/api/userlibrary/{userid}/feed A feed that lists the public files in the library owned by the person specified by the {userid} value. You cannot authenticate this request.
GET /files/basic/api/userlibrary/{userid}/feed A feed that lists the public files in the library owned by the person specified by the {userid} value. This feed also includes any files in the library that have been shared with you. This request requires authentication.
GET /files/{auth}/api/library/{library-id}/feed Retrieve resources contained by a library given its id.
Name Type Optional Description
userid
string No user ID of the person
fileId
string No The IDs of the specific files that you want to retrieve.
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.
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.
includeQuota
boolean Yes If set to true , the <td:librarySize> and <td:libraryQuota> elements, which provide size and quota information, are returned in the resulting feed. This parameter takes a Boolean value of either true or false. By default, the quota information is not returned.
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.
shared
enumerated Yes Filters the list of results based on whether the file has been shared or not. This parameter is ignored if visibility is set to public. Options are true, false, or null. null returns all files, whether or not they have been shared and is the default value.
Authorized values:
  • true
  • false
  • 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.
since
number Yes Returns entries that have file content that has been added or updated since 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.
downloaded
Sorts the entries by the number of times the item was downloaded.
length
Organize 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.
updated
Sorts the entries by the last time the item was updated.
The default value of this parameter is modified.
Authorized values:
  • commented
  • downloaded
  • length
  • modified
  • published
  • recommended
  • 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 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
dF
date Yes Time stamp in milliseconds to filter content that has been added or modified from the specified time.
search
string Yes Filters the feed to contain only those documents that contain the specified value. When this
parameter is passed, 'visibility' cannot be passed with a value of private. All parameters, other than 'visibility', 'page', 'pageSize', 'sK', 'sO', 'sI' are ignored.
fileType
string Yes Filter content to only include content that is of the specified extension.
category
enumerated Yes Specifies resource types to include in the response. Multiple values are accepted, e.g. category=document&category=page
Authorized values:
  • document
  • page
includeDocumentTypeTitle
enumerated Yes If true, then look up docuemt type title from document type id and add <td:documentTypeTitle> to the Document Entry. this parameter
Authorized values:
  • true
  • false
includeWorkingDrafts
enumerated Yes String. If true, includes working drafts inline, if there is a draft of an existing document then the draft will be provided instead of the document. The default value is false.
Authorized values:
  • true
  • false
includeAllowedSortKeys
enumerated Yes String. If true, includes sortBy values in a comma-delimited list. Corresponding element
name is td:allowedSortKeys. The default value is false.
Authorized values:
  • true
  • false
includeFavorite
enumerated Yes String. Indicate whether to return favorite information of files in the feed. Default value is false.
Authorized values:
  • true
  • false
title
string Yes Filter the files with the title in library.
Output
Content Type: application/atom+xml
Code Description
200
OK. Indicates that the request was received successfully.
400
Bad Request. Returned when no matching user record can be found.
401
- Unauthorized: Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
- InvalidUser: Returned when the requested library owner is not found if the user is not authenticated.
403
Forbidden. The server refuses to fulfill a request, typically because the request was for an object that you don't have permission to access.
- AccessDenied: Returned when the cause of an error is due to a permission restriction.
- InvalidUser: Returned when the requested library owner is not found if user is authenticated.
404
Returned when the cause of an error is related to a resource not being found:
- ItemNotYetProvisioned: Returned if a user does not have a library provisioned yet
- CanNotProvisionItem: Returned if a library can not be provisioned for the user
500
Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.
Examples
For community files library
GET /files/basic/api/library/5d06ab0044ed8129bd5ebd4caeec5df1/feed HTTP/1.1 Host: example.com User-Agent: Thingio/1.0

Response returned by the server
	Connections - Files
	urn:lsid:ibm.com:td:865652e4-0e53-4248-9384-de2f4830d8d0
	
	
	
	
		System User
		00000000-0000-0000-0000-000000000000
	
	2011-04-14T13:59:49.888Z
	226
	
	95097ba2-bd85-49c0-b285-d2d886f8f362
	
	95097ba2-bd85-49c0-b285-d2d886f8f362
	
	
	
		
		application/*
		image/*
		*/*
	
	
		urn:lsid:ibm.com:td:16239829-70c1-4c61-b5b0-3dd2c9934be1
		16239829-70c1-4c61-b5b0-3dd2c9934be1
		Media 1302789874325
		
 
		
 
		
 
		
		
 
		
		
		
 
		
			الهدف 最佳產
			dbcsuser
			dbcsuser@renovations.com
			active
		
		
		2011-04-14T14:04:34.356Z
		2011-04-18T06:49:47.356Z
		2011-04-14T14:04:34.356Z
		2011-04-14T14:04:34.356Z
		
		
			الهدف 最佳產
			dbcsuser
			dbcsuser@renovations.com
			active
		
		865652e4-0e53-4248-9384-de2f4830d8d0
		communityFiles
		ac7e7bc1-fa82-4128-9194-37a8ac5a9c1f
		1
		false
		0
		1
		0
		1
		0
		1
		13
		
		
 
		2
		0
		false
		snx:file