---
updatedAt: 2026-05-12T10:00:05.000Z
---

# Retrieve groups

This operation returns an object containing information about all of the groups to which the current user belongs.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "Counts": {
        "description": "Counts holds the users, sites, and applications associated with the group (that the current user can see)",
        "properties": {
          "apiCount": {
            "format": "int64",
            "type": "integer"
          },
          "applicationCount": {
            "format": "int64",
            "type": "integer"
          },
          "mobileApplicationCount": {
            "format": "int64",
            "type": "integer"
          },
          "siteCount": {
            "format": "int64",
            "type": "integer"
          },
          "userCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CreatedBySwagger": {
        "description": "CreatedBySwagger contains information about the user who created the group",
        "properties": {
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorMessage": {
        "description": "ErrorMessage describes the error",
        "properties": {
          "code": {
            "format": "int64",
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "GroupsClient": {
        "description": "GroupsClient represents information about the group's associated client",
        "properties": {
          "groupID": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "GroupsPageData": {
        "description": "a unique schema ID for swagger page data",
        "properties": {
          "filteredCount": {
            "format": "int64",
            "type": "integer"
          },
          "totalCount": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "group": {
        "properties": {
          "assetIDs": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "client": {
            "$ref": "#/components/schemas/GroupsClient"
          },
          "clientGroupID": {
            "format": "int64",
            "type": "integer"
          },
          "clientID": {
            "format": "int64",
            "type": "integer"
          },
          "counts": {
            "$ref": "#/components/schemas/Counts"
          },
          "created": {
            "format": "int64",
            "type": "integer"
          },
          "createdBy": {
            "$ref": "#/components/schemas/CreatedBySwagger"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "groupsMessage": {
        "properties": {
          "collection": {
            "items": {
              "$ref": "#/components/schemas/group"
            },
            "type": "array"
          },
          "page": {
            "$ref": "#/components/schemas/GroupsPageData"
          }
        },
        "type": "object"
      }
    }
  },
  "info": {
    "license": {
      "name": "(c) Copyright 2020 WhiteHat Security"
    },
    "title": "Groups API",
    "version": "2.0.0"
  },
  "openapi": "3.0.1",
  "paths": {
    "/api/groups": {
      "get": {
        "description": "This operation returns an object containing information about all of the groups to which the current user belongs.",
        "operationId": "groups",
        "parameters": [
          {
            "description": "Offset begin showing results from item number n.",
            "in": "query",
            "name": "offset",
            "schema": {
              "format": "int64",
              "type": "integer",
              "x-go-name": "Offset"
            },
            "x-go-name": "Offset"
          },
          {
            "description": "Limit results to n number of items.",
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int64",
              "type": "integer",
              "x-go-name": "Limit"
            },
            "x-go-name": "Limit"
          },
          {
            "description": "Sort order results by the given field.\nPrefix the field name with '-' to order in descending order.\nE.g., '-name' sorts results in descending order using the  field 'name'",
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string",
              "x-go-name": "Sort"
            },
            "x-go-name": "Sort"
          },
          {
            "description": "Filter results to groups containing the specified names",
            "explode": false,
            "in": "query",
            "name": "name",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "x-go-name": "Name"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups with the specified ids",
            "explode": false,
            "in": "query",
            "name": "id",
            "schema": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array",
              "x-go-name": "ID"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups that were created on or after the specified datetime",
            "explode": false,
            "in": "query",
            "name": "createdStart",
            "schema": {
              "items": {
                "format": "date-time",
                "type": "string"
              },
              "type": "array",
              "x-go-name": "CreatedStart"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups that were created on or before the specified datetime",
            "explode": false,
            "in": "query",
            "name": "createdEnd",
            "schema": {
              "items": {
                "format": "date-time",
                "type": "string"
              },
              "type": "array",
              "x-go-name": "CreatedEnd"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups linked to the specified client ids",
            "explode": false,
            "in": "query",
            "name": "client.id",
            "schema": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array",
              "x-go-name": "ClientID"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups containing the specified asset ids",
            "explode": false,
            "in": "query",
            "name": "assetID",
            "schema": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array",
              "x-go-name": "AssetID"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups linked to the specified client names",
            "explode": false,
            "in": "query",
            "name": "client.name",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "x-go-name": "ClientName"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups created by the specified user ids",
            "explode": false,
            "in": "query",
            "name": "createdBy.id",
            "schema": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array",
              "x-go-name": "CreatedByUserID"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups created by the specified usernames",
            "explode": false,
            "in": "query",
            "name": "createdBy.name",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "x-go-name": "CreatedByUsername"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups containing the specified site ids",
            "explode": false,
            "in": "query",
            "name": "siteID",
            "schema": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array",
              "x-go-name": "SiteID"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups containing the specified application ids",
            "explode": false,
            "in": "query",
            "name": "applicationID",
            "schema": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array",
              "x-go-name": "ApplicationID"
            },
            "style": "form"
          },
          {
            "description": "Fields allows the user to specify optional fields returned in the groups response.\nCurrently, the supported options are <b>assetIDs</b>, <b>client</b>, <b>onlyEditableGroups</b>, <b>createdBy</b>, <b>counts</b>.<br>\n<b>assetIDs</b> which will return a list of asset ids associated with each group\n<b>client</b> which will return client information of the group\n<b>onlyEditableGroups</b> which will return the groups which can be edited by the user\n<b>createdBy</b> which will return the information of the user the group was created by\n<b>counts</b> which will return asset count associated with the group",
            "explode": true,
            "in": "query",
            "name": "fields",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "x-go-name": "Fields"
            },
            "style": "form"
          },
          {
            "description": "Filter results to groups that are associated to the given User IDs",
            "explode": false,
            "in": "query",
            "name": "associatedToUserID",
            "schema": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array",
              "x-go-name": "AssociatedToUserID"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/groupsMessage"
                }
              }
            },
            "description": "GroupsResponse provides a list of groups"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            },
            "description": "BadRequestResponse indicates a request with invalid parameters"
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access"
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized"
          },
          "500": {
            "description": "GenericError generic error"
          }
        },
        "summary": "Retrieve groups",
        "tags": [
          "Groups API v2.0"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com/"
    }
  ],
  "tags": [
    {
      "name": "Groups API v2.0"
    }
  ],
  "x-explorer-enabled": false,
  "x-readme": {
    "proxy-enabled": true
  }
}
```