Add Users to User Group
OVERVIEW
Overview
Add multiple active users to an existing user group in Publisher
Since v5.0
HTTP Request
PUT /api/2/groups/<ID>/users
HTTP Request Object
List of user emails or IDs, either in JSON or XML format.
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the user group to update |
HTTP Headers
HTTP Request Header | Description | Example |
---|---|---|
Authorization | The API Authorisation token. | "Bearer XXXXXXXXXXXXX" |
Accept |
The format of the expected response
If no parameter is set, JSON is the default response given. |
"application/xml" |
Content-Type |
The format of the provided content
If no parameter is set, JSON is the expected content by default. |
"application/json" |
HTTP Response
Success
HTTP response 200 with User Group object
(Example below)
Error
Example HTTP Request & Response
PUT
http://example.com/context/api/2/groups/3/users
JSON Request
{
"group":{
"users":[
"11",
"user@domain.com"
]
}
}
JSON Response
{
"group": {
"id": 20,
"name": "New user group",
"users": [
3,
11,
45
],
"createddate": "28-05-2018 11:03:00:000",
"organisationcount": 1
}
}
Is it possible to delete a member from a user group using the publisher API?
Comments
1 Comments