User Group APIs

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

  • "application/json"
  • "application/xml"

If no parameter is set, JSON is the default response given.

"application/xml"
Content-Type

The format of the provided content

  • "application/json"
  • "application/xml"

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

See API Error messages 

 

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
    }
}

 

 

Comments


1 Comments

Last Updated: Nov 08,2024