Service Modules > Scheduling and Optimization > Service Board > Max for Developers > Appendix B: Max REST API > REST API Version 2: Multiple Relationships > Get Related Records of Specified Target Object From Multiple Relationships
Get Related Records of Specified Target Object From Multiple Relationships
Use this endpoint to retrieve arrays of records related to records in multiple relationships that specify a target object by using the full identifier of the other end of the multiple relationship as a parameter. This is useful in cases where more than one relationship has the same relationship identifier and same target objects but different sources.
For example, the io_role and io_group objects have an io_users multiple relationship that points to the same target object as io_user. To request records related to a specific user record, you must use an additional parameter to indicate that you want records that are related to that specific user with Roles or Groups.
Method
GET
URL
/v2/<object_full_identifier>/<record_uuid>/<target_object_full_identifier>/<multiple_relationship_full_identifier>
Parameters
Response Content Type
application/json
Input Example
The input should be a GET request with the following URL, for example:
GET https://localhost:8080/v2/io_user/bb78d74e-b9dc-11e0-adfd-00ff8314382b/io_role/io_users
Response Example
The response is a JSON array that represents the related records. Following is an example Status Code 200 response for the Object field:
[{
" {
"__object_identifier": "io_role",
"io_updated_by": "764f0869-8b2a-4e43-8f23-88f593863eff",
"io_name": "Standard User",
"io_active": true,
"io_tags": null,
"io_description": null,
"io_overrides": null,
"io_deleted": false,
"io_private": false,
"io_notes": null

....
},
{
"__object_identifier": "io_role",
"io_updated_by": "764f0869-8b2a-4e43-8f23-88f593863eff",
"io_name": "System Administrator",
"io_active": true,
"io_tags": null,
"io_description": null,
"io_overrides": null,
"io_deleted": false,
"io_private": false,
"io_notes": null, ...},{},....
]
* 
The __object_identifier key defines the full identifier of the object to which the related record belongs.
Input Example
Following is an example GET request that does not send the io_target_object_id parameter (io_role is missing) where more than one relationship has the same identifier and target object:
GET https://localhost:8080/v2/io_user/bb78d74e-b9dc-11e0-adfd-00ff8314382b/io_users
Response Example
The response is HTTP Error Status Code 400 with the following the error message:
400: Missing or invalid required parameter. There are more than one relationships with identifier io_users and target Object io_user. Please specify target Object in the URL.
For more information:
Was this helpful?