---
title: "List all ancestor groups"
method: GET
path: "/api/v4/projects/{id}/groups"
tags: ["projects"]
---

# List all ancestor groups

`GET /api/v4/projects/{id}/groups`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/groups`
- Auth: none declared

Lists all ancestor groups for a specified project.

## Path parameters

- `id` string, required

## Query parameters

- `search` string
- `skip_groups` integer[]
- `with_shared` boolean
- `shared_visible_only` boolean
- `shared_min_access_level` 10 | 15 | 20 | 25 | 30 | 40 | 50
- `page` integer
- `per_page` integer

## Response `200`

List all ancestor groups

- APIEntitiesPublicGroupDetails[]
  - `id` integer, required
  - `web_url` string, required
  - `name` string, required
  - `avatar_url` string, required
  - `full_name` string, required
  - `full_path` string, required

## Other responses

- `403`: Unauthenticated
- `404`: Not found

---

[API](https://skmtc.dev/gitlab/apis/gitlab-api.md) - [All operations](https://skmtc.dev/gitlab/apis/gitlab-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitlab/apis/gitlab-api/revisions/b234947ef3f2?raw)
