mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-10 01:31:45 +00:00
Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
@ -150,7 +150,8 @@ This example creates a new group. Be aware of the use of single (`'`) and double
|
||||
(`"`) quotes.
|
||||
|
||||
```shell
|
||||
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" --data '{"path": "my-group", "name": "My group"}' "https://gitlab.example.com/api/v4/groups"
|
||||
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" \
|
||||
--data '{"path": "my-group", "name": "My group"}' "https://gitlab.example.com/api/v4/groups"
|
||||
```
|
||||
|
||||
For readability, you can also set up the `--data` by using the following format:
|
||||
@ -172,7 +173,8 @@ Instead of using JSON or URL-encoding data, you can use `multipart/form-data` wh
|
||||
properly handles data encoding:
|
||||
|
||||
```shell
|
||||
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "title=ssh-key" --form "key=ssh-rsa AAAAB3NzaC1yc2EA..." "https://gitlab.example.com/api/v4/users/25/keys"
|
||||
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "title=ssh-key" \
|
||||
--form "key=ssh-rsa AAAAB3NzaC1yc2EA..." "https://gitlab.example.com/api/v4/users/25/keys"
|
||||
```
|
||||
|
||||
The above example is run by and administrator and will add an SSH public key
|
||||
@ -198,5 +200,6 @@ exclude specific users when requesting a list of users for a project, you would
|
||||
do something like this:
|
||||
|
||||
```shell
|
||||
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --data "skip_users[]=<user_id>" --data "skip_users[]=<user_id>" "https://gitlab.example.com/api/v4/projects/<project_id>/users"
|
||||
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --data "skip_users[]=<user_id>" \
|
||||
--data "skip_users[]=<user_id>" "https://gitlab.example.com/api/v4/projects/<project_id>/users"
|
||||
```
|
||||
|
Reference in New Issue
Block a user