/api/asset/relate [GET]

Usage

Returns a list of all relationships that pass through a given asset.

While you can request these values for grandchildren and great-grandchildren etc. using the indirect argument, we normally suggest using the more targeted /api/asset/before and /api/asset/after functions.

Details

DetailValue
GroupAsset
From Server Version0.9.0
PermissionGuest
MethodsGET
Parameters
ParameterNotesMeaning
idInteger [Required]The ID of the asset
indirectBoolean (0)Set to '1' to return recursive results (all grandchildren etc. This may have a negative performance impact.)
formatString (xml)Either 'xml' or 'json'

Examples

Call
[GET] http://ardiserver.com/api/asset/relate?id=925
Success (XML)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<response>
   <relatedto rel="2" asset="5" name="Showroom Floor" dir="up"/>
   <relatedto rel="2" asset="9" name="Front Left Wheel" dir="down"/>
   <relatedto rel="2" asset="10" name="Front Right Wheel" dir="down"/>
   <relatedto rel="2" asset="11" name="Rear Left Wheel" dir="down"/>
   <relatedto rel="2" asset="12" name="Rear Right Wheel" dir="down"/>
   <relatedto rel="2" asset="17" name="Engine" dir="down"/>
   <relatedto rel="2" asset="19" name="Drivers Seat" dir="down"/>
</response>
Success (JSON)
[{
	"relatedto": [{
		"rel": "2",
		"asset": "5",
		"name": "Showroom Floor",
		"dir": "up"
	}, {
		"rel": "2",
		"asset": "9",
		"name": "Front Left Wheel",
		"dir": "down"
	}, {
		"rel": "2",
		"asset": "10",
		"name": "Front Right Wheel",
		"dir": "down"
	}, {
		"rel": "2",
		"asset": "11",
		"name": "Rear Left Wheel",
		"dir": "down"
	}, {
		"rel": "2",
		"asset": "12",
		"name": "Rear Right Wheel",
		"dir": "down"
	}, {
		"rel": "2",
		"asset": "17",
		"name": "Engine",
		"dir": "down"
	}, {
		"rel": "2",
		"asset": "19",
		"name": "Drivers Seat",
		"dir": "down"
	}, {
		"rel": "2",
		"asset": "20",
		"name": "Front Passenger Seat",
		"dir": "down"
	}, {
		"rel": "2",
		"asset": "21",
		"name": "Rear Left Seat",
		"dir": "down"
	}, {
		"rel": "2",
		"asset": "22",
		"name": "Rear Right Seat",
		"dir": "down"
	}
}]

Other Versions