Retrieving membership details for a specified role for a folderSince 8/2015
Added by IBM contributorElizabeth Bowling | Edited by IBM contributorElizabeth Bowling on August 21, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Retrieve basic information about the list of members assigned to a particular role for the specified folder.

This API returns information about the membership list for a role--it does not return the actual list of members. However, this API also returns a link that you can use to retrieve the list of users assigned to the role, as explained in Retrieving the list of members for a folder's role.

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. To test whether the current user can get a list of roles of a folder, you can also use the Retrieving the list of members for a folder's role to determine whether the user has the Manager role as required.

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} Retrieve information about a single role of a specified folder.
GET /files/{auth}/api/communitycollection/{community-id}/roles Retrieve information about a single role of a 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
rep
enumerated Yes Defines the level of detail in the returned entry elements. The default value is full.
Authorized values:
  • compact
  • full
resolve-membership
enumerated Yes Determines whether membership details are merged in the feed. This parameter is only valid if rep attribute is set to full. The default value for this parameter is false.
Authorized values:
  • true
  • false
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
Get information about the Contributor role for the specified folder.
GET /files/basic/api/collection/b7659c6f-af22-45d2-90b8-b5162561229f/roles/contributor HTTP/1.1

Response returned by the server
HTTP/1.1 200 OK

X-LCONN-API-IMCOMPITABLE: api

 

<entry 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">
   <td:deprecated xmlns:td="urn:ibm.com/td">
      <td:advice xmlns:td="urn:ibm.com/td">ca:/collection/b7659c6f-af22-45d2-90b8-b5162561229f/roles/editor</td:advice>
   </td:deprecated>
   <title type="text">contributor</title>
   <author>
      <name>Administrator</name>
   </author>
   <id>ca:/collection/b7659c6f-af22-45d2-90b8-b5162561229f/roles/contributor</id>
   <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/b7659c6f-af22-45d2-90b8-b5162561229f/roles/contributor" rel="self" type="application/atom+xml"></link>
   <link xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0" href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/b7659c6f-af22-45d2-90b8-b5162561229f/roles/contributor/members" rel="related" type="application/atom+xml" ca:rel="members"></link>
   <updated>2015-07-06T07:34:33.235Z</updated>
   <content type="application/xml">
      <ca:role xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0" ca:id="contributor%40b7659c6f-af22-45d2-90b8-b5162561229f" ca:type="contributor">
         <ca:title xmlns:td="urn:ibm.com/td" xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0" td:language="en">contributor</ca:title>
      </ca:role>
   </content>
</entry>