Get Related Business Objects
3 min
you can get all the related business objects that are linked to a business object base url https //{tenant url}/api/odata/businessobject/{business object name}('{business object unique key}')/{relationship name} ensure the business object name is suffixed with an "s" get related business objects example here is an example to get related business objects linked to an incident url https //{tenant url}/api/odata/businessobject/incidents ('0a8c17c5df534513aaccbb543c60b1d5')/incidentcontainsjournal \<font color="#ffffff">method\</font> get header name authorization jtw token/session key/rest api key status code 200 response payload click to view response payload { "@odata context" "{tenant url}/api/odata/$metadata \#collection(metadata journal)", "value" \[ { "category valid" "079449cd8c0040e7b580ad0dffac76fb", "category" "outgoing email", "createdby" "ataylor", "createddatetime" "2019 02 01t04 55 28z ", "journaltype" "email", "lastmodby" "ataylor", "lastmoddatetime" "2019 02 01t04 55 28z ", "owner valid" null, "owner" null, "ownerteam valid" null, "ownerteam" null, "ownertype" "", "parentlink category" "incident", "parentlink recid" "0a8c17c5df534513aaccbb543c60b1d5", "parentlink" null, "recid" "06e745a9f96f412cb92db567911d8f4f", "subject" "incident# 21206 is assigned to your group", "typealias" null, "publishtoweb" false, "attachmentname" null, "attachmentextension" null, "attachmentdata" "", "readonly" false, "isnewrecord" false, "isunread" false, "parentowner" "rthomas", "unreadtransition" false } ] } unsuccessful responses invalid url scenario trying to get related business objects when the url is invalid invalid url examples https //{tenant url}/api/odata/businessobject/incident('0a8c17c5df534513aaccbb543c60b1d5')/incidentcontainsjournal header name authorization sessionkey code ism 4004 description bad request message \[ "no service for type 'microsoft odata edm iedmmodel' has been registered " ] \<font color="#ffffff">http status code\</font> 404 invalid recid scenario trying to get related business objects when the recid of the linked main business object is invalid example https //{tenant url}/api/odata/businessobject/incidents('1234')/incidentcontainsjournal header name authorization sessionkey code ism 4000 description invalid request message \[ "linked resource does not exist " ] \<font color="#ffffff">http status code\</font> 400
