Adding an activity member
Added by IBM contributorIBM | 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

Add a member to the access control list of an activity using an Atom entry document.

Send an Atom entry document containing the new member to the access control list feed. You can only add one member per post.

Complete the following steps:

<category

scheme="http://www.ibm.com/xmlns/prod/sn/type"

term="explicit_membership_community_activity"

label="Explicit Membership Community Activity"/>


If it has a category element of type community_activity, you cannot define the members; they are instead inherited from the community membership list.

The returned feed lists each member of the community as a separate entry.
1. Make sure that the community activity to which you want to add members supports the addition of members. The community activity must have a category element of type explicit_membership_community_activity. For example:
2. You can only add all or a subset of the members who belong to the community to which the activity belongs. If you add a person who is not a member of the owning community, an error is returned on the request. To find out who belongs to the owning community, complete the following steps:
  • Get the My Communities feed.
  • From the My Communities feed, find the community to which this activity belongs. Within its entry, find the link element with the rel="http://www.ibm.com/xmlns/prod/sn/member-list" attribute. Make a note of the value of the associated href attribute.
  • Send a GET request to the web address that you noted in the previous step.
3. In the Atom documents that you create to define each member of the community activity, do not include anyone who is not listed in the member list feed of the community.
Input
Method URI Description
POST /activities/service/atom2/acl Found in the href attribute of <link> element that has a rel="http://www.ibm.com/xmlns/prod/sn/member-list" attribute value for each activity
Content Type: application/atom+xml
Sample Request:
<?xml version="1.0" encoding="UTF-8"?>

<entry 

 xmlns="http://www.w3.org/2005/Atom" 

 xmlns:app="http://www.w3.org/2007/app" 

 xmlns:snx="http://www.ibm.com/xmlns/prod/sn">

<id>https://greenhousestage.lotus.com/activities/service/atom2/acl?activityUuid=60eac668-ab21-4795-b112-51eeaf54ffaa&amp;memberid=F0CG092106BDF63507C7864B28F1A500017B</id>
<contributor>
<name>Test User</name>
<snx:userid>22148957</snx:userid>
<snx:role>member</snx:role>
<snx:userState>active</snx:userState>
</contributor>
<title>Test User</title>

<updated>2014-03-04T09:25:17Z</updated>

<summary type="text">Member profile for Test User</summary>



<category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="person"></category>

<snx:role component="http://www.ibm.com/xmlns/prod/sn/activities">member</snx:role>

</entry>
Name Type Optional Description
activityUuid
string No The UUID of the activity you wish to add a member to.
Output
Name Type Optional Description
Location
string No Link to edit_url of the new member entry. You can use the web address specified here to subsequently retrieve and update the member entry.
Code Description
201
Indicates that the member was successfully added to the acl list. If an error occurs, this header contains one of the error codes.
400
Bad Request.
403
Forbidden.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
Examples
To add a member to the member list of a community activity, complete the following steps. If it has a category element of type community_activity, you cannot define the members; they are instead inherited from the community membership list. The returned feed lists each member of the community as a separate entry. 1. Make sure that the community activity to which you want to add members supports the addition of members. The community activity must have a category element of type explicit_membership_community_activity. 2. You can only add all or a subset of the members who belong to the community to which the activity belongs. If you add a person who is not a member of the owning community, an error is returned on the request. To find out who belongs to the owning community, complete the following steps: Get the My Communities feed. See Searching the My Communities view. From the My Communities feed, find the community to which this activity belongs. Within its entry, find the link element with the rel="http://www.ibm.com/xmlns/prod/sn/member-list" attribute. Make a note of the value of the associated href attribute. Send a GET request to the web address that you noted in the previous step. 3. In the Atom documents that you create to define each member of the community activity, do not include anyone who is not listed in the member list feed of the community.
	<?xml version="1.0" encoding="utf-8"?>

	

	<entry xmlns="http://www.w3.org/2005/Atom"

	  xmlns:snx="http://www.ibm.com/xmlns/prod/sn">

	  <contributor>

	       <name>Domino Testuser21</name>

	       <email>DominoTestuser21@cn.ibm.com</email>

	  </contributor>

	  <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="person" />

	  <snx:role component="http://www.ibm.com/xmlns/prod/sn/activities">owner</snx:role>

	</entry>