Create a wiki
Use the API to create a wiki programmatically.Table 1. Atom API request details
Method Resource address Input or output representation Description POST /basic/api/wikis/feed Wiki definition Creates a wiki.
Input
Provide a Wiki definition Atom entry document. The content type of the Atom entry document must be application/atom+xml.
Output
None.Returned HTTP headers
HTTP/1.1 201 Created
Indicates that the wiki was successfully created. If an error occurs, this header contains one of the error codes.
Location: url
Link to edit_url of the new wiki that can be used to update it.
- HTTP/1.1 400 Bad Request
- HTTP/1.1 403 Forbidden: Authorization failed.
Sample wiki definition Atom entry document content:
<?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 Wells</name> <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn"> bf9117c0-f8f2-102c-97c4-ceb7f24c5708 </snx:userid> <email>bwells@us.example.com</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="bf9117c0-f8f2-102c-97d8-ceb7f24c5708" 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">This is Lake Champlain</title> <summary type="text"> A big lake </summary> </entry>
Parent topic
Work with wikisRelated reference
Wiki defintion content
});