diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-07-10 08:44:02 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-07-10 08:44:02 +0000 |
commit | e6b91cc357364b14a367b60b4c229d7e0785114d (patch) | |
tree | 3977a731dbefddf5e0e5ce9c876491639b196a0d /doc | |
parent | c7dd9a6e049a6388cd40e7d8eb6678ac7dc1f015 (diff) | |
parent | e6f3452314c73875bbf9560a84706161c25c2831 (diff) | |
download | gitlab-ce-e6b91cc357364b14a367b60b4c229d7e0785114d.tar.gz |
Merge branch '42415-omit-projects-from-get-group-endpoint' into 'master'
Resolve "API: /groups/:name query very slow for groups with many projects"
Closes #42415
See merge request gitlab-org/gitlab-ce!20494
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/groups.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/api/groups.md b/doc/api/groups.md index 53d72509423..11de75039ee 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -210,6 +210,7 @@ Parameters: | --------- | ---- | -------- | ----------- | | `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user | | `with_custom_attributes` | boolean | no | Include [custom attributes](custom_attributes.md) in response (admins only) | +| `with_projects` | boolean | no | Include details from projects that belong to the specified group (defaults to `true`). | ```bash curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/4 @@ -361,6 +362,30 @@ Example response: } ``` +When adding the parameter `with_projects=false`, projects will not be returned. + +```bash +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/4?with_projects=false +``` + +Example response: + +```json +{ + "id": 4, + "name": "Twitter", + "path": "twitter", + "description": "Aliquid qui quis dignissimos distinctio ut commodi voluptas est.", + "visibility": "public", + "avatar_url": null, + "web_url": "https://gitlab.example.com/groups/twitter", + "request_access_enabled": false, + "full_name": "Twitter", + "full_path": "twitter", + "parent_id": null +} +``` + ## New group Creates a new project group. Available only for users who can create groups. |