Updates and renames a section of a projectdoc document.
Updates and renames a section of a projectdoc document.
If your environment does not support the HTTP PATCH method try to use the patch resource at projectdoc/1/patch/document/{id}/section/{name}
as a workaround.
Sections do not track modification date and ETag. Therefore the returned information refers to the enclosing document. ETags are only supported on Confluence platforms version 5.10 and later.
Path Parameter
All path parameters are required to be specified.
name
The title or identifier of the requested section.
Representation
The format of the representation to post to the URL may be XML or JSON.
Note that the title of the document will be overridden by the title or id specified in the URL as path parameter name
.
Positioning of a document is specified with the position
and ref
elements of the representation.
title
The value of the title is the new title for the section.
If no title is specified, the old title is not changed.
content
The content references the section body.
{
"content": "The section content."
}
The body is added verbatim, so it may contain HTML tags.
{
"content": "The <strong>section</strong> content."
}
You may also specify macros as content as shown in the following example.
{
"content": "<p>A paragraph.</p><p><ac:structured-macro ac:name=\"projectdoc-display-table\" ac:schema-version=\"1\"><ac:parameter ac:name=\"doctype\">blank</ac:parameter><ac:parameter ac:name=\"render-no-hits-as-blank\">true</ac:parameter><ac:parameter ac:name=\"select\">Name, Short Description</ac:parameter><ac:parameter ac:name=\"restrict-to-immediate-children\">true</ac:parameter><ac:parameter ac:name=\"sort-by\">Sort Key, Name</ac:parameter></ac:structured-macro></p>"
}
You may enclose the body of a section within an XML element called content
.
{
"content": "<content><p>A paragraph.</p><p><ac:structured-macro ac:name=\"projectdoc-display-table\" ac:schema-version=\"1\"><ac:parameter ac:name=\"doctype\">blank</ac:parameter><ac:parameter ac:name=\"render-no-hits-as-blank\">true</ac:parameter><ac:parameter ac:name=\"select\">Name, Short Description</ac:parameter><ac:parameter ac:name=\"restrict-to-immediate-children\">true</ac:parameter><ac:parameter ac:name=\"sort-by\">Sort Key, Name</ac:parameter></ac:structured-macro></p></content>"
}
ref
While it is technically possible to specify the ref parameter, it has no function for patching a section. Therefore the result for using this parameter is not specified.
position
The only valid position is replace
which is the default.