edit psml property
API Support | Available since | Last updated | Output |
---|---|---|---|
5.5912 | 5.9800 | xml |
Description
Edit a property found in a fragment of the URI provided.
The fragment can be specified using the parameter fragment
. If it is not present, the parameter oldvalue
must be specified as it is used to retrieve the fragment from the content.
If the parameters fragment
and oldvalue
are both specified, only the properties in that fragment and matching the old value specified are edited.
Only the first fragment containing the property found (if not specified) is modified but all the occurrences of the properties matching the parameters provided are edited in that fragment.
This service cannot be used for properties with datatype="[markup|xref|link]"
or multiple="true"
.
Parameters
Name | Description | Required | Type | Default |
---|---|---|---|---|
name | The name of the property to edit | yes | string | |
newvalue | The new value for the property (XML markup is treated as text) | yes | string | |
fragment | The fragment ID to edit (required if oldvalue is not specified). Using default edits metadata properties | maybe | string | |
oldvalue | The old value of the property (required if fragment is not specified) | maybe | string |
Permission
This service requires contributor or higher.
Response
The XML output follows this format:
<property-modification fragment="123" uriid="456"> <property name="mylabel" value="my new value" /> </property-modification>
Error Handling
Code | Cause / Description |
---|---|
0x1206 | Invalid media type |
0x120B | Error processing XRefs |
0x120C | Error creating fragment |
0x120D | Content validation error |
0x1218 | Fragment not found with specified content |