diff options
Diffstat (limited to 'doc/api/members.md')
-rw-r--r-- | doc/api/members.md | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/doc/api/members.md b/doc/api/members.md index 76d63b277c4..43012a5cb80 100644 --- a/doc/api/members.md +++ b/doc/api/members.md @@ -223,6 +223,58 @@ Example response: } ``` +## List all billable members of a group + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217384) in GitLab 13.5. + +Gets a list of group members who counts as billable, including members in the sub group/project. + +This function takes [pagination](README.md#pagination) parameters `page` and `per_page` to restrict the list of users. + +```plaintext +GET /groups/:id/billable_members +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user | + +```shell +curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/:id/billable_members" +``` + +Example response: + +```json +[ + { + "id": 1, + "username": "raymond_smith", + "name": "Raymond Smith", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon", + "web_url": "http://192.168.1.8:3000/root", + }, + { + "id": 2, + "username": "john_doe", + "name": "John Doe", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon", + "web_url": "http://192.168.1.8:3000/root", + "email": "john@example.com" + }, + { + "id": 3, + "username": "foo_bar", + "name": "Foo bar", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon", + "web_url": "http://192.168.1.8:3000/root" + } +] +``` + ## Add a member to a group or project Adds a member to a group or project. |