Adding multiple members
Added by IBM contributorIBM | Edited by Claudia R Elbourn on July 7, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To add multiple members to an activity with one API request, send an Atom feed document containing entries of the new members to be added to the activity ACL.

You must include the userid of each user to be added.

Send an ATOM feed of entries that contain the user IDs to be added to the ACL URL. To make an activity public to an organization, use the organization ID instead of a user ID and set the term of the category element to organization.

Input
Method URI Description
POST <server>/activities/service/atom2/acl Required URL parameters: activityUuid - This is the UUID of the activity that you wish to add members to.
Content Type: application/atom+xml
Sample Request:
TO ADD TWO USERS WITH ONE REQUEST.

<?xml version="1.0" encoding="UTF-8"?>

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

<entry xmlns="http://www.w3.org/2005/Atom"
   xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
   <contributor>
       <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">8d579540-f6df-1032-9afb-d02a14283ea9</snx:userid>
   </contributor>
   <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="person" />
   <snx:role component="http://www.ibm.com/xmlns/prod/sn/activities">member</snx:role>
</entry>

<entry xmlns="http://www.w3.org/2005/Atom"
   xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
   <contributor>
       <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">8d579540-f6df-1032-9b0a-d02a14283ea9</snx:userid>
   </contributor>
   <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="person" />
   <snx:role component="http://www.ibm.com/xmlns/prod/sn/activities">member</snx:role>
</entry>
</feed>

TO MAKE AN ACTIVITY PUBLIC TO AN ORGANIZATION
<?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>
       <!-- This is an organization, not a user -->
       <snx:userid>20000266</snx:userid>
   </contributor>
   <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="organization" />
   <snx:role component="http://www.ibm.com/xmlns/prod/sn/activities">reader</snx:role>
</entry>
Output
Content Type: application/atom+xml
Code Description
201
400
Bad Request. Returned when no matching user record can be found.
403
Forbidden. The server is unable to fulfill a request, typically because the request was for an object that you do not have permission to access.