Add user to a group
OVERVIEW
Request
POST /groups/{groupid}/users
To add user in a specific group
Request Body
<user>
<userid>100</userid>
</user>
2xx or 3xx in case of success, 4xx or 5xx in case of failure.
Body content in case of failure
<error>
<ref> Error reference code in at which full stack trace can be obtained</ref>
<summery> Details for the error </summery>
<atom:link rel="self" href="…/errors/200" /> // returns the full stack trace and other details for why the error happened
</error>
Mark Salamon, userid needs to be an array of user ID's (integers), e.g.
{
"userid": [999]
}
Remember Content-Type header set to application/json.
For benefit of others wanting same, remember this is for system groups and not site groups - which is:
../showSwaggerUI.action#/Site%20Resource%20APIs/addUserToGroup
Is there a way to make this call with a JSON body? if so, what is the format?
Comments
2 Comments