Community articleRetrieving the list of members of a specified role for a folderSince V5.5
Added by IBM contributorIBM on November 11, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Retrieve the list of users who are assigned to a specific access role for a folder.

This method does not require authentication to retrieve public resources. If authentication is provided, the user must have 'View' permission on the folder. View permission is granted through the Reader, Contributor, or Manager role of a folder.


The following access roles are available:
 

Role Type
Permissions
Reader
View a folder and all media in it.
Contributor
Add to a folder and delete items they added.
Manager
Add and remove any item; assign roles.

The following error codes could appear in a response body for an invalid request:

Error Code
Description
Unknown
Returned when the cause of an error is unknown
ItemNotFound
Returned when the cause of an error is related to a resource not being found
Input
Method URI Description
GET /files/{auth}/api/collection/{collection-id}/roles/{role-type}/members Retrieve all members of a particular role of the specified folder.
GET /files/{auth}/api/communitycollection/{community-id}/roles/{role-type}/members Retrieve all members of a particular role of the specified community folder.
Name Type Optional Description
auth
enumerated No The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
collection-id
string No The UUID of the folder that the role is assigned to.
community-id
string No The UUID of the community folder that the role is assigned to.
role-type
enumerated No The role to which the current user is being assigned:
Reader: View a folder and all media in it.
Contributor: Add to a folder and delete items they added.
Manager: Add and remove any item; assign roles.
Authorized values:
  • reader
  • contributor
  • manager
Name Type Optional Description
start-index
int Yes 1 based start offset of entries to be served. Default value: 1
max-entries
int Yes Total number of entries to be served. Default value: server-determined chunk size.
name
string Yes Filter the content returned by the specified name. This parameter supports the wildcard *. If no wildcard is specified, the entire string will be used in the matching algorithm.
email
string Yes Filter the content returned by the specified email address. This attributes support the wildcard * and is only valid if type=user. If no wildcard is specified, the entire string will be used in the matching algorithm.
type
enumerated Yes String. Filter the content returned by the specified type. Supports multiple values.
Authorized values:
  • user
  • group
  • virtual
order-by
enumerated Yes Identifies the attributes to be used as order criteria. Default value is display-name.
Authorized values:
  • display-name
  • email
  • type
sort-order
enumerated Yes Indicates the sort order (ascending or descending) for the results. The default value is asc.
Authorized values:
  • asc
  • desc
rep
enumerated Yes Defines the level of detail in the returned entry elements. The default value is full.
Authorized values:
  • compact
  • full
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:
  • basic
  • bearer
Output
Code Description
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
Examples
Retrieve the list of users with Contributor access to the specified folder.
GET /files/basic/api/collection/21aaffab-90db-4611-9b83-403255489186/roles/contributor/members

Response returned by the server
HTTP/1.1 200 OK

X-LCONN-API-IMCOMPITABLE: api

 

<feed xmlns:td="urn:ibm.com/td" 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:thr="http://purl.org/syndication/thread/1.0">
   <title type="text">editor members of testCreateCollectionWithRoles_contributor_1436166266131</title>
   <author>
      <name>Administrator</name>
   </author>
   <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/21aaffab-90db-4611-9b83-403255489186/roles/contributor/members" rel="self" type="application/atom+xml"></link>
   <id>ca:/collection/21aaffab-90db-4611-9b83-403255489186/roles/contributor/members</id>
   <updated>2015-07-06T07:21:56.236Z</updated>
   <td:nonVisibleGroupCount xmlns:td="urn:ibm.com/td">0</td:nonVisibleGroupCount>
   <opensearch:totalResults xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">1</opensearch:totalResults>
   <generator version="0.0.0.0" uri="http://www.ibm.com/xmlns/prod/sn">IBM Connections - Files</generator>
   <entry>
      <title type="text">Andreas Berzat</title>
      <id>ca:/collection/21aaffab-90db-4611-9b83-403255489186/roles/contributor/members/aberzat</id>
      <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/21aaffab-90db-4611-9b83-403255489186/roles/contributor/members/aberzat" rel="self"></link>
      <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/21aaffab-90db-4611-9b83-403255489186/roles/contributor/members/aberzat" rel="edit"></link>
      <content type="text">
         <ca:member xmlns:snx="http://www.ibm.com/xmlns/prod/sn" xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0" ca:id="aberzat" ca:type="user" ca:email="aberzat@renovations.com" snx:userState="active" ca:display-name="Andreas Berzat"></ca:member>
      </content>
   </entry>
</feed>