Add an owner or moderator to a stand-alone forum programmatically 

To add an owner or moderator to the members list of a forum, send an Atom entry document containing the new member to the access control list feed. Use the <snx:role> element to specify which role you want the person to have. You can only add one member per post.

Forums are public, so anyone who can authenticate with IBM Connections can access a forum. Therefor, there is no member level role in the members list of a forum, only owner and moderator roles.

See Authenticating requests for information about how to authenticate the request. Only forum owners can add people to a forum as owners and moderators.

Table 1. Atom API request details

Method Resource URI Input representation
POST Members feed Value of the href attribute of the <link> element with the rel="http://www.ibm.com/xmlns/prod/sn/member-list" attribute value in one of the forums feeds, such as My Forums. member


Input

Provide a member Atom entry document.

Note: 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

Request:

POST /forums/atom/acl?forumUuid=1A1GC0A80221E5C54FA8D3BE4D1E1B000032 HTTP/1.1
Host: www.example.com
Content-Type: application/atom+xml
Content-Length: nnn
Authorization: Basic xxx
 
<entry xmlns="http://www.w3.org/2005/Atom">
    <id>Ignored</id>
    <contributor>
        <email>sancho@example.com</email>
        <snx:userid>772A006E-0A01-8703-8525-7346003DAFD6</snx:userid>
        <snx:userState>active</snx:userState>
        <name>Sancho</name>
    </contributor>
    <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="person" />
    <snx:role 
     xmlns:snx="http://www.ibm.com/xmlns/prod/sn" 
     component="http://www.ibm.com/xmlns/prod/sn/forums">
       owner
    </snx:role>
    <title type="text">Ignored</title>
</entry>

Response:

HTTP 201 Created
Location:
http://www.example.com/forums/atom/acl?forumUuid=1A1GC0A80221E5C54FA8D3BE4D1E1B000032&
 userid=51FGC0A80221E5C54FA8D3BE4D1E1B000055


Parent topic

Work with stand-alone forum members

Related reference
Member entry content


   

 

});