Create User Group

Create a new user group.


Usage examples

#!/usr/bin/env python3

import wyzepal

# Pass the path to your wyzepalrc file here.
client = wyzepal.Client(config_file="~/wyzepalrc")

request = {
    'name': 'marketing',
    'description': 'The marketing team.',
    'members': [1, 2, 3, 4],

result = client.create_user_group(request)

curl -X POST \
    -d 'name="marketing"' \
    -d 'description="The marketing team"' \
    -d 'members=[1,2,3,4]'


Argument Example Required Description
name "marketing" Yes

The name of the user group.

description "The marketing team." Yes

The description of the user group.

members [1,2,3,4] Yes

An array containing the user IDs of the initial members for the new user group.


Example response

A typical successful JSON response may look like:

    "msg": "",
    "result": "success"

An example JSON error response for when the one of the users does not exist:

    "code": "BAD_REQUEST",
    "msg": "Invalid user ID: 500",
    "result": "error"