Add an activity member programmatically 

To add a member to the access control list of an activity, send an Atom entry document containing the new member to the access control list feed. You can only add one member per post.

See Authenticating requests for information about how to authenticate the request.

Table 1. Atom API request details

Method Resource URI Input representation
POST acl list feed 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 member


To add a member to the member list of a community activity...

  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:

      <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.

  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...

    • Get the My Communities feed. See Search 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.

      The returned feed lists each member of the community as a separate entry.

  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

Provide a member Atom entry document. The content type of the Atom entry document must be application/atom+xml.


Output

An Atom entry document containing the new member entry.

Returned HTTP headers

HTTP/1.1 201 Created

Location: url

Error codes


Parent topic

Work with activity members

Related reference
Add a member programmatically
Member entry content
Getting the My Communities feed
Create community activities


   

 

});

+

Search Tips   |   Advanced Search