Commit 86aa19f4 authored by Evan Read's avatar Evan Read Committed by Pavel Shutsin

Move and refine new List provisioned users section

parent b4de6aa1
......@@ -1090,6 +1090,79 @@ GET /groups?search=foobar
]
```
## List provisioned users **(PREMIUM)**
> Introduced in GitLab 14.8.
Get a list of users provisioned by a given group. Does not include users provisioned by subgroups.
Requires at least the Maintainer role on the group.
```plaintext
GET /groups/:id/provisioned_users
```
Parameters:
| Attribute | Type | Required | Description |
|:-----------------|:---------------|:---------|:-------------------------------------------------------------------------|
| `id` | integer/string | yes | ID or [URL-encoded path of the group](index.md#namespaced-path-encoding) |
| `username` | string | no | Return single user with a specific username |
| `search` | string | no | Search users by name, email, username |
| `active` | boolean | no | Return only active users |
| `blocked` | boolean | no | Return only blocked users |
| `created_after` | datetime | no | Return users created after the specified time |
| `created_before` | datetime | no | Return users created before the specified time |
Example response:
```json
[
{
id: 66,
username: "user22",
name: "John Doe22",
state: "active",
avatar_url: "https://www.gravatar.com/avatar/xxx?s=80&d=identicon",
web_url: "http://my.gitlab.com/user22",
created_at: "2021-09-10T12:48:22.381Z",
bio: "",
location: null,
public_email: "",
skype: "",
linkedin: "",
twitter: "",
website_url: "",
organization: null,
job_title: "",
pronouns: null,
bot: false,
work_information: null,
followers: 0,
following: 0,
local_time: null,
last_sign_in_at: null,
confirmed_at: "2021-09-10T12:48:22.330Z",
last_activity_on: null,
email: "user22@example.org",
theme_id: 1,
color_scheme_id: 1,
projects_limit: 100000,
current_sign_in_at: null,
identities: [ ],
can_create_group: true,
can_create_project: true,
two_factor_enabled: false,
external: false,
private_profile: false,
commit_email: "user22@example.org",
shared_runners_minutes_limit: null,
extra_shared_runners_minutes_limit: null
},
...
]
```
## Hooks **(PREMIUM)**
Also called Group Hooks and Webhooks.
......@@ -1524,75 +1597,3 @@ DELETE /groups/:id/push_rule
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the group](index.md#namespaced-path-encoding) |
## Provisioned users API **(PREMIUM)**
> Introduced in GitLab 14.8.
### List provisioned users
Get a list of users provisioned by a given group. Does not include users provisioned by subgroups.
Requires at least the Maintainer role on the group.
```plaintext
GET /groups/:id/provisioned_users
```
Parameters:
| Attribute | Type | Required | Description |
|------------------|----------------|----------|-----------------------------------------------|
| `id` | integer/string | yes | The ID or [URL-encoded path of the group](index.md#namespaced-path-encoding) |
| `username` | string | no | Get a single user with a specific username |
| `search` | string | no | Filter list by name, email or username |
| `active` | boolean | no | Filters only active users |
| `blocked` | boolean | no | Filters only blocked users |
| `created_after` | datetime | no | Return users created after the specified time |
| `created_before` | datetime | no | Return users created before the specified time |
```json
[
{
id: 66,
username: "user22",
name: "John Doe22",
state: "active",
avatar_url: "https://www.gravatar.com/avatar/xxx?s=80&d=identicon",
web_url: "http://my.gitlab.com/user22",
created_at: "2021-09-10T12:48:22.381Z",
bio: "",
location: null,
public_email: "",
skype: "",
linkedin: "",
twitter: "",
website_url: "",
organization: null,
job_title: "",
pronouns: null,
bot: false,
work_information: null,
followers: 0,
following: 0,
local_time: null,
last_sign_in_at: null,
confirmed_at: "2021-09-10T12:48:22.330Z",
last_activity_on: null,
email: "user22@example.org",
theme_id: 1,
color_scheme_id: 1,
projects_limit: 100000,
current_sign_in_at: null,
identities: [ ],
can_create_group: true,
can_create_project: true,
two_factor_enabled: false,
external: false,
private_profile: false,
commit_email: "user22@example.org",
shared_runners_minutes_limit: null,
extra_shared_runners_minutes_limit: null
},
...
]
```
......@@ -162,10 +162,10 @@ module EE
success Entities::UserPublic
end
params do
optional :username, type: String, desc: 'Get a single user with a specific username'
optional :search, type: String, desc: 'Search for a user name, email or username'
optional :active, type: Grape::API::Boolean, default: false, desc: 'Filters only active users'
optional :blocked, type: Grape::API::Boolean, default: false, desc: 'Filters only blocked users'
optional :username, type: String, desc: 'Return a single user with a specific username'
optional :search, type: String, desc: 'Search users by name, email or username'
optional :active, type: Grape::API::Boolean, default: false, desc: 'Return only active users'
optional :blocked, type: Grape::API::Boolean, default: false, desc: 'Return only blocked users'
optional :created_after, type: DateTime, desc: 'Return users created after the specified time'
optional :created_before, type: DateTime, desc: 'Return users created before the specified time'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment