This is an old revision of the document!
/api/metadata/property [POST]
Usage
Creates a new property, or returns the ID of an existing property if one already exists.
Details
| Detail | Value |
|---|---|
| Group | Asset |
| From Server Version | 0.9.0 |
| Permission | Admin |
| Methods | POST |
Parameters
| Parameter | Notes | Meaning |
|---|---|---|
| name | String [Required] | The name of the new relationship |
| usname | String [Requred] | The 'child-to-parent' name. Prefixed by 'is' |
| dsname | String [Required] | The 'parent-to-child' name |
| type | String [Required] | logical, physical or hierarchy |
| options | String (None) | Any options that apply to the new relationship |
| id | Integer] | The ID of the existing property (if updating) |
| format | String (xml) | Either 'xml' or 'json' |
Examples
Call
[POST] http://ardiserver.com/api/metadata/relation?name=Moves&dsname=Moves&usname=Moved+By&type=physical
The relationship being created is called 'Moves' and it's a physical relationship. When described, it would say that the Motor moves the Machine, and the Machine is moved by the Motor.
Success (XML)
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <success> <message>Created</message> <id>23</id> </success>
Success (JSON)
[{
"message": ["Already Exists"],
"id": ["31"]
}]