Creating/Updating a Group
These endpoints allow you to create new groups and modify existing ones in your organization. Groups can be used to organize users and manage permissions collectively. When creating a group, you can specify its name, add an optional description, and assign users. For existing groups, you can update any of these properties using either PUT or POST methods. Authentication via API token is required for all operations.
Creating a GroupPOST /api/v1/groups/
Updating a GroupPUT /api/v1/groups/[GROUP ID]/
or
POST /api/v1/groups/[GROUP ID]/
Required fields:
name | String for the name of the Group. |
Optional fields:
description | String for the description of the Group. |
users | A list of User IDs that comprise the Groups (e.g. [3, 4]). |
Creating a group example
curl 'https://acmeinc.datareportive.com/api/v1/groups/' \
-X POST \
-H 'Authorization: Token [ TOKEN ]' \
-H 'Content-Type: application/json' \
-d '{"name":"My Clients", "description":"A list of my clients", "users":[1,2]}'