Additional Examples
Get a List of User Records Related to a Single Role Record
The GET request should contain a reference to the origin record (for example, the Role record io_role/39b59cc4-692c-4e65-be55-6ac96ae7d2f7) and the multiple relationship identifiers (for example, the io_users multiple relationship to users). The request body should be empty.
GET https://localhost:8080/v2/io_role/39b59cc4-692c-4e65-be55-6ac96ae7d2f7/io_users
Response
The response is a JSON representation of a list of User records related to io_role/39b59cc4-692c-4e65-be55-6ac96ae7d2f7. Following is an example Status Code 200 response for a request to retrieve User records related to a Role record:
[{
"io_updated_by": "764f0869-8b2a-4e43-8f23-88f593863eff"
"io_active": false
"io_tags": null
"io_description": null
"io_last_name": "Brown"
"io_username": "brown"
"io_overrides": null
"io_first_name": "Shirley"
"io_deleted": false
"io_private": false
"io_full_name": "Shirley Brown"
"io_last_login_on": "2013-10-31T13:00:00.000-03:00"
"io_platform_changes_permitted": null
"io_created_on": "2012-06-28T01:48:55.187-03:00"....
}, {
"io_updated_by": "764f0869-8b2a-4e43-8f23-88f593863eff"
"io_active": false
"io_tags": null
"io_description": null
"io_last_name": "Smith"
"io_username": "vincent"
"io_overrides": null
"io_first_name": "Vincent"
"io_deleted": false
"io_private": false
"io_full_name": "Vincent Smith"
"io_last_login_on": "2013-10-28T21:47:00.000-03:00",
...,{},....
....]
Add Records to a Multiple Relationship
POST https://localhost:8080/v2/io_role/c088b2cd-509c-4ec5-82db-754a57c32a61/io_users
Input
No input parameters. The request body is a JSON representation of an array of UUIDs of the records to add to the io_users multiple relationship of the /io_role/c088b2cd-509c-4ec5-82db-754a57c32a61 record.
Body
["bba20a6a-b9dc-11e0-adfd-00ff8314382b", "bbe3ceb4-b9dc-11e0-adfd-00ff8314382b"]
Response Example
The response is a JSON representation of the value true. Following is an example Status Code 200 response:
true
Remove Records From a Multiple Relationship
DELETE https://localhost:8080/v2/io_role/c088b2cd-509c-4ec5-82db-754a57c32a61/io_users?uuids=bba20a6a-b9dc-11e0-adfd-00ff8314382b%2C+bbe3ceb4-b9dc-11e0-adfd-00ff8314382b
Input
Parameters are an array of record UUIDs specified in the uuids key to define the records to remove from the multiple relationship of the origin record (io_role/c088b2cd-509c-4ec5-82db-754a57c32a61). The body is empty.
Response Example
The response is a JSON representation of a true value, which confirms that all records are successfully removed from the multiple relationship. Following is an example Status Code 200 response:
true
For more information: