Community articleAdding an owner or moderator to a stand-alone forum programmatically
Added by IBM contributorIBM on March 10, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

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.



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.
Input
Method URI Description
POST /forums/atom/acl 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.
Content Type: application/atom+xml
Sample Request:
<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>
Name Type Optional Description
forumUuid
string No The UUID of the forum you wish to add the member to.
Output
Content Type: application/atom+xml
Name Type Optional Description
Location
string No Link to edit_url of the member. You can use the web address specified here to subsequently retrieve and update the forum owner.
Code Description
201
Indicates that the owner was successfully added. If an error occurs, this header contains one of the error codes.
400
Bad Request.
403
Forbidden.
Examples
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 returned by the server
HTTP 201 Created
	Location:
	http://www.example.com/forums/atom/acl?forumUuid=1A1GC0A80221E5C54FA8D3BE4D1E1B000032&
	userid=51FGC0A80221E5C54FA8D3BE4D1E1B000055