Documentation

Group API

QuickStart

Creating a group with users inside Domo is easy to do and only requires two steps

  1. Create a group
  2. Add a user to a group
  3. Remove a user from a group

After creating a group, you will need to execute the second step and third steps as more users need to be added or removed from a group.

NOTE: In order to utilize this Quickstart you will need to obtain an access token or you can leverage any of Domo’s SDKs which will also handle authentication.

Step 1: Create a group

Groups are collections of users. Group APIs makes it easy to manage a large number of users that are related in some way. Groups allow you to set access rights to data that stays consistent even when the group members may change. Groups are also a convenient way to communicate with a group of related users inside Domo's collaboration tool, Buzz.

This code creates a group via the Group API:

Sample Request

See it in your language

See this sample request in Java, Python.
POST https://api.domo.com/v1/groups HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

{
  "name": "Groupy Group"
}

Domo returns a new Group object with all the relevant details:

Sample Response

HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8

{
  "id": 876655018,
  "name": "Groupy Group",
  "active": true,
  "creatorId": "87659738",
  "default": false
}

Once you create the group, store the id value to group name in your own database to utilize when adding users with the User API or applying data permissions inside with the Personalized Data Permission Policy (PDP) API.

Step 2: Add user(s) to a group

With a new group_id, add an existing user_id (from User API) to the group:

Sample Request

See it in your language

See this sample request in Java, Python.
PUT https://api.domo.com/v1/groups/876655018/users/27
Content-Type: application/json
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

Domo will return a parameter of success or error based on the group ID being valid.

Sample Response

HTTP/1.1 204 No Content

Step 3: Remove user(s)

Similar to adding a user to a group, you will need both the group_id and user_id in order to remove a user from a group:

Sample Request

See it in your language

See this sample request in Java, Python.
DELETE https://api.domo.com/v1/groups/876655018/users/27 HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

Domo will return a parameter of success or error based on the group ID being valid.

Sample Response

HTTP/1.1 204 No Content

Next steps

Congrats. you’ve now have a group of users you’ve created in Domo.

You may want to learn how to manage a groups in more detail or explore these other topics:


Need additional help?

No problem, we'd love to help. Explore additional guides and articles or join other developers in Domo's Developer Forum.  For further help, feel free to email us or contact our sales team.