Group API

Group API Reference

Group objects allow you to manage a group and users associated to a group. Groups allow you to set access rights, send Buzz messages, or share content that stays consistent even when the group members may change.  The API allows you to create, delete, retrieve a user or a list of users, and update user information.

The group object

Attributes

Property Name Type Description
name string User's full name
id String The ID of the group
name String The name of the group
default Boolean Whether the group is the default group
active Boolean The active status of the group
creatorId String The ID of the user who created the group
memberCount Number The member count of the group
userIds Array The IDs of the users in the group

Retrieve a group

Retrieves the details of an existing group.

Definition

https://api.domo.com/v1/groups/{GROUP_ID}

Arguments

Property Name Type Required Description
group_id string Required The ID of the group

Sample Request

See it in your language

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

Returns

Returns a group object if valid group ID was provided. When requesting, if the group ID is related to a customer that has been deleted, a subset of the group's information will be returned, including a deleted property, which will be true.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

{
    "active": true,
    "id": 2079369920,
    "memberCount": 2,
    "name": "Groupy McGroup"
}

Create a group

Creates a new group in your Domo instance.

Definition

POST https://api.domo.com/v1/groups

Arguments

Property Name Type Required Description
name String Required The name of the group
default Boolean - Whether the group is the default group

Sample Request

See it in your language

See this sample request in Java, Python, and Node.
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",
  "default": false
}

Returns

Returns a group object when successful. The returned group will have user attributes based on the information that was provided when group was created.

Sample Response

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

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

Update a group

Updates the specified group by providing values to parameters passed. Any parameter left out of the request will cause the specific group’s attribute to remain unchanged.

Definition

PUT https://api.domo.com/v1/groups/{GROUP_ID}

Arguments

Property Name Type Required Description
group_id string Required The ID of the group
name String - The name of the group
default Boolean - Whether the group is the default group
active Boolean - If the group is active

Sample Request

See it in your language

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

{
  "name" : "Groupy McGroup",
  "active" : true,
  "default" : false
}

Returns

Returns the parameter of success or error based on the group ID being valid.

Sample Response

HTTP/1.1 200 OK

Delete a group

Permanently deletes a group from your Domo instance.

Warning
This is destructive and cannot be reversed.

Definition

DELETE https://api.domo.com/v1/groups/{GROUP_ID}

Arguments

Property Name Type Required Description
group_id string Required The ID of the group to delete

Sample Request

See it in your language

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

Returns

Returns the parameter of success or error based on the group ID being valid.

Sample Response

HTTP/1.1 204 No Content

List groups

Get a list of all groups in your Domo instance.

Definition

GET https://api.domo.com/v1/groups

Arguments

Property Name Type Required Description
limit long optional The amount of groups to return in the list. The default is 50 and the maximum is 500.
offset long optional The offset of the group ID to begin list of groups within the response.

Sample Request

See it in your language

See this sample request in Java, Python, and Node.
GET https://api.domo.com/v1/groups?offset=20&limit=10
Content-Type: application/json
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

Returns

Returns all group objects that meet argument criteria from original request.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

[
    {
        "default": false,
        "id": 2079369923,
        "memberCount": 30,
        "name": "Sales Team East"
    },
    {
        "default": false,
        "id": 1117375123,
        "memberCount": 55,
        "name": "Sales Team West"
    }
]

Add a user to a group

Add user to a group in your Domo instance.

Definition

PUT https://api.domo.com/v1/groups/{GROUP_ID}/users/{USER_ID}

Arguments

Property Name Type Required Description
group_id string Required The ID of the group
user_id string Required The ID of the user being added

Sample Request

See it in your language

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

Returns

Returns the parameter of success or error based on the group ID being valid.

Sample Response

HTTP/1.1 204 No Content

List users in a group

List the users in a group in your Domo instance.

Definition

GET https://api.domo.com/v1/groups/{GROUP_ID}/users

Arguments

Property Name Type Required Description
group_id string Required The ID of the group
limit long optional The amount of groups to return in the list. The default is 50 and the maximum is 500.
offset long optional The offset of the group ID to begin list of groups within the response.

Sample Request

See it in your language

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

Returns

Returns IDs of users that are a part of the requested group.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

[ 87659738, 809129372 ]

Remove a user from a group

Remove a user from a group in your Domo instance.

Definition

DELETE https://api.domo.com/v1/groups/{GROUP_ID}/users/{USER_ID}

Arguments

Property Name Type Required Description
group_id string Required The ID of the group
user_id string Required The ID of the user being deleted

Sample Request

See it in your language

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

Returns

Returns the parameter of success or error based on the group ID being valid.

Sample Response

HTTP/1.1 204 No Content