Properties API
This page describes the properties
API, which can be used to
access and manipulate JCR properties.
The Properties API is best used as a content management API. For content delivery, we recommend using our Delivery API. |
GET
Returns a string representation of a property from the specified workspace and path.
Parameters
Parameter | Description | Type | Data Type |
---|---|---|---|
|
required The name of the workspace. |
|
|
|
optional, default is The absolute path to the property within the workspace. |
|
|
Example
Read the keywords
property of the travel site from the website
workspace.
Get JSON Get XML
curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/properties/v1/website/travel/keywords' \ -u superuser:superuser
curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/properties/v1/website/travel/keywords' \ -u superuser:superuser -H "Accept: application/xml"
Get JSON Get XML
{
"name":"keywords",
"type":"String",
"multiple":false,
"values":[
"Magnolia CMS, Open Source CMS, Content management, Demonstration project, Demo project, Demo, Online demo, Website builder"
]
}
<property>
<multiple>false</multiple>
<name>keywords</name>
<type>String</type>
<values>
<value>Magnolia CMS, Open Source CMS, Content management, Demonstration project, Demo project, Demo, Online demo, Website builder</value>
</values>
</property>
PUT
Adds a new property to a node at the specified workspace and path.
Parameters
Parameter | Description | Type | Data Type |
---|---|---|---|
|
required The name of the workspace. |
|
|
|
optional, default is The absolute path to the node within the workspace where the new property should be added. |
|
|
|
required The name of the new property. |
|
|
|
required The value of the new property. |
|
|
|
optional, default is PropertyType to be added. |
|
|
|
optional, default is Indicates if the property should be a multivalue property. |
|
|
POST
Creates a property or updates an existing property of a node at the specified workspace
and
path
. Other existing properties and subnodes are not affected.
Do not use JSON body to create or update the properties ( curl http://localhost:8080/magnoliaAuthor/.rest/properties/v1/website/travel/title\?name\=foo\&value\=bar \ -H "Content-Type: application/json" \ -X POST -i \ --user superuser:superuser |
Parameters
Parameter | Description | Type | Data Type |
---|---|---|---|
|
required The name of the workspace. |
|
|
|
optional, default is The absolute path to the node within the workspace where the new property should be added. |
|
|
|
required The name of the new property. |
|
|
|
required The value of the new property. |
|
|
|
optional, default is PropertyType to be added. |
|
|
|
optional, default is Indicates if the property should be a multivalue property. |
|
|
DELETE
Deletes a property of a node at the specified workspace and path.
Parameters
Parameter | Description | Type | Data Type | ||
---|---|---|---|---|---|
|
required The name of the workspace. |
|
|
||
|
optional, default is The path of the property which you want to delete.
|
|
|