You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Runs an update on a single projectdoc document based on an uploaded file. The information will patch the existing document or create a new one if the document does not exist.
The service is intended to update a projectdoc document based on a CSV file. The CSV file provides properties and sections only for one document.
If the referenced document does not exist, it will be created. Otherwise the existing document is patched. The document is identified by the doctype and the name.
Each line in the comma-separated values (CSV) file is defining a property or section. The first column contains the property name or section title, the second column the property value or section body.
Parameters
The following parameters are supported.
doctype
The identifier of the doctype for all documents described in the CSV file.
space-key
The key to the space where the new document will be stored.
If the space key is specified it will be a constraint on searching the document. In case there are two documents with the same name and doctype, the space key can be used to identify the intended document.
location
The location within the space that defines the parent page.
Either provide
- the title of the page (not the name of the document),
- the page identifier surrounded by curly braces (e.g.
{123456}
, the value of space-key
is not taken into account in this case), or - the keyword
{homepage}
(to store the document to the doctype's homepage).
If the page title starts with a curly brace ({
) and ends with one (}
), you need to escape it with a backslash ( \
) as in \{My Page Title}
.
section-names
A comma-separated list of names used as column headers in the CSV file that refer to sections.
Every column header not found in this list is considered to be a property.
new-version
Flag to control whether a new version should be created. If set to false
, the document is saved without creating a new version. Defaults to true
to create a new version.
The parameter is available since version 1.2.