Adding a community member
Added by IBM contributorPaul Bastide | Edited by Elizabeth J Bowling on October 24, 2016
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To add a member to the access control list of an application, send an Atom entry document containing the new member to the access control list feed.
Input
Method URI Description
POST /communities/service/atom/community/members The REST API for managing Community membership
Content Type: application/atom+xml
Sample Request:
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
    <contributor>
      <email>ajones2@janet.iris.com</email>
      <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">22148957</snx:userid>
      <snx:userState xmlns:snx="http://www.ibm.com/xmlns/prod/sn">active</snx:userState>
      <snx:isExternal xmlns:snx="http://www.ibm.com/xmlns/prod/sn">false</snx:isExternal>
      <name>Amy Jones2</name>
    </contributor>
    
    <snx:role xmlns:snx="http://www.ibm.com/xmlns/prod/sn" component="http://www.ibm.com/xmlns/prod/sn/communities">member</snx:role>
    <category term="person" scheme="http://www.ibm.com/xmlns/prod/sn/type">
    </category>
    <snx:orgId xmlns:snx="http://www.ibm.com/xmlns/prod/sn">a</snx:orgId>
  </entry>
Name Type Optional Description
communityUuid
string No The communityUuid to add a user to
Name Type Optional Description
Content-Type
string No The Content Type of the Member data
Output
Content Type: application/atom+xml
Code Description
201
The member is successfully added to community
417
The user is already a member
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
404
The community doesn't exist
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.
Examples
  <entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
    <contributor>
      <email>ajones2@janet.iris.com</email>
      <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">22148957</snx:userid>
      <snx:userState xmlns:snx="http://www.ibm.com/xmlns/prod/sn">active</snx:userState>
      <snx:isExternal xmlns:snx="http://www.ibm.com/xmlns/prod/sn">false</snx:isExternal>
      <name>Amy Jones2</name>
    </contributor>
    
    <snx:role xmlns:snx="http://www.ibm.com/xmlns/prod/sn" component="http://www.ibm.com/xmlns/prod/sn/communities">member</snx:role>
    <category term="person" scheme="http://www.ibm.com/xmlns/prod/sn/type">
    </category>
    <snx:orgId xmlns:snx="http://www.ibm.com/xmlns/prod/sn">a</snx:orgId>
  </entry>

Response returned by the server
  <entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
    <contributor>
      <email>ajones2@janet.iris.com</email>
      <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">22148957</snx:userid>
      <snx:userState xmlns:snx="http://www.ibm.com/xmlns/prod/sn">active</snx:userState>
      <snx:isExternal xmlns:snx="http://www.ibm.com/xmlns/prod/sn">false</snx:isExternal>
      <name>Amy Jones2</name>
    </contributor>
    
    <snx:role xmlns:snx="http://www.ibm.com/xmlns/prod/sn" component="http://www.ibm.com/xmlns/prod/sn/communities">member</snx:role>
    <category term="person" scheme="http://www.ibm.com/xmlns/prod/sn/type">
    </category>
    <snx:orgId xmlns:snx="http://www.ibm.com/xmlns/prod/sn">a</snx:orgId>
  </entry>