openapi: 3.1.0
x-stoplight:
  id: 6tw2454j0zttg
info:
  title: Group API
  version: '1.0'
  description: >-
    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
servers:
  - url: https://api.domo.com
    description: Domo API
paths:
  /v1/groups/{group_id}:
    parameters:
      - schema:
          type: string
        name: group_id
        in: path
        required: true
    get:
      summary: Retrieve a group
      tags: []
      responses:
        '200':
          description: >-
            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.
          content:
            application/json:
              schema:
                type: object
                properties:
                  active:
                    type: boolean
                  id:
                    type: integer
                  memberCount:
                    type: integer
                  name:
                    type: string
                x-examples:
                  Example 1:
                    active: true
                    id: 2079369920
                    memberCount: 2
                    name: Groupy McGroup
              examples:
                Example 1:
                  value:
                    active: true
                    id: 0
                    memberCount: 0
                    name: string
      operationId: get-v1-groups-group_id
      description: Retrieves the details of an existing group.
    put:
      summary: Update a group
      operationId: put-v1-groups-group_id
      responses:
        '200':
          description: >-
            Returns the parameter of success or error based on the group ID
            being valid.

            ```text

            HTTP/1.1 200 OK

            ```
      description: >-
        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.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  name: Groupy McGroup
                  active: true
              properties:
                name:
                  type: string
                  description: The name of the group
                active:
                  type: boolean
                  description: If the group is active
            examples:
              Example 1:
                value:
                  name: Groupy McGroup
                  active: true
        description: ''
    delete:
      summary: Delete a group
      operationId: delete-v1-groups-group_id
      responses:
        '204':
          description: >-
            Returns the parameter of success or error based on the group ID
            being valid.


            ```text

            HTTP/1.1 204 No Content

            ```
      description: |-
        Permanently deletes a group from your Domo instance.

        <Warning>
        **This is destructive and cannot be reversed**.
        </Warning>
  /v1/groups:
    get:
      summary: List groups
      tags: []
      responses:
        '200':
          description: >-
            Returns all group objects that meet argument criteria from original
            request.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    default:
                      type: boolean
                    id:
                      type: integer
                    memberCount:
                      type: integer
                    name:
                      type: string
                x-examples:
                  Example 1:
                    - default: false
                      id: 2079369923
                      memberCount: 30
                      name: Sales Team East
                    - default: false
                      id: 1117375123
                      memberCount: 55
                      name: Sales Team West
              examples:
                Example 1:
                  value:
                    - default: false
                      id: 2079369923
                      memberCount: 30
                      name: Sales Team East
                    - default: false
                      id: 1117375123
                      memberCount: 55
                      name: Sales Team West
      operationId: get-v1-groups
      description: Get a list of all groups in your Domo instance.
      parameters:
        - schema:
            type: integer
          in: query
          name: limit
          description: >-
            The amount of groups to return in the list. The default is 50 and
            the maximum is 500.
        - schema:
            type: integer
          in: query
          name: offset
          description: >-
            The offset of the group ID to begin list of groups within the
            response.
    post:
      summary: Create a group
      operationId: post-v1-groups
      responses:
        '200':
          description: >-
            Returns a group object when successful. The returned group will have
            user attributes based on the information that was provided when
            group was created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  active:
                    type: boolean
                  creatorId:
                    type: string
                  default:
                    type: boolean
                x-examples:
                  Example 1:
                    id: 876655018
                    name: Groupy Group
                    active: true
                    creatorId: '87659738'
                    default: false
              examples:
                Example 1:
                  value:
                    id: 876655018
                    name: Groupy Group
                    active: true
                    creatorId: '87659738'
                    default: false
      description: Creates a new group in your Domo instance.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  name: Groupy Group
              properties:
                name:
                  type: string
                  description: The name of the group
              required:
                - name
            examples:
              Example 1:
                value:
                  name: Groupy Group
        description: You must include the name of the group to create.
  /v1/groups/{group_id}/users/{user_id}:
    parameters:
      - schema:
          type: string
        name: group_id
        in: path
        required: true
      - schema:
          type: string
        name: user_id
        in: path
        required: true
    put:
      summary: Add a user to a group
      operationId: put-v1-groups-group_id-users-user_id
      responses:
        '204':
          description: >-
            Returns the parameter of success or error based on the group ID
            being valid.
      description: Add user to a group in your Domo instance.
    delete:
      summary: Remove a user from a group
      operationId: delete-v1-groups-group_id-users-user_id
      responses:
        '204':
          description: >-
            Returns the parameter of success or error based on the group ID
            being valid.
      description: Remove a user from a group in your Domo instance.
  /v1/groups/{group_id}/users:
    parameters:
      - schema:
          type: string
        name: group_id
        in: path
        required: true
    get:
      summary: List users in a group
      tags: []
      responses:
        '200':
          description: Returns IDs of users that are a part of the requested group.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: integer
                x-examples:
                  Example 1:
                    - 87659738
                    - 809129372
              examples:
                Example 1:
                  value:
                    - 87659738
                    - 809129372
      operationId: get-v1-groups-group_id-users
      description: List the users in a group in your Domo instance.
      parameters:
        - schema:
            type: string
          in: query
          name: limit
          description: >-
            The amount of groups to return in the list. The default is 50 and
            the maximum is 500.
        - schema:
            type: string
          in: query
          name: offset
          description: >-
            The offset of the group ID to begin list of groups within the
            response.
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
security:
  - bearerAuth: []
