/api/metadata/property [POST]

Usage

Creates a new property, or returns the ID of an existing property if one already exists.

Details

DetailValue
GroupAsset
From Server Version0.9.0
PermissionAdmin
MethodsPOST
Parameters
ParameterNotesMeaning
nameString [Required]The name of the new property]
typeString [Required]The type of the new property]
optionsString (None)Any options that apply to the new property]
idInteger]The ID of the existing property (if updating)]
formatString (xml)Either 'xml' or 'json'

Examples

Call
[POST] http://ardiserver.com/api/asset/property?name=Temperature&type=measurement&default=%7C0%7C100%7C1%7CDeg%20C

Note that in the above URL, the 'default' parameter is encoded

The option being saved is default=25|0|100|1|Deg C, meaning that the default value for the property should be 25 degrees C, ranged between 0-100 and with 1 decimal place.

Success (XML)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<success>
   <message>Property Created</message>
   <id>23</id>
</success>
Success (JSON)
[{
	"message": ["Already Exists"],
	"id": ["31"]
}]

Other Versions