/api/metadata/relation [POST]

Usage

Creates a new relationship, or returns the ID of an existing relationship if one already exists. This is part of the core API.

Details

DetailValue
GroupAsset
From Server Version0.9.0
PermissionAdmin
MethodsPOST
Parameters
ParameterNotesMeaning
nameString [Required]The name of the new relationship
usnameString [Requred]The 'child-to-parent' name. Prefixed by 'is'
dsnameString [Required]The 'parent-to-child' name
typeString [Required]logical, physical or hierarchy
optionsString (None)Any options that apply to the new relationship
idInteger]The ID of the existing property (if updating)
formatString (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"]
}]

Other Versions

/api/metadata/relation [POST]
/api/metadata/relation [DELETE]