Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Document Properties Marker
overridefalse
Short DescriptionAdds a section to a projectdoc document.
 

Doctypeaddon-componenthide
NameSection Service / POST
 

Short NamePOST
 

Parent
Parent Property
property-nameName
 

Audience
Name List
render-no-hits-as-blanktrue
addon-componentrole
propertyAudience
 

Type

Name List
doctypeaddon-component-type
render-no-hits-as-blanktrue
namesREST Method
propertyType

 


Subject
Name List
doctypesubject
propertySubject
 

Categories
Name List
doctypecategory
propertyCategories
 

Tags
Tag List
propertyTags
 

Iteration

Iteration
value

filled

finished

hide
ExtensionWeb API Extension
Since1.1
 

Path
Parent Property
add-linkfalse
propertyPath
property-namePath
 

Deprecatedhide
Removedhide
Sort Key00200hide
Section
indextrue
show-titlefalse
titleDescription

Adds a section to a document.

There is no undo! It is strongly recommended to run commands only on backed up instances. Make a backup of your data before starting to work with this API! Consider to run your experiments on a copy of the production data!
projectdoc-boxtransclusion-warningmacro
documentPlease Backup your Data first!
idsSummary

Sections do not track modification date and ETag. Therefore the returned information refers to the enclosing document.

...

Section
titleRepresentation

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.

Warning Box

Section titles do not need to be unique. Although it is not recommended to have sections the the same title, the service does not reject to create one.

The API currently does not provide means to select sections with non-unique names.

Positioning of a document is specified with the position and ref elements of the representation.

Section
titlecontent

The content references the section body.

Code Block
languagejs
{
  "content": "The section content."
}

The body is added verbatim, so it may contain HTML tags.

Code Block
languagejs
{
  "content": "The <strong>section</strong> content."
}

You may also specify macros as content as shown in the following example.

Code Block
languagejs
{
  "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.

Code Block
languagejs
{
  "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>"
}
Section
titleref

Reference an existing section within the document if a section has to be added relative to an existing section.

If a referenced section is not part of the document, a 404 is returned.

The ref parameter is only evaluated for relative positions (before and after).

Section
titleposition

New sections are added after the last section of the document per default. The position can be specified with the position property.

The following positions are valid:

  1. before - insert the new section before the referenced (ref) section
  2. after- insert the new section after the referenced (ref) section
  3. first - insert the new section at the first position
  4. last - insert the new section at the last position (default)
Code Block
languagejs
{
  "content": "The section content.",
  "position": "before",
  "ref": "Summary"
}

...