Document Properties Marker |
---|
doctype | addon-component |
---|
override | false |
---|
|
Short Description | Adds a property to a document. |
|
---|
Doctype | addon-component | hide |
---|
Name | Property Service / POST |
|
---|
Short Name | POST |
|
---|
Parent | |
|
---|
Audience | Name List |
---|
render-no-hits-as-blank | true |
---|
addon-component | role |
---|
property | Audience |
---|
|
|
|
---|
Type | Name List |
---|
doctype | addon-component-type |
---|
render-no-hits-as-blank | true |
---|
names | REST Method |
---|
property | Type |
---|
|
|
|
---|
Subject | Name List |
---|
doctype | subject |
---|
property | Subject |
---|
|
|
|
---|
Categories | Name List |
---|
doctype | category |
---|
property | Categories |
---|
|
|
|
---|
Tags | |
|
---|
Iteration | | hide |
---|
Extension | Web API Extension |
|
---|
Since | 1.1 |
|
---|
Path | Parent Property |
---|
add-link | false |
---|
property | Path |
---|
property-name | Path |
---|
|
|
|
---|
Deprecated | | hide |
---|
Removed | | hide |
---|
Sort Key | 00200 | hide |
---|
|
Section |
---|
index | true |
---|
show-title | false |
---|
title | Description |
---|
|
Adds a property to a document. Transclusion |
---|
document | Please Backup your Data first! |
---|
ids | Summary |
---|
| |
Properties do not track modification date and ETag. Therefore the returned information refers to the enclosing document. |
Section |
---|
|
All path parameters are required to be specified. Section |
---|
| Since version 10.0 this parameter refers to the current or reference property name. Prior to that version the property referred to the new The name of the requested property. Version Box |
---|
| | property name.
Section |
---|
| 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.
|
Section |
---|
| The optional comment for the version. If no new version is created, the current comment is overridden. The parameter is available since version 1.2.
|
|
Section |
---|
|
The format of the representation to post to the URL may be XML or JSON. Here is the basic structure in JSON: Code Block |
---|
{
"name": "",
"value": "",
"controls": "",
"position": "",
"ref": ""
} |
Only the following position values are allowed: before - insert the new property before the referenced (ref ) propertyafter - insert the new property after the referenced (ref ) propertyfirst - insert the new property at the first positionlast - insert the new property at the last position
The ref parameter allows to specify an existing document property. This is relevant if new properties are added relative to an existing property. If the property specified by ref cannot be found, 404 is returned. Version Box |
---|
|
|
Since version 10.0 the name
path parameter is used to reference the existing resource on the server. This may either be the current name of the resource or – in case of adding a new property – the name of the property relative to which the new property is added.
Therefore:
The name property in the JSON file refers to the new property name. If the name is not altered, the name may be omitted.The name
path parameter refers to the reference property name (ref
).
If ref
is specified it overrides the path parameter.
Section |
---|
|
The following examples show usage scenarios for this service. Version Box |
---|
| The following examples apply since version 10.0. For previous version please refer to the version box below. |
Example Box |
---|
|
title | Insert a Property Value |
---|
|
Shows how a property is added in front of an existing property.
The reference property is specified with the URL parameter Sort Key
.
Code Block |
---|
{
"name": "New Property's Name",
"value": "The value of the new property.",
"position": "before"
} |
Example Box |
---|
title | Insert a Property with Controls |
---|
|
Besides setting the value, the controls may also be set.
Code Block |
---|
{
"name": "New Property's Name",
"value": "The value of the new property.",
"controls": "hide",
"position": "before"
} |
Version Box |
---|
until | 9.
xFor all examples keep in mind: The name of the property, as well as the document it is part of, is specified in the URL
.Therefore the ref
property must be set.
Example Box |
---|
title | Insert a Property Value |
---|
|
Shows how a property is added in front of an existing property (Sort Key in this case). Code Block |
---|
{
"value": "The value of the new property.",
"position": "before",
"ref": "Sort Key"
} |
|
Example Box |
---|
title | Insert a Property with Controls |
---|
|
Besides setting the value, the controls may also be set. Code Block |
---|
{
"value": "The value of the new property.",
"controls": "hide",
"position": "before",
"ref": "Sort Key"
} |
|
Section |
---|
title | Subordinate Components |
---|
|
Display Table |
---|
doctype | addon-component |
---|
render-no-hits-as-blank | true |
---|
select | Name, Short Description |
---|
restrict-to-immediate-children | true |
---|
sort-by | Sort Key, Name |
---|
|
|
...