Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/users.md')
-rw-r--r--doc/api/users.md44
1 files changed, 42 insertions, 2 deletions
diff --git a/doc/api/users.md b/doc/api/users.md
index 19c25236f55..382d5fe03c1 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -39,7 +39,10 @@ GET /users
]
```
-You can also search for users by name, username, or public email by using `?search=`. For example. `/users?search=John`.
+You can also use `?search=` to search for users by name, username, or public email. For example, `/users?search=John`. When you search for a:
+
+- Public email, you must use the full email address to get an exact match.
+- Name or username, you do not have to get an exact match because this is a fuzzy search.
In addition, you can lookup users by username:
@@ -240,6 +243,11 @@ the `group_saml` provider option and `provisioned_by_group_id` parameter:
]
```
+You can also use `?search=` to search for users by name, username, or email. For example, `/users?search=John`. When you search for a:
+
+- Email, you must use the full email address to get an exact match. As an administrator, you can search for both public and private email addresses.
+- Name or username, you do not have to get an exact match because this is a fuzzy search.
+
You can lookup users by external UID and provider:
```plaintext
@@ -1087,6 +1095,8 @@ Parameters:
## Add SSH key
+> The `usage_type` parameter was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/105551) in GitLab 15.7.
+
Creates a new key owned by the currently authenticated user.
```plaintext
@@ -1100,12 +1110,14 @@ Parameters:
| `title` | string | yes | New SSH key's title |
| `key` | string | yes | New SSH key |
| `expires_at` | string | no | Expiration date of the SSH key in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`) |
+| `usage_type` | string | no | Scope of usage for the SSH key: `auth`, `signing` or `auth_and_signing`. Default: `auth_and_signing` |
```json
{
"title": "ABC",
"key": "ssh-dss AAAAB3NzaC1kc3MAAACBAMLrhYgI3atfrSD6KDas1b/3n6R/HP+bLaHHX6oh+L1vg31mdUqK0Ac/NjZoQunavoyzqdPYhFz9zzOezCrZKjuJDS3NRK9rspvjgM0xYR4d47oNZbdZbwkI4cTv/gcMlquRy0OvpfIvJtjtaJWMwTLtM5VhRusRuUlpH99UUVeXAAAAFQCVyX+92hBEjInEKL0v13c/egDCTQAAAIEAvFdWGq0ccOPbw4f/F8LpZqvWDydAcpXHV3thwb7WkFfppvm4SZte0zds1FJ+Hr8Xzzc5zMHe6J4Nlay/rP4ewmIW7iFKNBEYb/yWa+ceLrs+TfR672TaAgO6o7iSRofEq5YLdwgrwkMmIawa21FrZ2D9SPao/IwvENzk/xcHu7YAAACAQFXQH6HQnxOrw4dqf0NqeKy1tfIPxYYUZhPJfo9O0AmBW2S36pD2l14kS89fvz6Y1g8gN/FwFnRncMzlLY/hX70FSc/3hKBSbH6C6j8hwlgFKfizav21eS358JJz93leOakJZnGb8XlWvz1UJbwCsnR2VEY8Dz90uIk1l/UqHkA= loic@call",
- "expires_at": "2016-01-21T00:00:00.000Z"
+ "expires_at": "2016-01-21T00:00:00.000Z",
+ "usage_type": "auth"
}
```
@@ -1127,6 +1139,8 @@ error occurs a `400 Bad Request` is returned with a message explaining the error
## Add SSH key for user **(FREE SELF)**
+> The `usage_type` parameter was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/105551) in GitLab 15.7.
+
Create new key owned by specified user. Available only for administrator.
```plaintext
@@ -1141,6 +1155,32 @@ Parameters:
| `title` | string | yes | New SSH key's title |
| `key` | string | yes | New SSH key |
| `expires_at` | string | no | Expiration date of the SSH key in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`) |
+| `usage_type` | string | no | Scope of usage for the SSH key: `auth`, `signing` or `auth_and_signing`. Default: `auth_and_signing` |
+
+```json
+{
+ "title": "ABC",
+ "key": "ssh-dss AAAAB3NzaC1kc3MAAACBAMLrhYgI3atfrSD6KDas1b/3n6R/HP+bLaHHX6oh+L1vg31mdUqK0Ac/NjZoQunavoyzqdPYhFz9zzOezCrZKjuJDS3NRK9rspvjgM0xYR4d47oNZbdZbwkI4cTv/gcMlquRy0OvpfIvJtjtaJWMwTLtM5VhRusRuUlpH99UUVeXAAAAFQCVyX+92hBEjInEKL0v13c/egDCTQAAAIEAvFdWGq0ccOPbw4f/F8LpZqvWDydAcpXHV3thwb7WkFfppvm4SZte0zds1FJ+Hr8Xzzc5zMHe6J4Nlay/rP4ewmIW7iFKNBEYb/yWa+ceLrs+TfR672TaAgO6o7iSRofEq5YLdwgrwkMmIawa21FrZ2D9SPao/IwvENzk/xcHu7YAAACAQFXQH6HQnxOrw4dqf0NqeKy1tfIPxYYUZhPJfo9O0AmBW2S36pD2l14kS89fvz6Y1g8gN/FwFnRncMzlLY/hX70FSc/3hKBSbH6C6j8hwlgFKfizav21eS358JJz93leOakJZnGb8XlWvz1UJbwCsnR2VEY8Dz90uIk1l/UqHkA= loic@call",
+ "expires_at": "2016-01-21T00:00:00.000Z",
+ "usage_type": "auth"
+}
+```
+
+Returns a created key with status `201 Created` on success. If an
+error occurs a `400 Bad Request` is returned with a message explaining the error:
+
+```json
+{
+ "message": {
+ "fingerprint": [
+ "has already been taken"
+ ],
+ "key": [
+ "has already been taken"
+ ]
+ }
+}
+```
NOTE:
This also adds an audit event, as described in [audit instance events](../administration/audit_events.md#instance-events). **(PREMIUM)**