Community articleUpdating a wiki page
Added by IBM contributorIBM 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

Update a wiki page programmatically.



Update a wiki page programmatically.

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

To update a wiki page, complete the following steps:

 

Retrieve the existing wiki page Atom document. See Retrieving a wiki page for more details.

  1. Edit the wiki page Atom document to include the information you want to change.
  2. Send the updated Atom document using the following request:

You can use one or more of these input parameters with the PUT request. Separate multiple parameters with an ampersand (&).


Input


Provide an updated wiki page Atom entry document.

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

Output


None.
 

 

Input
Method URI Description
PUT /wikis/basic/api/wiki/{wiki-label}/page/{page-label}/entry Determine the resource URI in either of the following ways: Value of the href attribute of the rel="edit" <link> element for each wiki page Atom entry, which are provided in the wiki pages collection. You can construct the URI using the following syntax: /basic/api/wiki/{wiki-label}/page/{page-label}/entry where {wiki-label} is the value of the <td:label> element in the wiki definition Atom entry document and {page-label} is the value of the <td:label> element in the wiki page Atom document.
Content Type: application/atom+xml
Name Type Optional Description
wiki-label
string No is the value of the <td:label> element in the wiki definition Atom entry document
page-label
string No is the value of the <td:label> element in the wiki page Atom document.
Name Type Optional Description
createVersion
boolean Yes Specify "true" to create a new version of the page or "false" overwrite the current version.
draft
boolean Yes Specify "true" to mark the page as a draft, or "false" otherwise.
includeNotification
boolean Yes Specify "true" to request the metadata on notification (edit or comment added) to be included for the document entry.
sendNotification
boolean Yes Specify "true" if you want to send edit or comment notifications.
Output
Code Description
200
OK. Indicates that the request was received successfully.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
404