diff options
Diffstat (limited to 'doc/api/users.md')
-rw-r--r-- | doc/api/users.md | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index 76075e8b7be..634e0bd0842 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -2,8 +2,6 @@ ## List users -Active users = Total accounts - Blocked users - Get a list of users. This function takes pagination parameters `page` and `per_page` to restrict the list of users. @@ -49,9 +47,9 @@ For example: GET /users?username=jack_smith ``` -In addition, you can filter users based on states eg. `blocked`, `active` -This works only to filter users who are `blocked` or `active`. -It does not support `active=false` or `blocked=false`. +In addition, you can filter users based on the states `blocked` and `active`. +It does not support `active=false` or `blocked=false`. The list of active users +is the total number of users minus the blocked users. ```plaintext GET /users?active=true @@ -61,6 +59,15 @@ GET /users?active=true GET /users?blocked=true ``` +GitLab supports bot users such as the [alert bot](../operations/incident_management/generic_alerts.md) +or the [support bot](../user/project/service_desk.md#support-bot-user). +To exclude these users from the users' list, you can use the parameter `exclude_internal=true` +([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/241144) in GitLab 13.4). + +```plaintext +GET /users?exclude_internal=true +``` + NOTE: **Note:** Username search is case insensitive. @@ -767,7 +774,7 @@ POST /user/keys Parameters: -- `title` (required) - new SSH Key's title +- `title` (required) - new SSH key's title - `key` (required) - new SSH key - `expires_at` (optional) - The expiration date of the SSH key in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`) @@ -806,12 +813,12 @@ POST /users/:id/keys Parameters: - `id` (required) - ID of specified user -- `title` (required) - new SSH Key's title +- `title` (required) - new SSH key's title - `key` (required) - new SSH key - `expires_at` (optional) - The expiration date of the SSH key in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`) NOTE: **Note:** -This also adds an audit event, as described in [audit instance events](../administration/audit_events.md#instance-events-premium-only). **(PREMIUM)** +This also adds an audit event, as described in [audit instance events](../administration/audit_events.md#instance-events). **(PREMIUM)** ## Delete SSH key for current user |