Update a wiki
To update a wiki, send a replacement wiki definition entry document in Atom format to the existing wiki's edit web address.All existing wiki information will be replaced with the new data. To avoid deleting all existing data, retrieve any data you want to retain first, and send it back with this request. For example, if you want to add a new tag to a wiki definition entry, retrieve the existing tags, and send them all back with the new tag in the update request. See Retrieve a wiki for more information.
See Authenticating requests for information about how to authenticate the request.
To update a wiki...
- Retrieve the existing wiki definition using a GET request. See Retrieve a wiki for more details.
- Edit the wiki definition Atom document to include the information that you want to change.
- Send the updated document using a PUT request to the following URI:
Table 1. Atom API GET request details
Method Resource URI Input representation PUT wiki definition Determine the resource URI in either of the following ways:
- The value of the href attribute of the <link rel="edit"> or <link rel="self"> elements in the wiki definition Atom entry of the wiki, which is available from the available wikis collection or my wikis feed.
- You can construct the URI using the following syntax: /basic/api/wiki/{wiki-label}/entry where {wiki-label} is the value of the <td:label> element in the wiki definition Atom entry document.
wiki definition
You can use one or more of these input parameters with the PUT request. Separate multiple parameters with an ampersand (&).
Table 2. Input parameters
Parameter Description removeTag Removes the tag that is specified as a string from the wiki definition document. Specify this parameter multiple times to remove multiple tags or leave the value empty to remove all tags. tag Adds a tag that is specified as a string to the wiki. Specify this parameter multiple times to add multiple tags. If the tag parameter and removeTag parameter are both specified and pass the same tag string, the removeTag parameter is given higher priority.
Input
Provide an updated wiki definition Atom entry document.Note: The content type of the Atom entry document must be application/atom+xml.
Output
None.Returned HTTP headers
HTTP/1.1 200 OK
Indicates that the wiki definition entry was successfully updated. If an error occurs, this header will contain one of the error codes below.
- HTTP/1.1 401 Unauthorized
- HTTP/1.1 404 Not Found
Parent topic
Work with wikisRelated reference
Wiki defintion content
});