====/api/metadata/relation [POST]==== ===Usage=== Creates a new relationship, or returns the ID of an existing relationship if one already exists. ===Details== ^Detail^Value^ |Group|Asset| |From Server Version|0.9.0| |Permission|[[permission_guest|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)== Created 23 ==Success (JSON)== [{ "message": ["Already Exists"], "id": ["31"] }] ===Other Versions=== [[/api/metadata/relation_post]] \\ [[/api/metadata/relation_delete]] \\