Community articleCreating a wiki
Added by IBM contributorIBM | Edited by IBM contributorLDD Webmaster on July 1, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Use the API to create a wiki programmatically.



Use the API to create a wiki programmatically.
 

Input


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

Output


None.
 

Location: url

Link to edit_url of the new wiki that can be used to update it.

 

Input
Method URI Description
POST /wikis/basic/api/wikis/feed Creates a Wiki. Provide a Wiki definition Atom entry document. The content type of the Atom entry document must be application/atom+xml.
Content Type: application/atom+xml
Sample Request:
<entry xmlns="http://www.w3.org/2005/Atom">
  <category scheme="tag:ibm.com,2006:td/type" term="wiki" label="wiki" />
  <title type="text">Rental boats</title>
  <sharedResourceType xmlns="urn:ibm.com/td">wiki</sharedResourceType>
  <sharedWith xmlns="urn:ibm.com/td">
  <member
	xmlns="http://www.ibm.com/xmlns/prod/composite-applications/v1.0"
        xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0"
	ca:id="anonymous-user"
	ca:type="virtual"
	ca:role="reader" />
  <member 
	xmlns="http://www.ibm.com/xmlns/prod/composite-applications/v1.0"
        xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0"
	ca:id="all-authenticated-users" 
	ca:type="virtual" 
	ca:role="editor" />
  </sharedWith>
	<summary type="text">The best wiki around for rental boats</summary>
	<category term="wicked" />
	<category term="wiki" />
</entry>
Output
Code Description
201
Indicates that the wiki was successfully created. If an error occurs, this header contains one of the error codes.
400
Bad Request. Returned when no matching user record can be found.
403
Forbidden. The server refuses to fulfill a request, typically because the request was for an object that you don't have permission to access.