# List Groups (Team)

List all the groups existing in your team (organization). In the response, each group's ID, name, created time, name,creator etc. are returned. The `page_next` value indicates if there is a next page or not.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Account Operations - Team admin",
    "description": "The official SeaTable API Reference (OpenAPI 3.0).",
    "version": "6.2"
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "cloud.seatable.io"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "metrics-enabled": false,
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "Groups",
      "description": "Manage groups"
    }
  ],
  "components": {
    "securitySchemes": {
      "AccountTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Account-Token](/reference/authentication)."
      }
    },
    "parameters": {
      "page": {
        "name": "page",
        "description": "The page number you want to start showing the entries. If no value is provided, 1 will be used.",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "example": 1,
        "required": false
      },
      "per_page": {
        "name": "per_page",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "description": "The number of results that should be returned. If no value is provided, 25 results will be returned.",
        "example": 25,
        "required": false
      },
      "org_id": {
        "name": "org_id",
        "in": "path",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "required": true,
        "description": "The ID of your team/organization. Numeric. Get it from [Get Team](/reference/getteaminfo). Contact your team admin, if you are not the admin.",
        "example": 1
      }
    }
  },
  "paths": {
    "/api/v2.1/org/{org_id}/admin/groups/": {
      "get": {
        "tags": [
          "Groups"
        ],
        "summary": "List Groups (Team)",
        "operationId": "listGroups",
        "description": "List all the groups existing in your team (organization). In the response, each group's ID, name, created time, name,creator etc. are returned. The `page_next` value indicates if there is a next page or not.",
        "security": [
          {
            "AccountTokenAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/per_page"
          },
          {
            "$ref": "#/components/parameters/org_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "group_name": {
                            "type": "string"
                          },
                          "ctime": {
                            "type": "string"
                          },
                          "creator_name": {
                            "type": "string"
                          },
                          "creator_email": {
                            "type": "string"
                          },
                          "creator_contact_email": {
                            "type": "string"
                          },
                          "size": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "per_page": {
                      "type": "integer"
                    },
                    "page_next": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "groups": [
                    {
                      "id": 51,
                      "group_name": "Sales Group",
                      "ctime": "2020-11-19T08:14:52+00:00",
                      "creator_name": "Michael Jackson",
                      "creator_email": "876543216569491ba42905bf1647fd3f@auth.local",
                      "creator_contact_email": "michael@example.com",
                      "size": 98842
                    },
                    {
                      "id": 52,
                      "group_name": "Marketing Group",
                      "ctime": "2020-11-19T08:18:03+00:00",
                      "creator_name": "Ginger Ale",
                      "creator_email": "12345678d1754bb4afa2c2cb7369d244@auth.local",
                      "creator_contact_email": "ginger@example.com",
                      "size": 162010
                    }
                  ],
                  "page": 1,
                  "per_page": 2,
                  "page_next": true
                }
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 105,
      "1": 212,
      "2": 220,
      "3": 12,
      "4": 20,
      "5": 34,
      "6": 131,
      "7": 31,
      "8": 141,
      "9": 111,
      "10": 187,
      "11": 145
    }
  }
}
```