0
votes

I've been trying to add members to the wiki to no avail. Here's the link to the instructions on how to do so:

http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Connections+4.5+API+Documentation#action=openDocument&res_title=Updating_a_wiki_ic45&content=pdcontent

Basically, what I need to do is to retrieve the wiki first using this URL:

connectionsURL/wikis/basic/api/wiki/{wiki-label}/entry

And then append the information there and then send it back using a PUT request, Content-Type: application/atom+xml. The content passed should look like the one below based on the example:

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
    <id>ignore</id>
    <td:label xmlns:td="urn:ibm.com/td">Lake Champlain</td:label>
    <category term="wiki" scheme="tag:ibm.com,2006:td/type" label="wiki">
    </category>
    <author>
        <name>Bill Jones</name>
        <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
      bf9117c0-f8f2-102c-97c4-ceb7f24c5708
    </snx:userid>
        <email>[email protected]</email>
    </author>
    <td:sharedWith xmlns:td="urn:ibm.com/td">
      <ca:member 
      xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0" 
      ca:id="new_user_id" 
      ca:type="user"
      ca:role="editor" >
        </ca:member>
      <ca:member 
      xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0" 
      ca:id="anonymous-user" 
      ca:type="virtual" 
      ca:role="reader" >
      </ca:member>
    </td:sharedWith>
    <title type="text">Long Lake</title>
    <summary type="text">
      modification none
    </summary>
</entry>

I tried that and I always keep getting this 400 Bad Request response:

<?xml version="1.0" encoding="UTF-8" ?>
 <td:error>
<td:errorCode>InvalidRequest</td:errorCode>
<td:errorMessage>Atom entry is null</td:errorMessage>
 </td:error>
1

1 Answers

0
votes

Try this API - https://conServer.com/wikis/basic/api/wiki/{WIKI_LABEL}/members Then do a PUT on that resource to change the entries (I think type should be atom/xml or atom+cat/xml

Thanks

paul