Add Related Records to a Multiple Relationship
Method
POST
URL
/v2/<object_full_identifier>/<record_uuid>/<multiple_relationship_full_identifier>
Parameters
<null>
Request body: list of record UUIDs to relate
Response Content Type
application/json
Input Example
The input URL should be a POST request with the following URL:
POST https://localhost:8080/v2/io_role/39b59cc4-692c-4e65-be55-6ac96ae7d2f7/io_users
The request body is an array of record UUIDs of the records to relate to the origin record. If the specified origin record (/io_role/39b59cc4-692c-4e65-be55-6ac96ae7d2f7) from the multiple relationship io-users → io_role is from the Role object, for example, you must specify an array of User record UUIDs in the request body. If the origin record is a User record, you must specify a list of Role record UUIDs.
[ "759db0ad-ab90-441c-a7b7-8e2028b26edc",
"30dd574d5a-c7bf-11e0-b724-001ec950a80f",uuid3,
...
]
Response Example
The response is HTTP Status Code 200 plus JSON code that represents a true value. Following is an example Status Code 200 response for a request to add users to the io_users multiple relationship of the specified origin Role record.
true
Error Response Messages
HTTP Status Code
Error Message
400
The body of the request did not contain any data.
404
The record specified to relate the records was not found or some of the records to relate were not found
400
Error adding relationship Records. Exception={...}
500
Internal Server error
For more information:
Was this helpful?