Update an owner or moderator of a stand-alone forum programmatically 

To change the role of a member in a stand-alone forum from owner to moderator or the other way around, send an updated member document in Atom format to the existing member's edit web address.

All existing member entry metadata will be replaced with the new data. To avoid deleting data, retrieve the person's member entry document first, and send it back with this request. See Retrieve a stand-alone forum owner or moderator programmatically for more information. To change a person's role from owner or moderator back to a standard member, see Delete an owner or moderator from a stand-alone forum programmatically.

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

Table 1. Atom API request details

Method Resource URI Input representation
PUT member Value of the href attribute of the <link> element that has a rel="edit" attribute value for each entry in the members feed. member


Input

Provide a member Atom entry document.

Note: The content type of the Atom entry document must be application/atom+xml.

To change a person's role, edit the value of the <snx:role> element in the member Atom entry document.


Output

None.

Returned HTTP headers

HTTP/1.1 200 OK

Error codes

For example, to change a forum owner to a forum moderator, send the following HTTP request:

PUT /forums/atom/acl?forumUuid=1A1GC0A80221E5C54FA8D3BE4D1E1B000032&
 userid=772A006E-0A01-8703-8525-7346003DAFD6 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">
      moderator
    </snx:role>
    <title type="text">Ignored</title>
</entry>

Response:

HTTP/1.1 200 OK


Parent topic

Work with stand-alone forum members

Related reference
Member entry content


   

 

});

+

Search Tips   |   Advanced Search