Commit e654c038 authored by Evan Read's avatar Evan Read

Merge branch 'docs/fake-token-no-more-ee' into 'master'

Do not use tokens that look like tokens in docs

Closes gitlab-ce#38064

See merge request gitlab-org/gitlab-ee!8973
parents 3543a058 d9534f9a
...@@ -201,13 +201,13 @@ You can use a [personal access token][pat] to authenticate with the API by passi ...@@ -201,13 +201,13 @@ You can use a [personal access token][pat] to authenticate with the API by passi
Example of using the personal access token in a parameter: Example of using the personal access token in a parameter:
```shell ```shell
curl https://gitlab.example.com/api/v4/projects?private_token=9koXpg98eAheJpvBs5tK curl https://gitlab.example.com/api/v4/projects?private_token=<your_access_token>
``` ```
Example of using the personal access token in a header: Example of using the personal access token in a header:
```shell ```shell
curl --header "Private-Token: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects curl --header "Private-Token: <your_access_token>" https://gitlab.example.com/api/v4/projects
``` ```
Read more about [personal access tokens][pat]. Read more about [personal access tokens][pat].
...@@ -326,22 +326,22 @@ Example of a valid API call and a request using cURL with sudo request, ...@@ -326,22 +326,22 @@ Example of a valid API call and a request using cURL with sudo request,
providing a username: providing a username:
``` ```
GET /projects?private_token=9koXpg98eAheJpvBs5tK&sudo=username GET /projects?private_token=<your_access_token>&sudo=username
``` ```
```shell ```shell
curl --header "Private-Token: 9koXpg98eAheJpvBs5tK" --header "Sudo: username" "https://gitlab.example.com/api/v4/projects" curl --header "Private-Token: <your_access_token>" --header "Sudo: username" "https://gitlab.example.com/api/v4/projects"
``` ```
Example of a valid API call and a request using cURL with sudo request, Example of a valid API call and a request using cURL with sudo request,
providing an ID: providing an ID:
``` ```
GET /projects?private_token=9koXpg98eAheJpvBs5tK&sudo=23 GET /projects?private_token=<your_access_token>&sudo=23
``` ```
```shell ```shell
curl --header "Private-Token: 9koXpg98eAheJpvBs5tK" --header "Sudo: 23" "https://gitlab.example.com/api/v4/projects" curl --header "Private-Token: <your_access_token>" --header "Sudo: 23" "https://gitlab.example.com/api/v4/projects"
``` ```
## Status codes ## Status codes
...@@ -390,7 +390,7 @@ resources you can pass the following parameters: ...@@ -390,7 +390,7 @@ resources you can pass the following parameters:
In the example below, we list 50 [namespaces](namespaces.md) per page. In the example below, we list 50 [namespaces](namespaces.md) per page.
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/namespaces?per_page=50 curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/namespaces?per_page=50
``` ```
### Pagination Link header ### Pagination Link header
...@@ -404,7 +404,7 @@ and we request the second page (`page=2`) of [comments](notes.md) of the issue ...@@ -404,7 +404,7 @@ and we request the second page (`page=2`) of [comments](notes.md) of the issue
with ID `8` which belongs to the project with ID `8`: with ID `8` which belongs to the project with ID `8`:
```bash ```bash
curl --head --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/8/issues/8/notes?per_page=3&page=2 curl --head --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/8/issues/8/notes?per_page=3&page=2
``` ```
The response will then be: The response will then be:
...@@ -472,7 +472,7 @@ We can call the API with `array` and `hash` types parameters as shown below: ...@@ -472,7 +472,7 @@ We can call the API with `array` and `hash` types parameters as shown below:
`import_sources` is a parameter of type `array`: `import_sources` is a parameter of type `array`:
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" \ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
-d "import_sources[]=github" \ -d "import_sources[]=github" \
-d "import_sources[]=bitbucket" \ -d "import_sources[]=bitbucket" \
"https://gitlab.example.com/api/v4/some_endpoint "https://gitlab.example.com/api/v4/some_endpoint
...@@ -483,7 +483,7 @@ curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" \ ...@@ -483,7 +483,7 @@ curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" \
`override_params` is a parameter of type `hash`: `override_params` is a parameter of type `hash`:
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" \ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
--form "namespace=email" \ --form "namespace=email" \
--form "path=impapi" \ --form "path=impapi" \
--form "file=@/path/to/somefile.txt" --form "file=@/path/to/somefile.txt"
......
...@@ -28,8 +28,8 @@ GET /projects/:id/access_requests ...@@ -28,8 +28,8 @@ GET /projects/:id/access_requests
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/access_requests curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/access_requests curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/access_requests
``` ```
Example response: Example response:
...@@ -69,8 +69,8 @@ POST /projects/:id/access_requests ...@@ -69,8 +69,8 @@ POST /projects/:id/access_requests
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/access_requests curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/access_requests curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/access_requests
``` ```
Example response: Example response:
...@@ -102,8 +102,8 @@ PUT /projects/:id/access_requests/:user_id/approve ...@@ -102,8 +102,8 @@ PUT /projects/:id/access_requests/:user_id/approve
| `access_level` | integer | no | A valid access level (defaults: `30`, developer access level) | | `access_level` | integer | no | A valid access level (defaults: `30`, developer access level) |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/access_requests/:user_id/approve?access_level=20 curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests/:user_id/approve?access_level=20
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/access_requests/:user_id/approve?access_level=20 curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/access_requests/:user_id/approve?access_level=20
``` ```
Example response: Example response:
...@@ -134,6 +134,6 @@ DELETE /projects/:id/access_requests/:user_id ...@@ -134,6 +134,6 @@ DELETE /projects/:id/access_requests/:user_id
| `user_id` | integer | yes | The user ID of the access requester | | `user_id` | integer | yes | The user ID of the access requester |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/access_requests/:user_id curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests/:user_id
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/access_requests/:user_id curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/access_requests/:user_id
``` ```
...@@ -23,7 +23,7 @@ POST /applications ...@@ -23,7 +23,7 @@ POST /applications
| `scopes` | string | yes | The scopes of the application | | `scopes` | string | yes | The scopes of the application |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "name=MyApplication&redirect_uri=http://redirect.uri&scopes=" https://gitlab.example.com/api/v4/applications curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "name=MyApplication&redirect_uri=http://redirect.uri&scopes=" https://gitlab.example.com/api/v4/applications
``` ```
Example response: Example response:
...@@ -47,7 +47,7 @@ GET /applications ...@@ -47,7 +47,7 @@ GET /applications
``` ```
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/applications curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/applications
``` ```
Example response: Example response:
...@@ -80,5 +80,5 @@ Parameters: ...@@ -80,5 +80,5 @@ Parameters:
- `id` (required) - The id of the application (not the application_id) - `id` (required) - The id of the application (not the application_id)
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/applications/:id curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/applications/:id
``` ```
...@@ -27,7 +27,7 @@ Parameters: ...@@ -27,7 +27,7 @@ Parameters:
| `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable | | `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji
``` ```
Example Response: Example Response:
...@@ -88,7 +88,7 @@ Parameters: ...@@ -88,7 +88,7 @@ Parameters:
| `award_id` | integer | yes | The ID of the award emoji | | `award_id` | integer | yes | The ID of the award emoji |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/1
``` ```
Example Response: Example Response:
...@@ -131,7 +131,7 @@ Parameters: ...@@ -131,7 +131,7 @@ Parameters:
| `name` | string | yes | The name of the emoji, without colons | | `name` | string | yes | The name of the emoji, without colons |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji?name=blowfish curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji?name=blowfish
``` ```
Example Response: Example Response:
...@@ -175,7 +175,7 @@ Parameters: ...@@ -175,7 +175,7 @@ Parameters:
| `award_id` | integer | yes | The ID of an award_emoji | | `award_id` | integer | yes | The ID of an award_emoji |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/344 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/344
``` ```
## Award Emoji on Notes ## Award Emoji on Notes
...@@ -201,7 +201,7 @@ Parameters: ...@@ -201,7 +201,7 @@ Parameters:
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji
``` ```
Example Response: Example Response:
...@@ -243,7 +243,7 @@ Parameters: ...@@ -243,7 +243,7 @@ Parameters:
| `award_id` | integer | yes | The ID of the award emoji | | `award_id` | integer | yes | The ID of the award emoji |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji/2 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji/2
``` ```
Example Response: Example Response:
...@@ -283,7 +283,7 @@ Parameters: ...@@ -283,7 +283,7 @@ Parameters:
| `name` | string | yes | The name of the emoji, without colons | | `name` | string | yes | The name of the emoji, without colons |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji?name=rocket curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji?name=rocket
``` ```
Example Response: Example Response:
...@@ -326,7 +326,7 @@ Parameters: ...@@ -326,7 +326,7 @@ Parameters:
| `award_id` | integer | yes | The ID of an award_emoji | | `award_id` | integer | yes | The ID of an award_emoji |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/345 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/issues/80/award_emoji/345
``` ```
[ce-4575]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4575 [ce-4575]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4575
...@@ -18,7 +18,7 @@ GET /projects/:id/boards ...@@ -18,7 +18,7 @@ GET /projects/:id/boards
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/boards curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/boards
``` ```
Example response: Example response:
...@@ -87,7 +87,7 @@ GET /projects/:id/boards/:board_id ...@@ -87,7 +87,7 @@ GET /projects/:id/boards/:board_id
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/boards/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/boards/1
``` ```
Example response: Example response:
...@@ -155,7 +155,7 @@ POST /projects/:id/boards ...@@ -155,7 +155,7 @@ POST /projects/:id/boards
| `name` | string | yes | The name of the new board | | `name` | string | yes | The name of the new board |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/boards?name=newboard curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/boards?name=newboard
``` ```
Example response: Example response:
...@@ -231,7 +231,7 @@ PUT /projects/:id/boards/:board_id ...@@ -231,7 +231,7 @@ PUT /projects/:id/boards/:board_id
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/boards/1?name=new_name&milestone_id=43&assignee_id=1&labels=Doing&weight=4 curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/boards/1?name=new_name&milestone_id=43&assignee_id=1&labels=Doing&weight=4
``` ```
Example response: Example response:
...@@ -305,7 +305,7 @@ DELETE /projects/:id/boards/:board_id ...@@ -305,7 +305,7 @@ DELETE /projects/:id/boards/:board_id
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/boards/1 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/boards/1
``` ```
## List board lists ## List board lists
...@@ -323,7 +323,7 @@ GET /projects/:id/boards/:board_id/lists ...@@ -323,7 +323,7 @@ GET /projects/:id/boards/:board_id/lists
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/boards/1/lists curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/boards/1/lists
``` ```
Example response: Example response:
...@@ -375,7 +375,7 @@ GET /projects/:id/boards/:board_id/lists/:list_id ...@@ -375,7 +375,7 @@ GET /projects/:id/boards/:board_id/lists/:list_id
| `list_id`| integer | yes | The ID of a board's list | | `list_id`| integer | yes | The ID of a board's list |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/boards/1/lists/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/boards/1/lists/1
``` ```
Example response: Example response:
...@@ -414,7 +414,7 @@ Check the [Issue Board docs](../user/project/issue_board.md) for more ...@@ -414,7 +414,7 @@ Check the [Issue Board docs](../user/project/issue_board.md) for more
information regarding the required license for each list type. information regarding the required license for each list type.
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/boards/1/lists?label_id=5 curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/boards/1/lists?label_id=5
``` ```
Example response: Example response:
...@@ -447,7 +447,7 @@ PUT /projects/:id/boards/:board_id/lists/:list_id ...@@ -447,7 +447,7 @@ PUT /projects/:id/boards/:board_id/lists/:list_id
| `position` | integer | yes | The position of the list | | `position` | integer | yes | The position of the list |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/boards/1/lists/1?position=2 curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/boards/1/lists/1?position=2
``` ```
Example response: Example response:
...@@ -479,7 +479,7 @@ DELETE /projects/:id/boards/:board_id/lists/:list_id ...@@ -479,7 +479,7 @@ DELETE /projects/:id/boards/:board_id/lists/:list_id
| `list_id` | integer | yes | The ID of a board's list | | `list_id` | integer | yes | The ID of a board's list |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/boards/1/lists/1 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/boards/1/lists/1
``` ```
[ee-5954]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5954 [ee-5954]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5954
...@@ -16,7 +16,7 @@ GET /projects/:id/repository/branches ...@@ -16,7 +16,7 @@ GET /projects/:id/repository/branches
| `search` | string | no | Return list of branches matching the search criteria. | | `search` | string | no | Return list of branches matching the search criteria. |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/repository/branches curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/repository/branches
``` ```
Example response: Example response:
...@@ -66,7 +66,7 @@ GET /projects/:id/repository/branches/:branch ...@@ -66,7 +66,7 @@ GET /projects/:id/repository/branches/:branch
| `branch` | string | yes | The name of the branch | | `branch` | string | yes | The name of the branch |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/repository/branches/master curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/repository/branches/master
``` ```
Example response: Example response:
...@@ -111,7 +111,7 @@ PUT /projects/:id/repository/branches/:branch/protect ...@@ -111,7 +111,7 @@ PUT /projects/:id/repository/branches/:branch/protect
``` ```
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/repository/branches/master/protect?developers_can_push=true&developers_can_merge=true curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/repository/branches/master/protect?developers_can_push=true&developers_can_merge=true
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
...@@ -163,7 +163,7 @@ PUT /projects/:id/repository/branches/:branch/unprotect ...@@ -163,7 +163,7 @@ PUT /projects/:id/repository/branches/:branch/unprotect
``` ```
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/repository/branches/master/unprotect curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/repository/branches/master/unprotect
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
...@@ -213,7 +213,7 @@ POST /projects/:id/repository/branches ...@@ -213,7 +213,7 @@ POST /projects/:id/repository/branches
| `ref` | string | yes | The branch name or commit SHA to create branch from | | `ref` | string | yes | The branch name or commit SHA to create branch from |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/branches?branch=newbranch&ref=master" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/branches?branch=newbranch&ref=master"
``` ```
Example response: Example response:
...@@ -259,7 +259,7 @@ DELETE /projects/:id/repository/branches/:branch ...@@ -259,7 +259,7 @@ DELETE /projects/:id/repository/branches/:branch
In case of an error, an explaining message is provided. In case of an error, an explaining message is provided.
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/branches/newbranch" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/branches/newbranch"
``` ```
## Delete merged branches ## Delete merged branches
...@@ -278,5 +278,5 @@ DELETE /projects/:id/repository/merged_branches ...@@ -278,5 +278,5 @@ DELETE /projects/:id/repository/merged_branches
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/merged_branches" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/merged_branches"
``` ```
...@@ -13,7 +13,7 @@ GET /broadcast_messages ...@@ -13,7 +13,7 @@ GET /broadcast_messages
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/broadcast_messages curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/broadcast_messages
``` ```
Example response: Example response:
...@@ -43,7 +43,7 @@ GET /broadcast_messages/:id ...@@ -43,7 +43,7 @@ GET /broadcast_messages/:id
| `id` | integer | yes | Broadcast message ID | | `id` | integer | yes | Broadcast message ID |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/broadcast_messages/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/broadcast_messages/1
``` ```
Example response: Example response:
...@@ -75,7 +75,7 @@ POST /broadcast_messages ...@@ -75,7 +75,7 @@ POST /broadcast_messages
| `font` | string | no | Foreground color hex code | | `font` | string | no | Foreground color hex code |
```bash ```bash
curl --data "message=Deploy in progress&color=#cecece" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/broadcast_messages curl --data "message=Deploy in progress&color=#cecece" --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/broadcast_messages
``` ```
Example response: Example response:
...@@ -108,7 +108,7 @@ PUT /broadcast_messages/:id ...@@ -108,7 +108,7 @@ PUT /broadcast_messages/:id
| `font` | string | no | Foreground color hex code | | `font` | string | no | Foreground color hex code |
```bash ```bash
curl --request PUT --data "message=Update message&color=#000" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/broadcast_messages/1 curl --request PUT --data "message=Update message&color=#000" --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/broadcast_messages/1
``` ```
Example response: Example response:
...@@ -136,5 +136,5 @@ DELETE /broadcast_messages/:id ...@@ -136,5 +136,5 @@ DELETE /broadcast_messages/:id
| `id` | integer | yes | Broadcast message ID | | `id` | integer | yes | Broadcast message ID |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/broadcast_messages/1 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/broadcast_messages/1
``` ```
...@@ -20,7 +20,7 @@ GET /projects/:id/repository/commits ...@@ -20,7 +20,7 @@ GET /projects/:id/repository/commits
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/commits" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits"
``` ```
Example response: Example response:
...@@ -127,7 +127,7 @@ PAYLOAD=$(cat << 'JSON' ...@@ -127,7 +127,7 @@ PAYLOAD=$(cat << 'JSON'
} }
JSON JSON
) )
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "Content-Type: application/json" --data "$PAYLOAD" https://gitlab.example.com/api/v4/projects/1/repository/commits curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" --data "$PAYLOAD" https://gitlab.example.com/api/v4/projects/1/repository/commits
``` ```
Example response: Example response:
...@@ -173,7 +173,7 @@ Parameters: ...@@ -173,7 +173,7 @@ Parameters:
| `stats` | boolean | no | Include commit stats. Default is true | | `stats` | boolean | no | Include commit stats. Default is true |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master
``` ```
Example response: Example response:
...@@ -229,7 +229,7 @@ Parameters: ...@@ -229,7 +229,7 @@ Parameters:
| `type` | string | no | The scope of commits. Possible values `branch`, `tag`, `all`. Default is `all`. | | `type` | string | no | The scope of commits. Possible values `branch`, `tag`, `all`. Default is `all`. |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/commits/5937ac0a7beb003549fc5fd26fc247adbce4a52e/refs?type=all" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/5937ac0a7beb003549fc5fd26fc247adbce4a52e/refs?type=all"
``` ```
Example response: Example response:
...@@ -263,7 +263,7 @@ Parameters: ...@@ -263,7 +263,7 @@ Parameters:
| `branch` | string | yes | The name of the branch | | `branch` | string | yes | The name of the branch |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "branch=master" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/cherry_pick" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "branch=master" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/cherry_pick"
``` ```
Example response: Example response:
...@@ -307,7 +307,7 @@ Parameters: ...@@ -307,7 +307,7 @@ Parameters:
| `branch` | string | yes | Target branch name | | `branch` | string | yes | Target branch name |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "branch=master" "https://gitlab.example.com/api/v4/projects/5/repository/commits/a738f717824ff53aebad8b090c1b79a14f2bd9e8/revert" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "branch=master" "https://gitlab.example.com/api/v4/projects/5/repository/commits/a738f717824ff53aebad8b090c1b79a14f2bd9e8/revert"
``` ```
Example response: Example response:
...@@ -345,7 +345,7 @@ Parameters: ...@@ -345,7 +345,7 @@ Parameters:
| `sha` | string | yes | The commit hash or name of a repository branch or tag | | `sha` | string | yes | The commit hash or name of a repository branch or tag |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/diff" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/diff"
``` ```
Example response: Example response:
...@@ -381,7 +381,7 @@ Parameters: ...@@ -381,7 +381,7 @@ Parameters:
| `sha` | string | yes | The commit hash or name of a repository branch or tag | | `sha` | string | yes | The commit hash or name of a repository branch or tag |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/comments" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/comments"
``` ```
Example response: Example response:
...@@ -434,7 +434,7 @@ POST /projects/:id/repository/commits/:sha/comments ...@@ -434,7 +434,7 @@ POST /projects/:id/repository/commits/:sha/comments
| `line_type` | string | no | The line type. Takes `new` or `old` as arguments | | `line_type` | string | no | The line type. Takes `new` or `old` as arguments |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "note=Nice picture man\!" --form "path=dudeism.md" --form "line=11" --form "line_type=new" https://gitlab.example.com/api/v4/projects/17/repository/commits/18f3e63d05582537db6d183d9d557be09e1f90c8/comments curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "note=Nice picture man\!" --form "path=dudeism.md" --form "line=11" --form "line_type=new" https://gitlab.example.com/api/v4/projects/17/repository/commits/18f3e63d05582537db6d183d9d557be09e1f90c8/comments
``` ```
Example response: Example response:
...@@ -480,7 +480,7 @@ GET /projects/:id/repository/commits/:sha/statuses ...@@ -480,7 +480,7 @@ GET /projects/:id/repository/commits/:sha/statuses
| `all` | boolean | no | Return all statuses, not only the latest ones | `all` | boolean | no | Return all statuses, not only the latest ones
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/17/repository/commits/18f3e63d05582537db6d183d9d557be09e1f90c8/statuses curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/17/repository/commits/18f3e63d05582537db6d183d9d557be09e1f90c8/statuses
``` ```
Example response: Example response:
...@@ -556,7 +556,7 @@ POST /projects/:id/statuses/:sha ...@@ -556,7 +556,7 @@ POST /projects/:id/statuses/:sha
| `coverage` | float | no | The total code coverage | `coverage` | float | no | The total code coverage
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/17/statuses/18f3e63d05582537db6d183d9d557be09e1f90c8?state=success" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/17/statuses/18f3e63d05582537db6d183d9d557be09e1f90c8?state=success"
``` ```
Example response: Example response:
...@@ -603,7 +603,7 @@ GET /projects/:id/repository/commits/:sha/merge_requests ...@@ -603,7 +603,7 @@ GET /projects/:id/repository/commits/:sha/merge_requests
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/commits/af5b13261899fb2c0db30abdd0af8b07cb44fdc5/merge_requests" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/af5b13261899fb2c0db30abdd0af8b07cb44fdc5/merge_requests"
``` ```
Example response: Example response:
......
...@@ -20,7 +20,7 @@ GET /projects/:id/custom_attributes ...@@ -20,7 +20,7 @@ GET /projects/:id/custom_attributes
| `id` | integer | yes | The ID of a resource | | `id` | integer | yes | The ID of a resource |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/42/custom_attributes curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/42/custom_attributes
``` ```
Example response: Example response:
...@@ -54,7 +54,7 @@ GET /projects/:id/custom_attributes/:key ...@@ -54,7 +54,7 @@ GET /projects/:id/custom_attributes/:key
| `key` | string | yes | The key of the custom attribute | | `key` | string | yes | The key of the custom attribute |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/42/custom_attributes/location curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/42/custom_attributes/location
``` ```
Example response: Example response:
...@@ -84,7 +84,7 @@ PUT /projects/:id/custom_attributes/:key ...@@ -84,7 +84,7 @@ PUT /projects/:id/custom_attributes/:key
| `value` | string | yes | The value of the custom attribute | | `value` | string | yes | The value of the custom attribute |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "value=Greenland" https://gitlab.example.com/api/v4/users/42/custom_attributes/location curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --data "value=Greenland" https://gitlab.example.com/api/v4/users/42/custom_attributes/location
``` ```
Example response: Example response:
...@@ -112,5 +112,5 @@ DELETE /projects/:id/custom_attributes/:key ...@@ -112,5 +112,5 @@ DELETE /projects/:id/custom_attributes/:key
| `key` | string | yes | The key of the custom attribute | | `key` | string | yes | The key of the custom attribute |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/42/custom_attributes/location curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/42/custom_attributes/location
``` ```
...@@ -7,23 +7,23 @@ First, find the ID of the projects you're interested in, by either listing all ...@@ -7,23 +7,23 @@ First, find the ID of the projects you're interested in, by either listing all
projects: projects:
``` ```
curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v4/projects curl --header 'PRIVATE-TOKEN: <your_access_token>' https://gitlab.example.com/api/v4/projects
``` ```
Or finding the ID of a group and then listing all projects in that group: Or finding the ID of a group and then listing all projects in that group:
``` ```
curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v4/groups curl --header 'PRIVATE-TOKEN: <your_access_token>' https://gitlab.example.com/api/v4/groups
# For group 1234: # For group 1234:
curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v4/groups/1234 curl --header 'PRIVATE-TOKEN: <your_access_token>' https://gitlab.example.com/api/v4/groups/1234
``` ```
With those IDs, add the same deploy key to all: With those IDs, add the same deploy key to all:
``` ```
for project_id in 321 456 987; do for project_id in 321 456 987; do
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "Content-Type: application/json" \ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" \
--data '{"title": "my key", "key": "ssh-rsa AAAA..."}' https://gitlab.example.com/api/v4/projects/${project_id}/deploy_keys --data '{"title": "my key", "key": "ssh-rsa AAAA..."}' https://gitlab.example.com/api/v4/projects/${project_id}/deploy_keys
done done
``` ```
...@@ -9,7 +9,7 @@ GET /deploy_keys ...@@ -9,7 +9,7 @@ GET /deploy_keys
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/deploy_keys" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/deploy_keys"
``` ```
Example response: Example response:
...@@ -44,7 +44,7 @@ GET /projects/:id/deploy_keys ...@@ -44,7 +44,7 @@ GET /projects/:id/deploy_keys
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/deploy_keys" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/deploy_keys"
``` ```
Example response: Example response:
...@@ -84,7 +84,7 @@ Parameters: ...@@ -84,7 +84,7 @@ Parameters:
| `key_id` | integer | yes | The ID of the deploy key | | `key_id` | integer | yes | The ID of the deploy key |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/deploy_keys/11" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/deploy_keys/11"
``` ```
Example response: Example response:
...@@ -118,7 +118,7 @@ POST /projects/:id/deploy_keys ...@@ -118,7 +118,7 @@ POST /projects/:id/deploy_keys
| `can_push` | boolean | no | Can deploy key push to the project's repository | | `can_push` | boolean | no | Can deploy key push to the project's repository |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "Content-Type: application/json" --data '{"title": "My deploy key", "key": "ssh-rsa AAAA...", "can_push": "true"}' "https://gitlab.example.com/api/v4/projects/5/deploy_keys/" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" --data '{"title": "My deploy key", "key": "ssh-rsa AAAA...", "can_push": "true"}' "https://gitlab.example.com/api/v4/projects/5/deploy_keys/"
``` ```
Example response: Example response:
...@@ -148,7 +148,7 @@ PUT /projects/:id/deploy_keys/:key_id ...@@ -148,7 +148,7 @@ PUT /projects/:id/deploy_keys/:key_id
| `can_push` | boolean | no | Can deploy key push to the project's repository | | `can_push` | boolean | no | Can deploy key push to the project's repository |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "Content-Type: application/json" --data '{"title": "New deploy key", "can_push": true}' "https://gitlab.example.com/api/v4/projects/5/deploy_keys/11" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" --data '{"title": "New deploy key", "can_push": true}' "https://gitlab.example.com/api/v4/projects/5/deploy_keys/11"
``` ```
Example response: Example response:
...@@ -177,7 +177,7 @@ DELETE /projects/:id/deploy_keys/:key_id ...@@ -177,7 +177,7 @@ DELETE /projects/:id/deploy_keys/:key_id
| `key_id` | integer | yes | The ID of the deploy key | | `key_id` | integer | yes | The ID of the deploy key |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/deploy_keys/13" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/deploy_keys/13"
``` ```
## Enable a deploy key ## Enable a deploy key
...@@ -185,7 +185,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gi ...@@ -185,7 +185,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gi
Enables a deploy key for a project so this can be used. Returns the enabled key, with a status code 201 when successful. Enables a deploy key for a project so this can be used. Returns the enabled key, with a status code 201 when successful.
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/deploy_keys/13/enable curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/deploy_keys/13/enable
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
......
...@@ -15,7 +15,7 @@ GET /projects/:id/deployments ...@@ -15,7 +15,7 @@ GET /projects/:id/deployments
| `sort` | string | no | Return deployments sorted in `asc` or `desc` order. Default is `asc` | | `sort` | string | no | Return deployments sorted in `asc` or `desc` order. Default is `asc` |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/deployments" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/deployments"
``` ```
Example of response Example of response
...@@ -155,7 +155,7 @@ GET /projects/:id/deployments/:deployment_id ...@@ -155,7 +155,7 @@ GET /projects/:id/deployments/:deployment_id
| `deployment_id` | integer | yes | The ID of the deployment | | `deployment_id` | integer | yes | The ID of the deployment |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/deployments/1" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/deployments/1"
``` ```
Example of response Example of response
......
This diff is collapsed.
...@@ -13,7 +13,7 @@ GET /projects/:id/environments ...@@ -13,7 +13,7 @@ GET /projects/:id/environments
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/environments curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/environments
``` ```
Example response: Example response:
...@@ -46,7 +46,7 @@ POST /projects/:id/environments ...@@ -46,7 +46,7 @@ POST /projects/:id/environments
| `external_url` | string | no | Place to link to for this environment | | `external_url` | string | no | Place to link to for this environment |
```bash ```bash
curl --data "name=deploy&external_url=https://deploy.example.gitlab.com" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/environments" curl --data "name=deploy&external_url=https://deploy.example.gitlab.com" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments"
``` ```
Example response: Example response:
...@@ -78,7 +78,7 @@ PUT /projects/:id/environments/:environments_id ...@@ -78,7 +78,7 @@ PUT /projects/:id/environments/:environments_id
| `external_url` | string | no | The new external_url | | `external_url` | string | no | The new external_url |
```bash ```bash
curl --request PUT --data "name=staging&external_url=https://staging.example.gitlab.com" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/environments/1" curl --request PUT --data "name=staging&external_url=https://staging.example.gitlab.com" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments/1"
``` ```
Example response: Example response:
...@@ -106,7 +106,7 @@ DELETE /projects/:id/environments/:environment_id ...@@ -106,7 +106,7 @@ DELETE /projects/:id/environments/:environment_id
| `environment_id` | integer | yes | The ID of the environment | | `environment_id` | integer | yes | The ID of the environment |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/environments/1" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments/1"
``` ```
## Stop an environment ## Stop an environment
...@@ -123,7 +123,7 @@ POST /projects/:id/environments/:environment_id/stop ...@@ -123,7 +123,7 @@ POST /projects/:id/environments/:environment_id/stop
| `environment_id` | integer | yes | The ID of the environment | | `environment_id` | integer | yes | The ID of the environment |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/environments/1/stop" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments/1/stop"
``` ```
Example response: Example response:
......
...@@ -19,7 +19,7 @@ GET /groups/:id/epics/:epic_iid/issues ...@@ -19,7 +19,7 @@ GET /groups/:id/epics/:epic_iid/issues
| `epic_iid` | integer/string | yes | The internal ID of the epic. | | `epic_iid` | integer/string | yes | The internal ID of the epic. |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics/5/issues/ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/5/issues/
``` ```
Example response: Example response:
...@@ -116,7 +116,7 @@ POST /groups/:id/epics/:epic_iid/issues/:issue_id ...@@ -116,7 +116,7 @@ POST /groups/:id/epics/:epic_iid/issues/:issue_id
| `issue_id` | integer/string | yes | The ID of the issue. | | `issue_id` | integer/string | yes | The ID of the issue. |
```bash ```bash
curl --header POST "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics/5/issues/55 curl --header POST "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/5/issues/55
``` ```
Example response: Example response:
...@@ -222,7 +222,7 @@ DELETE /groups/:id/epics/:epic_iid/issues/:epic_issue_id ...@@ -222,7 +222,7 @@ DELETE /groups/:id/epics/:epic_iid/issues/:epic_issue_id
| `epic_issue_id` | integer/string | yes | The ID of the issue - epic association. | | `epic_issue_id` | integer/string | yes | The ID of the issue - epic association. |
```bash ```bash
curl --header DELETE "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics/5/issues/11 curl --header DELETE "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/5/issues/11
``` ```
Example response: Example response:
...@@ -330,7 +330,7 @@ PUT /groups/:id/epics/:epic_iid/issues/:epic_issue_id ...@@ -330,7 +330,7 @@ PUT /groups/:id/epics/:epic_iid/issues/:epic_issue_id
| `move_after_id` | integer/string | no | The ID of the issue - epic association that should be placed after the link in the question. | | `move_after_id` | integer/string | no | The ID of the issue - epic association that should be placed after the link in the question. |
```bash ```bash
curl --header PUT "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics/5/issues/11?move_before_id=20 curl --header PUT "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/5/issues/11?move_before_id=20
``` ```
Example response: Example response:
......
...@@ -40,7 +40,7 @@ GET /groups/:id/epics?state=opened ...@@ -40,7 +40,7 @@ GET /groups/:id/epics?state=opened
| `state` | string | no | Search epics against their `state`, possible filters: `opened`, `closed` and `all`, default: `all` | | `state` | string | no | Search epics against their `state`, possible filters: `opened`, `closed` and `all`, default: `all` |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics
``` ```
Example response: Example response:
...@@ -91,7 +91,7 @@ GET /groups/:id/epics/:epic_iid ...@@ -91,7 +91,7 @@ GET /groups/:id/epics/:epic_iid
| `epic_iid` | integer/string | yes | The internal ID of the epic. | | `epic_iid` | integer/string | yes | The internal ID of the epic. |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics/5 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/5
``` ```
Example response: Example response:
...@@ -151,7 +151,7 @@ POST /groups/:id/epics ...@@ -151,7 +151,7 @@ POST /groups/:id/epics
| `due_date_fixed` | string | no | The fixed due date of an epic (since 11.3) | | `due_date_fixed` | string | no | The fixed due date of an epic (since 11.3) |
```bash ```bash
curl --header POST "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics?title=Epic&description=Epic%20description curl --header POST "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics?title=Epic&description=Epic%20description
``` ```
Example response: Example response:
...@@ -213,7 +213,7 @@ PUT /groups/:id/epics/:epic_iid ...@@ -213,7 +213,7 @@ PUT /groups/:id/epics/:epic_iid
| `state_event` | string | no | State event for an epic. Set `close` to close the epic and `reopen` to reopen it (since 11.4) | | `state_event` | string | no | State event for an epic. Set `close` to close the epic and `reopen` to reopen it (since 11.4) |
```bash ```bash
curl --header PUT "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics/5?title=New%20Title curl --header PUT "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/5?title=New%20Title
``` ```
Example response: Example response:
...@@ -262,7 +262,7 @@ DELETE /groups/:id/epics/:epic_iid ...@@ -262,7 +262,7 @@ DELETE /groups/:id/epics/:epic_iid
| `epic_iid` | integer/string | yes | The internal ID of the epic. | | `epic_iid` | integer/string | yes | The internal ID of the epic. |
```bash ```bash
curl --header DELETE "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics/5?title=New%20Title curl --header DELETE "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/5?title=New%20Title
``` ```
## Create a todo ## Create a todo
...@@ -281,7 +281,7 @@ POST /groups/:id/epics/:epic_iid/todo ...@@ -281,7 +281,7 @@ POST /groups/:id/epics/:epic_iid/todo
| `epic_iid ` | integer | yes | The internal ID of a group's epic | | `epic_iid ` | integer | yes | The internal ID of a group's epic |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics/5/todo curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/5/todo
``` ```
Example response: Example response:
......
...@@ -71,7 +71,7 @@ Parameters: ...@@ -71,7 +71,7 @@ Parameters:
Example request: Example request:
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/events?target_type=issue&action=created&after=2017-01-31&before=2017-03-01 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/events?target_type=issue&action=created&after=2017-01-31&before=2017-03-01
``` ```
Example response: Example response:
...@@ -143,7 +143,7 @@ Parameters: ...@@ -143,7 +143,7 @@ Parameters:
| `sort` | string | no | Sort events in `asc` or `desc` order by `created_at`. Default is `desc` | | `sort` | string | no | Sort events in `asc` or `desc` order by `created_at`. Default is `desc` |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/:id/events curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/:id/events
``` ```
Example response: Example response:
...@@ -276,7 +276,7 @@ Parameters: ...@@ -276,7 +276,7 @@ Parameters:
Example request: Example request:
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:project_id/events?target_type=issue&action=created&after=2017-01-31&before=2017-03-01 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:project_id/events?target_type=issue&action=created&after=2017-01-31&before=2017-03-01
``` ```
Example response: Example response:
......
...@@ -14,7 +14,7 @@ GET /features ...@@ -14,7 +14,7 @@ GET /features
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/features curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/features
``` ```
Example response: Example response:
...@@ -65,7 +65,7 @@ Note that you can enable or disable a feature for both a `feature_group` and a ...@@ -65,7 +65,7 @@ Note that you can enable or disable a feature for both a `feature_group` and a
`user` with a single API call. `user` with a single API call.
```bash ```bash
curl --data "value=30" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/features/new_library curl --data "value=30" --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/features/new_library
``` ```
Example response: Example response:
......
...@@ -10,7 +10,7 @@ GET /geo_nodes ...@@ -10,7 +10,7 @@ GET /geo_nodes
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/geo_nodes curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/geo_nodes
``` ```
Example response: Example response:
...@@ -49,7 +49,7 @@ GET /geo_nodes/:id ...@@ -49,7 +49,7 @@ GET /geo_nodes/:id
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/geo_nodes/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/geo_nodes/1
``` ```
Example response: Example response:
...@@ -148,7 +148,7 @@ GET /geo_nodes/status ...@@ -148,7 +148,7 @@ GET /geo_nodes/status
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/geo_nodes/status curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/geo_nodes/status
``` ```
Example response: Example response:
...@@ -294,7 +294,7 @@ GET /geo_nodes/:id/status ...@@ -294,7 +294,7 @@ GET /geo_nodes/:id/status
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/geo_nodes/2/status curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/geo_nodes/2/status
``` ```
Example response: Example response:
...@@ -365,7 +365,7 @@ GET /geo_nodes/current/failures ...@@ -365,7 +365,7 @@ GET /geo_nodes/current/failures
This endpoint uses [Pagination](README.md#pagination). This endpoint uses [Pagination](README.md#pagination).
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/geo_nodes/current/failures curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/geo_nodes/current/failures
``` ```
Example response: Example response:
......
...@@ -24,7 +24,7 @@ feature flag. You can enable the feature using the [features api][features-api] ...@@ -24,7 +24,7 @@ feature flag. You can enable the feature using the [features api][features-api]
For example: For example:
```shell ```shell
curl --data "value=100" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/features/graphql curl --data "value=100" --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/features/graphql
``` ```
## Available queries ## Available queries
......
...@@ -28,7 +28,7 @@ GET /groups/:id/badges ...@@ -28,7 +28,7 @@ GET /groups/:id/badges
| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/badges curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/badges
``` ```
Example response: Example response:
...@@ -68,7 +68,7 @@ GET /groups/:id/badges/:badge_id ...@@ -68,7 +68,7 @@ GET /groups/:id/badges/:badge_id
| `badge_id` | integer | yes | The badge ID | | `badge_id` | integer | yes | The badge ID |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/badges/:badge_id curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/badges/:badge_id
``` ```
Example response: Example response:
...@@ -99,7 +99,7 @@ POST /groups/:id/badges ...@@ -99,7 +99,7 @@ POST /groups/:id/badges
| `image_url` | string | yes | URL of the badge image | | `image_url` | string | yes | URL of the badge image |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "link_url=https://gitlab.com/gitlab-org/gitlab-ce/commits/master&image_url=https://shields.io/my/badge1&position=0" https://gitlab.example.com/api/v4/groups/:id/badges curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "link_url=https://gitlab.com/gitlab-org/gitlab-ce/commits/master&image_url=https://shields.io/my/badge1&position=0" https://gitlab.example.com/api/v4/groups/:id/badges
``` ```
Example response: Example response:
...@@ -131,7 +131,7 @@ PUT /groups/:id/badges/:badge_id ...@@ -131,7 +131,7 @@ PUT /groups/:id/badges/:badge_id
| `image_url` | string | no | URL of the badge image | | `image_url` | string | no | URL of the badge image |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/badges/:badge_id curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/badges/:badge_id
``` ```
Example response: Example response:
...@@ -161,7 +161,7 @@ DELETE /groups/:id/badges/:badge_id ...@@ -161,7 +161,7 @@ DELETE /groups/:id/badges/:badge_id
| `badge_id` | integer | yes | The badge ID | | `badge_id` | integer | yes | The badge ID |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/badges/:badge_id curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/badges/:badge_id
``` ```
## Preview a badge from a group ## Preview a badge from a group
...@@ -179,7 +179,7 @@ GET /groups/:id/badges/render ...@@ -179,7 +179,7 @@ GET /groups/:id/badges/render
| `image_url` | string | yes | URL of the badge image | | `image_url` | string | yes | URL of the badge image |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/badges/render?link_url=http%3A%2F%2Fexample.com%2Fci_status.svg%3Fproject%3D%25%7Bproject_path%7D%26ref%3D%25%7Bdefault_branch%7D&image_url=https%3A%2F%2Fshields.io%2Fmy%2Fbadge curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/badges/render?link_url=http%3A%2F%2Fexample.com%2Fci_status.svg%3Fproject%3D%25%7Bproject_path%7D%26ref%3D%25%7Bdefault_branch%7D&image_url=https%3A%2F%2Fshields.io%2Fmy%2Fbadge
``` ```
Example response: Example response:
......
...@@ -18,7 +18,7 @@ GET /groups/:id/boards ...@@ -18,7 +18,7 @@ GET /groups/:id/boards
| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/boards
``` ```
Example response: Example response:
...@@ -109,7 +109,7 @@ GET /groups/:id/boards/:board_id ...@@ -109,7 +109,7 @@ GET /groups/:id/boards/:board_id
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/boards/1
``` ```
Example response: Example response:
...@@ -198,7 +198,7 @@ POST /groups/:id/boards ...@@ -198,7 +198,7 @@ POST /groups/:id/boards
| `name` | string | yes | The name of the new board | | `name` | string | yes | The name of the new board |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards?name=newboard curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/boards?name=newboard
``` ```
Example response: Example response:
...@@ -295,7 +295,7 @@ PUT /groups/:id/boards/:board_id ...@@ -295,7 +295,7 @@ PUT /groups/:id/boards/:board_id
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards/1?name=new_name&milestone_id=44&assignee_id=1&labels=GroupLabel&weight=4 curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/boards/1?name=new_name&milestone_id=44&assignee_id=1&labels=GroupLabel&weight=4
``` ```
Example response: Example response:
...@@ -381,7 +381,7 @@ DELETE /groups/:id/boards/:board_id ...@@ -381,7 +381,7 @@ DELETE /groups/:id/boards/:board_id
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards/1 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/boards/1
``` ```
## List board lists ## List board lists
...@@ -399,7 +399,7 @@ GET /groups/:id/boards/:board_id/lists ...@@ -399,7 +399,7 @@ GET /groups/:id/boards/:board_id/lists
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards/1/lists curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/boards/1/lists
``` ```
Example response: Example response:
...@@ -451,7 +451,7 @@ GET /groups/:id/boards/:board_id/lists/:list_id ...@@ -451,7 +451,7 @@ GET /groups/:id/boards/:board_id/lists/:list_id
| `list_id` | integer | yes | The ID of a board's list | | `list_id` | integer | yes | The ID of a board's list |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards/1/lists/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/boards/1/lists/1
``` ```
Example response: Example response:
...@@ -483,7 +483,7 @@ POST /groups/:id/boards/:board_id/lists ...@@ -483,7 +483,7 @@ POST /groups/:id/boards/:board_id/lists
| `label_id` | integer | yes | The ID of a label | | `label_id` | integer | yes | The ID of a label |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards/1/lists?label_id=5 curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/boards/1/lists?label_id=5
``` ```
Example response: Example response:
...@@ -516,7 +516,7 @@ PUT /groups/:id/boards/:board_id/lists/:list_id ...@@ -516,7 +516,7 @@ PUT /groups/:id/boards/:board_id/lists/:list_id
| `position` | integer | yes | The position of the list | | `position` | integer | yes | The position of the list |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/group/5/boards/1/lists/1?position=2 curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/group/5/boards/1/lists/1?position=2
``` ```
Example response: Example response:
...@@ -548,7 +548,7 @@ DELETE /groups/:id/boards/:board_id/lists/:list_id ...@@ -548,7 +548,7 @@ DELETE /groups/:id/boards/:board_id/lists/:list_id
| `list_id` | integer | yes | The ID of a board's list | | `list_id` | integer | yes | The ID of a board's list |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards/1/lists/1 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/boards/1/lists/1
``` ```
[ee-5954]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5954 [ee-5954]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5954
...@@ -15,7 +15,7 @@ GET /groups/:id/variables ...@@ -15,7 +15,7 @@ GET /groups/:id/variables
| `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/groups/1/variables" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables"
``` ```
```json ```json
...@@ -45,7 +45,7 @@ GET /groups/:id/variables/:key ...@@ -45,7 +45,7 @@ GET /groups/:id/variables/:key
| `key` | string | yes | The `key` of a variable | | `key` | string | yes | The `key` of a variable |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/groups/1/variables/TEST_VARIABLE_1" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/TEST_VARIABLE_1"
``` ```
```json ```json
...@@ -71,7 +71,7 @@ POST /groups/:id/variables ...@@ -71,7 +71,7 @@ POST /groups/:id/variables
| `protected` | boolean | no | Whether the variable is protected | | `protected` | boolean | no | Whether the variable is protected |
``` ```
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/groups/1/variables" --form "key=NEW_VARIABLE" --form "value=new value" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables" --form "key=NEW_VARIABLE" --form "value=new value"
``` ```
```json ```json
...@@ -98,7 +98,7 @@ PUT /groups/:id/variables/:key ...@@ -98,7 +98,7 @@ PUT /groups/:id/variables/:key
| `protected` | boolean | no | Whether the variable is protected | | `protected` | boolean | no | Whether the variable is protected |
``` ```
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/groups/1/variables/NEW_VARIABLE" --form "value=updated value" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/NEW_VARIABLE" --form "value=updated value"
``` ```
```json ```json
...@@ -123,7 +123,7 @@ DELETE /groups/:id/variables/:key ...@@ -123,7 +123,7 @@ DELETE /groups/:id/variables/:key
| `key` | string | yes | The `key` of a variable | | `key` | string | yes | The `key` of a variable |
``` ```
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/groups/1/variables/VARIABLE_1" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/VARIABLE_1"
``` ```
[ce-34519]: https://gitlab.com/gitlab-org/gitlab-ce/issues/34519 [ce-34519]: https://gitlab.com/gitlab-org/gitlab-ce/issues/34519
...@@ -26,7 +26,7 @@ Parameters: ...@@ -26,7 +26,7 @@ Parameters:
| `search` | string | optional | Return only milestones with a title or description matching the provided string | | `search` | string | optional | Return only milestones with a title or description matching the provided string |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/milestones curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/milestones
``` ```
Example Response: Example Response:
......
...@@ -220,7 +220,7 @@ Parameters: ...@@ -220,7 +220,7 @@ Parameters:
| `with_projects` | boolean | no | Include details from projects that belong to the specified group (defaults to `true`). | | `with_projects` | boolean | no | Include details from projects that belong to the specified group (defaults to `true`). |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/4 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/4
``` ```
Example response: Example response:
...@@ -376,7 +376,7 @@ Example response: ...@@ -376,7 +376,7 @@ Example response:
When adding the parameter `with_projects=false`, projects will not be returned. When adding the parameter `with_projects=false`, projects will not be returned.
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/4?with_projects=false curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/4?with_projects=false
``` ```
Example response: Example response:
...@@ -457,7 +457,7 @@ PUT /groups/:id ...@@ -457,7 +457,7 @@ PUT /groups/:id
| `shared_runners_minutes_limit` | integer | no | (admin-only) Pipeline minutes quota for this group | | `shared_runners_minutes_limit` | integer | no | (admin-only) Pipeline minutes quota for this group |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/groups/5?name=Experimental" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5?name=Experimental"
``` ```
......
...@@ -53,7 +53,7 @@ GET /issues?my_reaction_emoji=star ...@@ -53,7 +53,7 @@ GET /issues?my_reaction_emoji=star
| `updated_before` | datetime | no | Return issues updated on or before the given time | | `updated_before` | datetime | no | Return issues updated on or before the given time |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/issues curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/issues
``` ```
Example response: Example response:
...@@ -169,7 +169,7 @@ GET /groups/:id/issues?my_reaction_emoji=star ...@@ -169,7 +169,7 @@ GET /groups/:id/issues?my_reaction_emoji=star
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/4/issues curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/4/issues
``` ```
Example response: Example response:
...@@ -284,7 +284,7 @@ GET /projects/:id/issues?my_reaction_emoji=star ...@@ -284,7 +284,7 @@ GET /projects/:id/issues?my_reaction_emoji=star
| `updated_before` | datetime | no | Return issues updated on or before the given time | | `updated_before` | datetime | no | Return issues updated on or before the given time |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/4/issues curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/4/issues
``` ```
Example response: Example response:
...@@ -379,7 +379,7 @@ GET /projects/:id/issues/:issue_iid ...@@ -379,7 +379,7 @@ GET /projects/:id/issues/:issue_iid
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/4/issues/41 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/4/issues/41
``` ```
Example response: Example response:
...@@ -484,7 +484,7 @@ POST /projects/:id/issues ...@@ -484,7 +484,7 @@ POST /projects/:id/issues
| `weight` | integer | no | The weight of the issue. Valid values are greater than or equal to 0. | | `weight` | integer | no | The weight of the issue. Valid values are greater than or equal to 0. |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/4/issues?title=Issues%20with%20auth&labels=bug curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/4/issues?title=Issues%20with%20auth&labels=bug
``` ```
Example response: Example response:
...@@ -567,7 +567,7 @@ PUT /projects/:id/issues/:issue_iid ...@@ -567,7 +567,7 @@ PUT /projects/:id/issues/:issue_iid
| `discussion_locked` | boolean | no | Flag indicating if the issue's discussion is locked. If the discussion is locked only project members can add or edit comments. | | `discussion_locked` | boolean | no | Flag indicating if the issue's discussion is locked. If the discussion is locked only project members can add or edit comments. |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/4/issues/85?state_event=close curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/4/issues/85?state_event=close
``` ```
Example response: Example response:
...@@ -645,7 +645,7 @@ DELETE /projects/:id/issues/:issue_iid ...@@ -645,7 +645,7 @@ DELETE /projects/:id/issues/:issue_iid
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/4/issues/85 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/4/issues/85
``` ```
## Move an issue ## Move an issue
...@@ -668,7 +668,7 @@ POST /projects/:id/issues/:issue_iid/move ...@@ -668,7 +668,7 @@ POST /projects/:id/issues/:issue_iid/move
| `to_project_id` | integer | yes | The ID of the new project | | `to_project_id` | integer | yes | The ID of the new project |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form to_project_id=5 https://gitlab.example.com/api/v4/projects/4/issues/85/move curl --header "PRIVATE-TOKEN: <your_access_token>" --form to_project_id=5 https://gitlab.example.com/api/v4/projects/4/issues/85/move
``` ```
Example response: Example response:
...@@ -751,7 +751,7 @@ POST /projects/:id/issues/:issue_iid/subscribe ...@@ -751,7 +751,7 @@ POST /projects/:id/issues/:issue_iid/subscribe
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/subscribe curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/93/subscribe
``` ```
Example response: Example response:
...@@ -835,7 +835,7 @@ POST /projects/:id/issues/:issue_iid/unsubscribe ...@@ -835,7 +835,7 @@ POST /projects/:id/issues/:issue_iid/unsubscribe
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/unsubscribe curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/93/unsubscribe
``` ```
Example response: Example response:
...@@ -894,7 +894,7 @@ POST /projects/:id/issues/:issue_iid/todo ...@@ -894,7 +894,7 @@ POST /projects/:id/issues/:issue_iid/todo
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/todo curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/93/todo
``` ```
Example response: Example response:
...@@ -1001,7 +1001,7 @@ POST /projects/:id/issues/:issue_iid/time_estimate ...@@ -1001,7 +1001,7 @@ POST /projects/:id/issues/:issue_iid/time_estimate
| `duration` | string | yes | The duration in human format. e.g: 3h30m | | `duration` | string | yes | The duration in human format. e.g: 3h30m |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/time_estimate?duration=3h30m curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/93/time_estimate?duration=3h30m
``` ```
Example response: Example response:
...@@ -1029,7 +1029,7 @@ POST /projects/:id/issues/:issue_iid/reset_time_estimate ...@@ -1029,7 +1029,7 @@ POST /projects/:id/issues/:issue_iid/reset_time_estimate
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/reset_time_estimate curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/93/reset_time_estimate
``` ```
Example response: Example response:
...@@ -1058,7 +1058,7 @@ POST /projects/:id/issues/:issue_iid/add_spent_time ...@@ -1058,7 +1058,7 @@ POST /projects/:id/issues/:issue_iid/add_spent_time
| `duration` | string | yes | The duration in human format. e.g: 3h30m | | `duration` | string | yes | The duration in human format. e.g: 3h30m |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/add_spent_time?duration=1h curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/93/add_spent_time?duration=1h
``` ```
Example response: Example response:
...@@ -1086,7 +1086,7 @@ POST /projects/:id/issues/:issue_iid/reset_spent_time ...@@ -1086,7 +1086,7 @@ POST /projects/:id/issues/:issue_iid/reset_spent_time
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/reset_spent_time curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/93/reset_spent_time
``` ```
Example response: Example response:
...@@ -1112,7 +1112,7 @@ GET /projects/:id/issues/:issue_iid/time_stats ...@@ -1112,7 +1112,7 @@ GET /projects/:id/issues/:issue_iid/time_stats
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/time_stats curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/93/time_stats
``` ```
Example response: Example response:
...@@ -1140,7 +1140,7 @@ GET /projects/:id/issues/:issue_id/related_merge_requests ...@@ -1140,7 +1140,7 @@ GET /projects/:id/issues/:issue_id/related_merge_requests
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```sh ```sh
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/issues/11/related_merge_requests curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/issues/11/related_merge_requests
``` ```
Example response: Example response:
...@@ -1227,7 +1227,7 @@ GET /projects/:id/issues/:issue_iid/closed_by ...@@ -1227,7 +1227,7 @@ GET /projects/:id/issues/:issue_iid/closed_by
| `issue_iid` | integer | yes | The internal ID of a project issue | | `issue_iid` | integer | yes | The internal ID of a project issue |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/issues/11/closed_by curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/issues/11/closed_by
``` ```
Example response: Example response:
...@@ -1294,7 +1294,7 @@ GET /projects/:id/issues/:issue_iid/participants ...@@ -1294,7 +1294,7 @@ GET /projects/:id/issues/:issue_iid/participants
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/participants curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/93/participants
``` ```
Example response: Example response:
...@@ -1339,7 +1339,7 @@ GET /projects/:id/issues/:issue_iid/user_agent_detail ...@@ -1339,7 +1339,7 @@ GET /projects/:id/issues/:issue_iid/user_agent_detail
| `issue_iid` | integer | yes | The internal ID of a project's issue | | `issue_iid` | integer | yes | The internal ID of a project's issue |
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/93/user_agent_detail curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/93/user_agent_detail
``` ```
Example response: Example response:
......
...@@ -14,7 +14,7 @@ GET /projects/:id/jobs ...@@ -14,7 +14,7 @@ GET /projects/:id/jobs
| `scope` | string **or** array of strings | no | Scope of jobs to show. Either one of or an array of the following: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`, or `manual`. All jobs are returned if `scope` is not provided. | | `scope` | string **or** array of strings | no | Scope of jobs to show. Either one of or an array of the following: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`, or `manual`. All jobs are returned if `scope` is not provided. |
```sh ```sh
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/1/jobs?scope[]=pending&scope[]=running' curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/1/jobs?scope[]=pending&scope[]=running'
``` ```
Example of response Example of response
...@@ -147,7 +147,7 @@ GET /projects/:id/pipelines/:pipeline_id/jobs ...@@ -147,7 +147,7 @@ GET /projects/:id/pipelines/:pipeline_id/jobs
| `scope` | string **or** array of strings | no | Scope of jobs to show. Either one of or an array of the following: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`, or `manual`. All jobs are returned if `scope` is not provided. | | `scope` | string **or** array of strings | no | Scope of jobs to show. Either one of or an array of the following: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`, or `manual`. All jobs are returned if `scope` is not provided. |
```sh ```sh
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/1/pipelines/6/jobs?scope[]=pending&scope[]=running' curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/1/pipelines/6/jobs?scope[]=pending&scope[]=running'
``` ```
Example of response Example of response
...@@ -279,7 +279,7 @@ GET /projects/:id/jobs/:job_id ...@@ -279,7 +279,7 @@ GET /projects/:id/jobs/:job_id
| `job_id` | integer | yes | The ID of a job. | | `job_id` | integer | yes | The ID of a job. |
```sh ```sh
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/8" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/8"
``` ```
Example of response Example of response
...@@ -361,7 +361,7 @@ Example requests: ...@@ -361,7 +361,7 @@ Example requests:
- Using the `PRIVATE-TOKEN` header: - Using the `PRIVATE-TOKEN` header:
```sh ```sh
curl --location --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/8/artifacts" curl --location --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/8/artifacts"
``` ```
- Using the `JOB-TOKEN` header (only inside `.gitlab-ci.yml`): - Using the `JOB-TOKEN` header (only inside `.gitlab-ci.yml`):
...@@ -414,7 +414,7 @@ Example requests: ...@@ -414,7 +414,7 @@ Example requests:
- Using the `PRIVATE-TOKEN` header: - Using the `PRIVATE-TOKEN` header:
```sh ```sh
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/master/download?job=test" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/master/download?job=test"
``` ```
- Using the `JOB-TOKEN` header (only inside `.gitlab-ci.yml`): - Using the `JOB-TOKEN` header (only inside `.gitlab-ci.yml`):
...@@ -461,7 +461,7 @@ Parameters ...@@ -461,7 +461,7 @@ Parameters
Example request: Example request:
```sh ```sh
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/5/artifacts/some/release/file.pdf" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/5/artifacts/some/release/file.pdf"
``` ```
Possible response status codes: Possible response status codes:
...@@ -496,7 +496,7 @@ Parameters: ...@@ -496,7 +496,7 @@ Parameters:
Example request: Example request:
```sh ```sh
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/master/raw/some/release/file.pdf?job=pdf" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/master/raw/some/release/file.pdf?job=pdf"
``` ```
Possible response status codes: Possible response status codes:
...@@ -521,7 +521,7 @@ GET /projects/:id/jobs/:job_id/trace ...@@ -521,7 +521,7 @@ GET /projects/:id/jobs/:job_id/trace
| job_id | integer | yes | The ID of a job. | | job_id | integer | yes | The ID of a job. |
```sh ```sh
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/8/trace" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/8/trace"
``` ```
Possible response status codes: Possible response status codes:
...@@ -545,7 +545,7 @@ POST /projects/:id/jobs/:job_id/cancel ...@@ -545,7 +545,7 @@ POST /projects/:id/jobs/:job_id/cancel
| `job_id` | integer | yes | The ID of a job. | | `job_id` | integer | yes | The ID of a job. |
```sh ```sh
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/1/cancel" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/1/cancel"
``` ```
Example of response Example of response
...@@ -593,7 +593,7 @@ POST /projects/:id/jobs/:job_id/retry ...@@ -593,7 +593,7 @@ POST /projects/:id/jobs/:job_id/retry
| `job_id` | integer | yes | The ID of a job. | | `job_id` | integer | yes | The ID of a job. |
```sh ```sh
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/1/retry" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/1/retry"
``` ```
Example of response Example of response
...@@ -645,7 +645,7 @@ Parameters ...@@ -645,7 +645,7 @@ Parameters
Example of request Example of request
```sh ```sh
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/1/erase" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/1/erase"
``` ```
Example of response Example of response
...@@ -698,7 +698,7 @@ Parameters ...@@ -698,7 +698,7 @@ Parameters
Example request: Example request:
```sh ```sh
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/1/artifacts/keep" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/1/artifacts/keep"
``` ```
Example response: Example response:
...@@ -747,7 +747,7 @@ POST /projects/:id/jobs/:job_id/play ...@@ -747,7 +747,7 @@ POST /projects/:id/jobs/:job_id/play
| `job_id` | integer | yes | The ID of a job. | | `job_id` | integer | yes | The ID of a job. |
```sh ```sh
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/jobs/1/play" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/jobs/1/play"
``` ```
Example of response Example of response
......
...@@ -13,7 +13,7 @@ GET /projects/:id/labels ...@@ -13,7 +13,7 @@ GET /projects/:id/labels
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/labels curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/labels
``` ```
Example response: Example response:
...@@ -95,7 +95,7 @@ POST /projects/:id/labels ...@@ -95,7 +95,7 @@ POST /projects/:id/labels
| `priority` | integer | no | The priority of the label. Must be greater or equal than zero or `null` to remove the priority. | | `priority` | integer | no | The priority of the label. Must be greater or equal than zero or `null` to remove the priority. |
```bash ```bash
curl --data "name=feature&color=#5843AD" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/labels" curl --data "name=feature&color=#5843AD" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/labels"
``` ```
Example response: Example response:
...@@ -128,7 +128,7 @@ DELETE /projects/:id/labels ...@@ -128,7 +128,7 @@ DELETE /projects/:id/labels
| `name` | string | yes | The name of the label | | `name` | string | yes | The name of the label |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/labels?name=bug" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/labels?name=bug"
``` ```
## Edit an existing label ## Edit an existing label
...@@ -151,7 +151,7 @@ PUT /projects/:id/labels ...@@ -151,7 +151,7 @@ PUT /projects/:id/labels
```bash ```bash
curl --request PUT --data "name=documentation&new_name=docs&color=#8E44AD&description=Documentation" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/labels" curl --request PUT --data "name=documentation&new_name=docs&color=#8E44AD&description=Documentation" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/labels"
``` ```
Example response: Example response:
...@@ -186,7 +186,7 @@ POST /projects/:id/labels/:label_id/subscribe ...@@ -186,7 +186,7 @@ POST /projects/:id/labels/:label_id/subscribe
| `label_id` | integer or string | yes | The ID or title of a project's label | | `label_id` | integer or string | yes | The ID or title of a project's label |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/labels/1/subscribe curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/labels/1/subscribe
``` ```
Example response: Example response:
...@@ -221,5 +221,5 @@ POST /projects/:id/labels/:label_id/unsubscribe ...@@ -221,5 +221,5 @@ POST /projects/:id/labels/:label_id/unsubscribe
| `label_id` | integer or string | yes | The ID or title of a project's label | | `label_id` | integer or string | yes | The ID or title of a project's label |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/labels/1/unsubscribe curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/labels/1/unsubscribe
``` ```
...@@ -37,7 +37,7 @@ POST /license ...@@ -37,7 +37,7 @@ POST /license
| `license` | string | yes | The license string | | `license` | string | yes | The license string |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/license?license=eyJkYXRhIjoiMHM5Q...S01Udz09XG4ifQ==" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/license?license=eyJkYXRhIjoiMHM5Q...S01Udz09XG4ifQ=="
``` ```
Example response: Example response:
......
...@@ -13,7 +13,7 @@ GET /projects/:id/managed_licenses ...@@ -13,7 +13,7 @@ GET /projects/:id/managed_licenses
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/managed_licenses curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/managed_licenses
``` ```
Example response: Example response:
...@@ -47,7 +47,7 @@ GET /projects/:id/managed_licenses/:managed_license_id ...@@ -47,7 +47,7 @@ GET /projects/:id/managed_licenses/:managed_license_id
| `managed_license_id` | integer/string | yes | The ID or URL-encoded name of the license belonging to the project | | `managed_license_id` | integer/string | yes | The ID or URL-encoded name of the license belonging to the project |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/6" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/6"
``` ```
Example response: Example response:
...@@ -75,7 +75,7 @@ POST /projects/:id/managed_licenses ...@@ -75,7 +75,7 @@ POST /projects/:id/managed_licenses
| `approval_status` | string | yes | The approval status. "approved" or "blacklisted" | | `approval_status` | string | yes | The approval status. "approved" or "blacklisted" |
```bash ```bash
curl --data "name=MIT&approval_status=blacklisted" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/managed_licenses" curl --data "name=MIT&approval_status=blacklisted" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses"
``` ```
Example response: Example response:
...@@ -102,7 +102,7 @@ DELETE /projects/:id/managed_licenses/:managed_license_id ...@@ -102,7 +102,7 @@ DELETE /projects/:id/managed_licenses/:managed_license_id
| `managed_license_id` | integer/string | yes | The ID or URL-encoded name of the license belonging to the project | | `managed_license_id` | integer/string | yes | The ID or URL-encoded name of the license belonging to the project |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/4" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/4"
``` ```
When successful, it replies with an HTTP 204 response. When successful, it replies with an HTTP 204 response.
...@@ -122,7 +122,7 @@ PATCH /projects/:id/managed_licenses/:managed_license_id ...@@ -122,7 +122,7 @@ PATCH /projects/:id/managed_licenses/:managed_license_id
| `approval_status` | string | yes | The approval status. "approved" or "blacklisted" | | `approval_status` | string | yes | The approval status. "approved" or "blacklisted" |
```bash ```bash
curl --request PATCH --data "approval_status=blacklisted" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/6" curl --request PATCH --data "approval_status=blacklisted" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/6"
``` ```
Example response: Example response:
......
...@@ -28,8 +28,8 @@ GET /projects/:id/members ...@@ -28,8 +28,8 @@ GET /projects/:id/members
| `query` | string | no | A query string to search for members | | `query` | string | no | A query string to search for members |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/members curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/members
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/members curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/members
``` ```
Example response: Example response:
...@@ -75,8 +75,8 @@ GET /projects/:id/members/all ...@@ -75,8 +75,8 @@ GET /projects/:id/members/all
| `query` | string | no | A query string to search for members | | `query` | string | no | A query string to search for members |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/members/all curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/members/all
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/members/all curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/members/all
``` ```
Example response: Example response:
...@@ -131,8 +131,8 @@ GET /projects/:id/members/:user_id ...@@ -131,8 +131,8 @@ GET /projects/:id/members/:user_id
| `user_id` | integer | yes | The user ID of the member | | `user_id` | integer | yes | The user ID of the member |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/members/:user_id curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/members/:user_id
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/members/:user_id curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/members/:user_id
``` ```
Example response: Example response:
...@@ -167,8 +167,8 @@ POST /projects/:id/members ...@@ -167,8 +167,8 @@ POST /projects/:id/members
| `expires_at` | string | no | A date string in the format YEAR-MONTH-DAY | | `expires_at` | string | no | A date string in the format YEAR-MONTH-DAY |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "user_id=1&access_level=30" https://gitlab.example.com/api/v4/groups/:id/members curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "user_id=1&access_level=30" https://gitlab.example.com/api/v4/groups/:id/members
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "user_id=1&access_level=30" https://gitlab.example.com/api/v4/projects/:id/members curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "user_id=1&access_level=30" https://gitlab.example.com/api/v4/projects/:id/members
``` ```
Example response: Example response:
...@@ -203,8 +203,8 @@ PUT /projects/:id/members/:user_id ...@@ -203,8 +203,8 @@ PUT /projects/:id/members/:user_id
| `expires_at` | string | no | A date string in the format YEAR-MONTH-DAY | | `expires_at` | string | no | A date string in the format YEAR-MONTH-DAY |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/members/:user_id?access_level=40 curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/members/:user_id?access_level=40
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/members/:user_id?access_level=40 curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/members/:user_id?access_level=40
``` ```
Example response: Example response:
...@@ -237,8 +237,8 @@ DELETE /projects/:id/members/:user_id ...@@ -237,8 +237,8 @@ DELETE /projects/:id/members/:user_id
| `user_id` | integer | yes | The user ID of the member | | `user_id` | integer | yes | The user ID of the member |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/members/:user_id curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/members/:user_id
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/members/:user_id curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/members/:user_id
``` ```
## Give a group access to a project ## Give a group access to a project
......
...@@ -982,7 +982,7 @@ DELETE /projects/:id/merge_requests/:merge_request_iid ...@@ -982,7 +982,7 @@ DELETE /projects/:id/merge_requests/:merge_request_iid
| `merge_request_iid` | integer | yes | The internal ID of the merge request | | `merge_request_iid` | integer | yes | The internal ID of the merge request |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/4/merge_requests/85 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/4/merge_requests/85
``` ```
## Accept MR ## Accept MR
...@@ -1247,7 +1247,7 @@ PUT /projects/:id/merge_requests/:merge_request_iid/rebase ...@@ -1247,7 +1247,7 @@ PUT /projects/:id/merge_requests/:merge_request_iid/rebase
| `merge_request_iid` | integer | yes | The internal ID of the merge request | | `merge_request_iid` | integer | yes | The internal ID of the merge request |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/76/merge_requests/1/rebase curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/76/merge_requests/1/rebase
``` ```
This is an asynchronous request. The API will return an empty `202 Accepted` This is an asynchronous request. The API will return an empty `202 Accepted`
...@@ -1303,7 +1303,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/closes_issues ...@@ -1303,7 +1303,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/closes_issues
| `merge_request_iid` | integer | yes | The internal ID of the merge request | | `merge_request_iid` | integer | yes | The internal ID of the merge request |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/76/merge_requests/1/closes_issues curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/76/merge_requests/1/closes_issues
``` ```
Example response when the GitLab issue tracker is used: Example response when the GitLab issue tracker is used:
...@@ -1379,7 +1379,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/subscribe ...@@ -1379,7 +1379,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/subscribe
| `merge_request_iid` | integer | yes | The internal ID of the merge request | | `merge_request_iid` | integer | yes | The internal ID of the merge request |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/17/subscribe curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/17/subscribe
``` ```
Example response: Example response:
...@@ -1501,7 +1501,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/unsubscribe ...@@ -1501,7 +1501,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/unsubscribe
| `merge_request_iid` | integer | yes | The internal ID of the merge request | | `merge_request_iid` | integer | yes | The internal ID of the merge request |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/17/unsubscribe curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/17/unsubscribe
``` ```
Example response: Example response:
...@@ -1623,7 +1623,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/todo ...@@ -1623,7 +1623,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/todo
| `merge_request_iid` | integer | yes | The internal ID of the merge request | | `merge_request_iid` | integer | yes | The internal ID of the merge request |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/27/todo curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/27/todo
``` ```
Example response: Example response:
...@@ -1726,7 +1726,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/versions ...@@ -1726,7 +1726,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/versions
| `merge_request_iid` | integer | yes | The internal ID of the merge request | | `merge_request_iid` | integer | yes | The internal ID of the merge request |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/merge_requests/1/versions curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/merge_requests/1/versions
``` ```
Example response: Example response:
...@@ -1768,7 +1768,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_id ...@@ -1768,7 +1768,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_id
| `version_id` | integer | yes | The ID of the merge request diff version | | `version_id` | integer | yes | The ID of the merge request diff version |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/merge_requests/1/versions/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/merge_requests/1/versions/1
``` ```
Example response: Example response:
...@@ -1835,7 +1835,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/time_estimate ...@@ -1835,7 +1835,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/time_estimate
| `duration` | string | yes | The duration in human format. e.g: 3h30m | | `duration` | string | yes | The duration in human format. e.g: 3h30m |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/93/time_estimate?duration=3h30m curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/93/time_estimate?duration=3h30m
``` ```
Example response: Example response:
...@@ -1863,7 +1863,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/reset_time_estimate ...@@ -1863,7 +1863,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/reset_time_estimate
| `merge_request_iid` | integer | yes | The internal ID of a project's merge_request | | `merge_request_iid` | integer | yes | The internal ID of a project's merge_request |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/93/reset_time_estimate curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/93/reset_time_estimate
``` ```
Example response: Example response:
...@@ -1892,7 +1892,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/add_spent_time ...@@ -1892,7 +1892,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/add_spent_time
| `duration` | string | yes | The duration in human format. e.g: 3h30m | | `duration` | string | yes | The duration in human format. e.g: 3h30m |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/93/add_spent_time?duration=1h curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/93/add_spent_time?duration=1h
``` ```
Example response: Example response:
...@@ -1920,7 +1920,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/reset_spent_time ...@@ -1920,7 +1920,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/reset_spent_time
| `merge_request_iid` | integer | yes | The internal ID of a project's merge_request | | `merge_request_iid` | integer | yes | The internal ID of a project's merge_request |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/93/reset_spent_time curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/93/reset_spent_time
``` ```
Example response: Example response:
...@@ -1946,7 +1946,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/time_stats ...@@ -1946,7 +1946,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/time_stats
| `merge_request_iid` | integer | yes | The internal ID of the merge request | | `merge_request_iid` | integer | yes | The internal ID of the merge request |
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/93/time_stats curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/93/time_stats
``` ```
Example response: Example response:
......
...@@ -23,7 +23,7 @@ Parameters: ...@@ -23,7 +23,7 @@ Parameters:
| `search` | string | optional | Return only milestones with a title or description matching the provided string | | `search` | string | optional | Return only milestones with a title or description matching the provided string |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/milestones curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/milestones
``` ```
Example Response: Example Response:
......
...@@ -19,7 +19,7 @@ GET /namespaces ...@@ -19,7 +19,7 @@ GET /namespaces
Example request: Example request:
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/namespaces curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/namespaces
``` ```
Example response: Example response:
...@@ -72,7 +72,7 @@ GET /namespaces?search=foobar ...@@ -72,7 +72,7 @@ GET /namespaces?search=foobar
Example request: Example request:
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/namespaces?search=twitter curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/namespaces?search=twitter
``` ```
Example response: Example response:
...@@ -106,7 +106,7 @@ GET /namespaces/:id ...@@ -106,7 +106,7 @@ GET /namespaces/:id
Example request: Example request:
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/namespaces/2 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/namespaces/2
``` ```
Example response: Example response:
...@@ -126,7 +126,7 @@ Example response: ...@@ -126,7 +126,7 @@ Example response:
Example request: Example request:
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/namespaces/group1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/namespaces/group1
``` ```
Example response: Example response:
......
...@@ -66,7 +66,7 @@ GET /projects/:id/issues/:issue_iid/notes?sort=asc&order_by=updated_at ...@@ -66,7 +66,7 @@ GET /projects/:id/issues/:issue_iid/notes?sort=asc&order_by=updated_at
``` ```
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/11/notes curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/notes
``` ```
### Get single issue note ### Get single issue note
...@@ -84,7 +84,7 @@ Parameters: ...@@ -84,7 +84,7 @@ Parameters:
- `note_id` (required) - The ID of an issue note - `note_id` (required) - The ID of an issue note
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/11/notes/1 curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/notes/1
``` ```
### Create new issue note ### Create new issue note
...@@ -103,7 +103,7 @@ Parameters: ...@@ -103,7 +103,7 @@ Parameters:
- `created_at` (optional) - Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z (requires admin or project/group owner rights) - `created_at` (optional) - Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z (requires admin or project/group owner rights)
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/11/notes?body=note curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/notes?body=note
``` ```
### Modify existing issue note ### Modify existing issue note
...@@ -122,7 +122,7 @@ Parameters: ...@@ -122,7 +122,7 @@ Parameters:
- `body` (required) - The content of a note - `body` (required) - The content of a note
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/11/notes?body=note curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/notes?body=note
``` ```
### Delete an issue note ### Delete an issue note
...@@ -142,7 +142,7 @@ Parameters: ...@@ -142,7 +142,7 @@ Parameters:
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/11/notes/636 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/notes/636
``` ```
## Snippets ## Snippets
...@@ -164,7 +164,7 @@ GET /projects/:id/snippets/:snippet_id/notes?sort=asc&order_by=updated_at ...@@ -164,7 +164,7 @@ GET /projects/:id/snippets/:snippet_id/notes?sort=asc&order_by=updated_at
| `order_by` | string | no | Return snippet notes ordered by `created_at` or `updated_at` fields. Default is `created_at` | `order_by` | string | no | Return snippet notes ordered by `created_at` or `updated_at` fields. Default is `created_at`
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/snippets/11/notes curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/snippets/11/notes
``` ```
### Get single snippet note ### Get single snippet note
...@@ -201,7 +201,7 @@ Parameters: ...@@ -201,7 +201,7 @@ Parameters:
``` ```
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/snippets/11/notes/11 curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/snippets/11/notes/11
``` ```
### Create new snippet note ### Create new snippet note
...@@ -221,7 +221,7 @@ Parameters: ...@@ -221,7 +221,7 @@ Parameters:
- `created_at` (optional) - Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z - `created_at` (optional) - Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/snippet/11/notes?body=note curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/snippet/11/notes?body=note
``` ```
### Modify existing snippet note ### Modify existing snippet note
...@@ -240,7 +240,7 @@ Parameters: ...@@ -240,7 +240,7 @@ Parameters:
- `body` (required) - The content of a note - `body` (required) - The content of a note
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/snippets/11/notes?body=note curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/snippets/11/notes?body=note
``` ```
### Delete a snippet note ### Delete a snippet note
...@@ -260,7 +260,7 @@ Parameters: ...@@ -260,7 +260,7 @@ Parameters:
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/snippets/52/notes/1659 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/snippets/52/notes/1659
``` ```
## Merge Requests ## Merge Requests
...@@ -282,7 +282,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/notes?sort=asc&order_by=upda ...@@ -282,7 +282,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/notes?sort=asc&order_by=upda
| `order_by` | string | no | Return merge request notes ordered by `created_at` or `updated_at` fields. Default is `created_at` | `order_by` | string | no | Return merge request notes ordered by `created_at` or `updated_at` fields. Default is `created_at`
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/notes curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/notes
``` ```
### Get single merge request note ### Get single merge request note
...@@ -323,7 +323,7 @@ Parameters: ...@@ -323,7 +323,7 @@ Parameters:
``` ```
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/notes/1 curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/notes/1
``` ```
### Create new merge request note ### Create new merge request note
...@@ -359,7 +359,7 @@ Parameters: ...@@ -359,7 +359,7 @@ Parameters:
- `body` (required) - The content of a note - `body` (required) - The content of a note
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/notes?body=note curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/notes?body=note
``` ```
### Delete a merge request note ### Delete a merge request note
...@@ -379,7 +379,7 @@ Parameters: ...@@ -379,7 +379,7 @@ Parameters:
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/7/notes/1602 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/7/notes/1602
``` ```
## Epics ## Epics
...@@ -401,7 +401,7 @@ GET /groups/:id/epics/:epic_id/notes?sort=asc&order_by=updated_at ...@@ -401,7 +401,7 @@ GET /groups/:id/epics/:epic_id/notes?sort=asc&order_by=updated_at
| `order_by` | string | no | Return epic notes ordered by `created_at` or `updated_at` fields. Default is `created_at` | | `order_by` | string | no | Return epic notes ordered by `created_at` or `updated_at` fields. Default is `created_at` |
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/epics/11/notes curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/epics/11/notes
``` ```
### Get single epic note ### Get single epic note
...@@ -440,7 +440,7 @@ Parameters: ...@@ -440,7 +440,7 @@ Parameters:
``` ```
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/epics/11/notes/1 curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/epics/11/notes/1
``` ```
### Create new epic note ### Create new epic note
...@@ -461,7 +461,7 @@ Parameters: ...@@ -461,7 +461,7 @@ Parameters:
| `body` | string | yes | The content of a note | | `body` | string | yes | The content of a note |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/snippet/11/notes?body=note curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/snippet/11/notes?body=note
``` ```
### Modify existing epic note ### Modify existing epic note
...@@ -482,7 +482,7 @@ Parameters: ...@@ -482,7 +482,7 @@ Parameters:
| `body` | string | yes | The content of a note | | `body` | string | yes | The content of a note |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/snippet/11/notes?body=note curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/snippet/11/notes?body=note
``` ```
### Delete an epic note ### Delete an epic note
...@@ -502,5 +502,5 @@ Parameters: ...@@ -502,5 +502,5 @@ Parameters:
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/epics/52/notes/1659 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/epics/52/notes/1659
``` ```
...@@ -44,7 +44,7 @@ GET /notification_settings ...@@ -44,7 +44,7 @@ GET /notification_settings
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/notification_settings curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/notification_settings
``` ```
Example response: Example response:
...@@ -65,7 +65,7 @@ PUT /notification_settings ...@@ -65,7 +65,7 @@ PUT /notification_settings
``` ```
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/notification_settings?level=watch curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/notification_settings?level=watch
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
...@@ -107,8 +107,8 @@ GET /projects/:id/notification_settings ...@@ -107,8 +107,8 @@ GET /projects/:id/notification_settings
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/notification_settings curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/notification_settings
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/8/notification_settings curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/8/notification_settings
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
...@@ -133,8 +133,8 @@ PUT /projects/:id/notification_settings ...@@ -133,8 +133,8 @@ PUT /projects/:id/notification_settings
``` ```
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/notification_settings?level=watch curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/notification_settings?level=watch
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/8/notification_settings?level=custom&new_note=true curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/8/notification_settings?level=custom&new_note=true
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
......
...@@ -13,7 +13,7 @@ GET /pages/domains ...@@ -13,7 +13,7 @@ GET /pages/domains
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/pages/domains curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/pages/domains
``` ```
```json ```json
...@@ -43,7 +43,7 @@ GET /projects/:id/pages/domains ...@@ -43,7 +43,7 @@ GET /projects/:id/pages/domains
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/pages/domains curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/pages/domains
``` ```
```json ```json
...@@ -79,7 +79,7 @@ GET /projects/:id/pages/domains/:domain ...@@ -79,7 +79,7 @@ GET /projects/:id/pages/domains/:domain
| `domain` | string | yes | The domain | | `domain` | string | yes | The domain |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/pages/domains/www.domain.example curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/pages/domains/www.domain.example
``` ```
```json ```json
...@@ -90,7 +90,7 @@ curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/a ...@@ -90,7 +90,7 @@ curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/a
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example
``` ```
```json ```json
...@@ -122,11 +122,11 @@ POST /projects/:id/pages/domains ...@@ -122,11 +122,11 @@ POST /projects/:id/pages/domains
| `key` | file/string | no | The certificate key in PEM format. | | `key` | file/string | no | The certificate key in PEM format. |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "domain=ssl.domain.example" --form "certificate=@/path/to/cert.pem" --form "key=@/path/to/key.pem" https://gitlab.example.com/api/v4/projects/5/pages/domains curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "domain=ssl.domain.example" --form "certificate=@/path/to/cert.pem" --form "key=@/path/to/key.pem" https://gitlab.example.com/api/v4/projects/5/pages/domains
``` ```
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "domain=ssl.domain.example" --form "certificate=$CERT_PEM" --form "key=$KEY_PEM" https://gitlab.example.com/api/v4/projects/5/pages/domains curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "domain=ssl.domain.example" --form "certificate=$CERT_PEM" --form "key=$KEY_PEM" https://gitlab.example.com/api/v4/projects/5/pages/domains
``` ```
```json ```json
...@@ -158,11 +158,11 @@ PUT /projects/:id/pages/domains/:domain ...@@ -158,11 +158,11 @@ PUT /projects/:id/pages/domains/:domain
| `key` | file/string | no | The certificate key in PEM format. | | `key` | file/string | no | The certificate key in PEM format. |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "certificate=@/path/to/cert.pem" --form "key=@/path/to/key.pem" https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form "certificate=@/path/to/cert.pem" --form "key=@/path/to/key.pem" https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example
``` ```
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "certificate=$CERT_PEM" --form "key=$KEY_PEM" https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form "certificate=$CERT_PEM" --form "key=$KEY_PEM" https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example
``` ```
```json ```json
...@@ -192,5 +192,5 @@ DELETE /projects/:id/pages/domains/:domain ...@@ -192,5 +192,5 @@ DELETE /projects/:id/pages/domains/:domain
| `domain` | string | yes | The domain | | `domain` | string | yes | The domain |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/pages/domains/ssl.domain.example
``` ```
...@@ -15,7 +15,7 @@ GET /projects/:id/triggers ...@@ -15,7 +15,7 @@ GET /projects/:id/triggers
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/triggers" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers"
``` ```
```json ```json
...@@ -46,7 +46,7 @@ GET /projects/:id/triggers/:trigger_id ...@@ -46,7 +46,7 @@ GET /projects/:id/triggers/:trigger_id
| `trigger_id` | integer | yes | The trigger id | | `trigger_id` | integer | yes | The trigger id |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/triggers/5" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers/5"
``` ```
```json ```json
...@@ -75,7 +75,7 @@ POST /projects/:id/triggers ...@@ -75,7 +75,7 @@ POST /projects/:id/triggers
| `description` | string | yes | The trigger name | | `description` | string | yes | The trigger name |
``` ```
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form description="my description" "https://gitlab.example.com/api/v4/projects/1/triggers" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form description="my description" "https://gitlab.example.com/api/v4/projects/1/triggers"
``` ```
```json ```json
...@@ -105,7 +105,7 @@ PUT /projects/:id/triggers/:trigger_id ...@@ -105,7 +105,7 @@ PUT /projects/:id/triggers/:trigger_id
| `description` | string | no | The trigger name | | `description` | string | no | The trigger name |
``` ```
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form description="my description" "https://gitlab.example.com/api/v4/projects/1/triggers/10" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form description="my description" "https://gitlab.example.com/api/v4/projects/1/triggers/10"
``` ```
```json ```json
...@@ -134,7 +134,7 @@ POST /projects/:id/triggers/:trigger_id/take_ownership ...@@ -134,7 +134,7 @@ POST /projects/:id/triggers/:trigger_id/take_ownership
| `trigger_id` | integer | yes | The trigger id | | `trigger_id` | integer | yes | The trigger id |
``` ```
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/triggers/10/take_ownership" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers/10/take_ownership"
``` ```
```json ```json
...@@ -163,5 +163,5 @@ DELETE /projects/:id/triggers/:trigger_id ...@@ -163,5 +163,5 @@ DELETE /projects/:id/triggers/:trigger_id
| `trigger_id` | integer | yes | The trigger id | | `trigger_id` | integer | yes | The trigger id |
``` ```
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/triggers/5" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers/5"
``` ```
...@@ -22,7 +22,7 @@ GET /projects/:id/pipelines ...@@ -22,7 +22,7 @@ GET /projects/:id/pipelines
| `sort` | string | no | Sort pipelines in `asc` or `desc` order (default: `desc`) | | `sort` | string | no | Sort pipelines in `asc` or `desc` order (default: `desc`) |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/pipelines" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines"
``` ```
Example of response Example of response
...@@ -60,7 +60,7 @@ GET /projects/:id/pipelines/:pipeline_id ...@@ -60,7 +60,7 @@ GET /projects/:id/pipelines/:pipeline_id
| `pipeline_id` | integer | yes | The ID of a pipeline | | `pipeline_id` | integer | yes | The ID of a pipeline |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/pipelines/46" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46"
``` ```
Example of response Example of response
...@@ -108,7 +108,7 @@ POST /projects/:id/pipeline ...@@ -108,7 +108,7 @@ POST /projects/:id/pipeline
| `variables` | array | no | An array containing the variables available in the pipeline, matching the structure [{ 'key' => 'UPLOAD_TO_S3', 'value' => 'true' }] | | `variables` | array | no | An array containing the variables available in the pipeline, matching the structure [{ 'key' => 'UPLOAD_TO_S3', 'value' => 'true' }] |
``` ```
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/pipeline?ref=master" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipeline?ref=master"
``` ```
Example of response Example of response
...@@ -155,7 +155,7 @@ POST /projects/:id/pipelines/:pipeline_id/retry ...@@ -155,7 +155,7 @@ POST /projects/:id/pipelines/:pipeline_id/retry
| `pipeline_id` | integer | yes | The ID of a pipeline | | `pipeline_id` | integer | yes | The ID of a pipeline |
``` ```
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/retry" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/retry"
``` ```
Response: Response:
...@@ -202,7 +202,7 @@ POST /projects/:id/pipelines/:pipeline_id/cancel ...@@ -202,7 +202,7 @@ POST /projects/:id/pipelines/:pipeline_id/cancel
| `pipeline_id` | integer | yes | The ID of a pipeline | | `pipeline_id` | integer | yes | The ID of a pipeline |
``` ```
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/cancel" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/cancel"
``` ```
Response: Response:
...@@ -249,7 +249,7 @@ DELETE /projects/:id/pipelines/:pipeline_id ...@@ -249,7 +249,7 @@ DELETE /projects/:id/pipelines/:pipeline_id
| `pipeline_id` | integer | yes | The ID of a pipeline | | `pipeline_id` | integer | yes | The ID of a pipeline |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --request "DELETE" "https://gitlab.example.com/api/v4/projects/1/pipelines/46" curl --header "PRIVATE-TOKEN: <your_access_token>" --request "DELETE" "https://gitlab.example.com/api/v4/projects/1/pipelines/46"
``` ```
[ce-5837]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5837 [ce-5837]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5837
......
...@@ -25,7 +25,7 @@ GET /projects/:id/badges ...@@ -25,7 +25,7 @@ GET /projects/:id/badges
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/badges curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/badges
``` ```
Example response: Example response:
...@@ -65,7 +65,7 @@ GET /projects/:id/badges/:badge_id ...@@ -65,7 +65,7 @@ GET /projects/:id/badges/:badge_id
| `badge_id` | integer | yes | The badge ID | | `badge_id` | integer | yes | The badge ID |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/badges/:badge_id curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/badges/:badge_id
``` ```
Example response: Example response:
...@@ -96,7 +96,7 @@ POST /projects/:id/badges ...@@ -96,7 +96,7 @@ POST /projects/:id/badges
| `image_url` | string | yes | URL of the badge image | | `image_url` | string | yes | URL of the badge image |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "link_url=https://gitlab.com/gitlab-org/gitlab-ce/commits/master&image_url=https://shields.io/my/badge1&position=0" https://gitlab.example.com/api/v4/projects/:id/badges curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "link_url=https://gitlab.com/gitlab-org/gitlab-ce/commits/master&image_url=https://shields.io/my/badge1&position=0" https://gitlab.example.com/api/v4/projects/:id/badges
``` ```
Example response: Example response:
...@@ -128,7 +128,7 @@ PUT /projects/:id/badges/:badge_id ...@@ -128,7 +128,7 @@ PUT /projects/:id/badges/:badge_id
| `image_url` | string | no | URL of the badge image | | `image_url` | string | no | URL of the badge image |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/badges/:badge_id curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/badges/:badge_id
``` ```
Example response: Example response:
...@@ -158,7 +158,7 @@ DELETE /projects/:id/badges/:badge_id ...@@ -158,7 +158,7 @@ DELETE /projects/:id/badges/:badge_id
| `badge_id` | integer | yes | The badge ID | | `badge_id` | integer | yes | The badge ID |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/badges/:badge_id curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/badges/:badge_id
``` ```
## Preview a badge from a project ## Preview a badge from a project
...@@ -176,7 +176,7 @@ GET /projects/:id/badges/render ...@@ -176,7 +176,7 @@ GET /projects/:id/badges/render
| `image_url` | string | yes | URL of the badge image | | `image_url` | string | yes | URL of the badge image |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/badges/render?link_url=http%3A%2F%2Fexample.com%2Fci_status.svg%3Fproject%3D%25%7Bproject_path%7D%26ref%3D%25%7Bdefault_branch%7D&image_url=https%3A%2F%2Fshields.io%2Fmy%2Fbadge curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/badges/render?link_url=http%3A%2F%2Fexample.com%2Fci_status.svg%3Fproject%3D%25%7Bproject_path%7D%26ref%3D%25%7Bdefault_branch%7D&image_url=https%3A%2F%2Fshields.io%2Fmy%2Fbadge
``` ```
Example response: Example response:
......
...@@ -30,7 +30,7 @@ POST /projects/:id/export ...@@ -30,7 +30,7 @@ POST /projects/:id/export
```console ```console
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/export \ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/export \
--data "upload[http_method]=PUT" \ --data "upload[http_method]=PUT" \
--data-urlencode "upload[url]=https://example-bucket.s3.eu-west-3.amazonaws.com/backup?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIMBJHN2O62W8IELQ%2F20180312%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20180312T110328Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=8413facb20ff33a49a147a0b4abcff4c8487cc33ee1f7e450c46e8f695569dbd" --data-urlencode "upload[url]=https://example-bucket.s3.eu-west-3.amazonaws.com/backup?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIMBJHN2O62W8IELQ%2F20180312%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20180312T110328Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=8413facb20ff33a49a147a0b4abcff4c8487cc33ee1f7e450c46e8f695569dbd"
``` ```
...@@ -54,7 +54,7 @@ GET /projects/:id/export ...@@ -54,7 +54,7 @@ GET /projects/:id/export
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```console ```console
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/export curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/export
``` ```
Status can be one of `none`, `started`, `after_export_action` or `finished`. The Status can be one of `none`, `started`, `after_export_action` or `finished`. The
...@@ -95,7 +95,7 @@ GET /projects/:id/export/download ...@@ -95,7 +95,7 @@ GET /projects/:id/export/download
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```console ```console
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --remote-header-name --remote-name https://gitlab.example.com/api/v4/projects/5/export/download curl --header "PRIVATE-TOKEN: <your_access_token>" --remote-header-name --remote-name https://gitlab.example.com/api/v4/projects/5/export/download
``` ```
```console ```console
...@@ -125,7 +125,7 @@ The `file=` parameter must point to a file on your file system and be preceded ...@@ -125,7 +125,7 @@ The `file=` parameter must point to a file on your file system and be preceded
by `@`. For example: by `@`. For example:
```console ```console
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "path=api-project" --form "file=@/path/to/file" https://gitlab.example.com/api/v4/projects/import curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "path=api-project" --form "file=@/path/to/file" https://gitlab.example.com/api/v4/projects/import
``` ```
cURL doesn't support posting a file from a remote server. Importing a project from a remote server can be accomplished through something like the following: cURL doesn't support posting a file from a remote server. Importing a project from a remote server can be accomplished through something like the following:
...@@ -145,7 +145,7 @@ data = { ...@@ -145,7 +145,7 @@ data = {
"namespace": "example-group" "namespace": "example-group"
} }
headers = { headers = {
'Private-Token': "9koXpg98eAheJpvBs5tK" 'Private-Token': "<your_access_token>"
} }
requests.post(url, headers=headers, data=data, files=files) requests.post(url, headers=headers, data=data, files=files)
...@@ -177,7 +177,7 @@ GET /projects/:id/import ...@@ -177,7 +177,7 @@ GET /projects/:id/import
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```console ```console
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/import curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/import
``` ```
Status can be one of `none`, `scheduled`, `failed`, `started`, or `finished`. Status can be one of `none`, `scheduled`, `failed`, `started`, or `finished`.
......
...@@ -13,7 +13,7 @@ GET /projects/:id/variables ...@@ -13,7 +13,7 @@ GET /projects/:id/variables
| `id` | integer/string | yes | The ID of a project or [urlencoded NAMESPACE/PROJECT_NAME of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID of a project or [urlencoded NAMESPACE/PROJECT_NAME of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/variables" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/variables"
``` ```
```json ```json
...@@ -43,7 +43,7 @@ GET /projects/:id/variables/:key ...@@ -43,7 +43,7 @@ GET /projects/:id/variables/:key
| `key` | string | yes | The `key` of a variable | | `key` | string | yes | The `key` of a variable |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/variables/TEST_VARIABLE_1" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/variables/TEST_VARIABLE_1"
``` ```
```json ```json
...@@ -70,7 +70,7 @@ POST /projects/:id/variables ...@@ -70,7 +70,7 @@ POST /projects/:id/variables
| `environment_scope` | string | no | The `environment_scope` of the variable | | `environment_scope` | string | no | The `environment_scope` of the variable |
``` ```
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/variables" --form "key=NEW_VARIABLE" --form "value=new value" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/variables" --form "key=NEW_VARIABLE" --form "value=new value"
``` ```
```json ```json
...@@ -99,7 +99,7 @@ PUT /projects/:id/variables/:key ...@@ -99,7 +99,7 @@ PUT /projects/:id/variables/:key
| `environment_scope` | string | no | The `environment_scope` of the variable | | `environment_scope` | string | no | The `environment_scope` of the variable |
``` ```
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/variables/NEW_VARIABLE" --form "value=updated value" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/variables/NEW_VARIABLE" --form "value=updated value"
``` ```
```json ```json
...@@ -125,5 +125,5 @@ DELETE /projects/:id/variables/:key ...@@ -125,5 +125,5 @@ DELETE /projects/:id/variables/:key
| `key` | string | yes | The `key` of a variable | | `key` | string | yes | The `key` of a variable |
``` ```
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/variables/VARIABLE_1" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/variables/VARIABLE_1"
``` ```
...@@ -137,7 +137,7 @@ GET /projects/:id/snippets/:snippet_id/user_agent_detail ...@@ -137,7 +137,7 @@ GET /projects/:id/snippets/:snippet_id/user_agent_detail
| `snippet_id` | Integer | yes | The ID of a snippet | | `snippet_id` | Integer | yes | The ID of a snippet |
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/snippets/2/user_agent_detail curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/snippets/2/user_agent_detail
``` ```
Example response: Example response:
......
...@@ -832,7 +832,7 @@ GET /projects/:id/forks ...@@ -832,7 +832,7 @@ GET /projects/:id/forks
| `min_access_level` | integer | no | Limit by current user minimal [access level](members.md) | | `min_access_level` | integer | no | Limit by current user minimal [access level](members.md) |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/forks" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/forks"
``` ```
Example responses: Example responses:
...@@ -912,7 +912,7 @@ POST /projects/:id/star ...@@ -912,7 +912,7 @@ POST /projects/:id/star
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/star" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/star"
``` ```
Example response: Example response:
...@@ -998,7 +998,7 @@ POST /projects/:id/unstar ...@@ -998,7 +998,7 @@ POST /projects/:id/unstar
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/unstar" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/unstar"
``` ```
Example response: Example response:
...@@ -1080,7 +1080,7 @@ GET /projects/:id/languages ...@@ -1080,7 +1080,7 @@ GET /projects/:id/languages
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/languages" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/languages"
``` ```
Example response: Example response:
...@@ -1108,7 +1108,7 @@ POST /projects/:id/archive ...@@ -1108,7 +1108,7 @@ POST /projects/:id/archive
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/archive" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/archive"
``` ```
Example response: Example response:
...@@ -1212,7 +1212,7 @@ POST /projects/:id/unarchive ...@@ -1212,7 +1212,7 @@ POST /projects/:id/unarchive
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/unarchive" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/unarchive"
``` ```
Example response: Example response:
...@@ -1333,7 +1333,7 @@ The `file=` parameter must point to a file on your filesystem and be preceded ...@@ -1333,7 +1333,7 @@ The `file=` parameter must point to a file on your filesystem and be preceded
by `@`. For example: by `@`. For example:
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "file=@dk.png" https://gitlab.example.com/api/v4/projects/5/uploads curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "file=@dk.png" https://gitlab.example.com/api/v4/projects/5/uploads
``` ```
Returned object: Returned object:
...@@ -1379,7 +1379,7 @@ DELETE /projects/:id/share/:group_id ...@@ -1379,7 +1379,7 @@ DELETE /projects/:id/share/:group_id
| `group_id` | integer | yes | The ID of the group | | `group_id` | integer | yes | The ID of the group |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/share/17 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/share/17
``` ```
## Hooks ## Hooks
...@@ -1547,7 +1547,7 @@ GET /projects ...@@ -1547,7 +1547,7 @@ GET /projects
| `sort` | string | no | Return requests sorted in `asc` or `desc` order | | `sort` | string | no | Return requests sorted in `asc` or `desc` order |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects?search=test curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects?search=test
``` ```
## Start the Housekeeping task for a Project ## Start the Housekeeping task for a Project
...@@ -1684,7 +1684,7 @@ POST /projects/:id/mirror/pull ...@@ -1684,7 +1684,7 @@ POST /projects/:id/mirror/pull
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/mirror/pull curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/mirror/pull
``` ```
## Project badges ## Project badges
......
...@@ -25,7 +25,7 @@ GET /projects/:id/protected_branches ...@@ -25,7 +25,7 @@ GET /projects/:id/protected_branches
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/5/protected_branches' curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_branches'
``` ```
Example response: Example response:
...@@ -69,7 +69,7 @@ GET /projects/:id/protected_branches/:name ...@@ -69,7 +69,7 @@ GET /projects/:id/protected_branches/:name
| `name` | string | yes | The name of the branch or wildcard | | `name` | string | yes | The name of the branch or wildcard |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/5/protected_branches/master' curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_branches/master'
``` ```
Example response: Example response:
...@@ -106,7 +106,7 @@ POST /projects/:id/protected_branches ...@@ -106,7 +106,7 @@ POST /projects/:id/protected_branches
``` ```
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/5/protected_branches?name=*-stable&push_access_level=30&merge_access_level=30&unprotect_access_level=40' curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_branches?name=*-stable&push_access_level=30&merge_access_level=30&unprotect_access_level=40'
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
...@@ -158,7 +158,7 @@ Elements in the `allowed_to_push` / `allowed_to_merge` / `allowed_to_unprotect` ...@@ -158,7 +158,7 @@ Elements in the `allowed_to_push` / `allowed_to_merge` / `allowed_to_unprotect`
form `{user_id: integer}`, `{group_id: integer}` or `{access_level: integer}`. Each user must have access to the project and each group must [have this project shared](../user/project/members/share_project_with_groups.md). These access levels allow [more granular control over protected branch access](../user/project/protected_branches.md#restricting-push-and-merge-access-to-certain-users) and were [added to the API in ][ee-3516] in GitLab 10.3 EE. form `{user_id: integer}`, `{group_id: integer}` or `{access_level: integer}`. Each user must have access to the project and each group must [have this project shared](../user/project/members/share_project_with_groups.md). These access levels allow [more granular control over protected branch access](../user/project/protected_branches.md#restricting-push-and-merge-access-to-certain-users) and were [added to the API in ][ee-3516] in GitLab 10.3 EE.
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/5/protected_branches?name=*-stable&allowed_to_push%5B%5D%5Buser_id%5D=1' curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_branches?name=*-stable&allowed_to_push%5B%5D%5Buser_id%5D=1'
``` ```
Example response: Example response:
...@@ -201,7 +201,7 @@ DELETE /projects/:id/protected_branches/:name ...@@ -201,7 +201,7 @@ DELETE /projects/:id/protected_branches/:name
``` ```
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/5/protected_branches/*-stable' curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_branches/*-stable'
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
......
...@@ -25,7 +25,7 @@ GET /projects/:id/protected_tags ...@@ -25,7 +25,7 @@ GET /projects/:id/protected_tags
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/5/protected_tags' curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_tags'
``` ```
Example response: Example response:
...@@ -60,7 +60,7 @@ GET /projects/:id/protected_tags/:name ...@@ -60,7 +60,7 @@ GET /projects/:id/protected_tags/:name
| `name` | string | yes | The name of the tag or wildcard | | `name` | string | yes | The name of the tag or wildcard |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/5/protected_tags/release-1-0' curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_tags/release-1-0'
``` ```
Example response: Example response:
...@@ -87,7 +87,7 @@ POST /projects/:id/protected_tags ...@@ -87,7 +87,7 @@ POST /projects/:id/protected_tags
``` ```
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/5/protected_tags?name=*-stable&create_access_level=30' curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_tags?name=*-stable&create_access_level=30'
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
...@@ -119,7 +119,7 @@ DELETE /projects/:id/protected_tags/:name ...@@ -119,7 +119,7 @@ DELETE /projects/:id/protected_tags/:name
``` ```
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v4/projects/5/protected_tags/*-stable' curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_tags/*-stable'
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
......
...@@ -224,7 +224,7 @@ GET /projects/:id/repository/merge_base ...@@ -224,7 +224,7 @@ GET /projects/:id/repository/merge_base
| `refs` | array | yes | The refs to find the common ancestor of, multiple refs can be passed | | `refs` | array | yes | The refs to find the common ancestor of, multiple refs can be passed |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/merge_base?refs[]=304d257dcb821665ab5110318fc58a007bd104ed&refs[]=0031876facac3f2b2702a0e53a26e89939a42209" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/merge_base?refs[]=304d257dcb821665ab5110318fc58a007bd104ed&refs[]=0031876facac3f2b2702a0e53a26e89939a42209"
``` ```
Example response: Example response:
......
...@@ -25,7 +25,7 @@ GET /projects/:id/repository/files/:file_path ...@@ -25,7 +25,7 @@ GET /projects/:id/repository/files/:file_path
``` ```
```bash ```bash
curl --request GET --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb?ref=master' curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb?ref=master'
``` ```
Example response: Example response:
...@@ -60,7 +60,7 @@ HEAD /projects/:id/repository/files/:file_path ...@@ -60,7 +60,7 @@ HEAD /projects/:id/repository/files/:file_path
``` ```
```bash ```bash
curl --head --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb?ref=master' curl --head --header 'PRIVATE-TOKEN: <your_access_token>' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb?ref=master'
``` ```
Example response: Example response:
...@@ -87,7 +87,7 @@ GET /projects/:id/repository/files/:file_path/raw ...@@ -87,7 +87,7 @@ GET /projects/:id/repository/files/:file_path/raw
``` ```
```bash ```bash
curl --request GET --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb/raw?ref=master' curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb/raw?ref=master'
``` ```
Parameters: Parameters:
...@@ -107,7 +107,7 @@ POST /projects/:id/repository/files/:file_path ...@@ -107,7 +107,7 @@ POST /projects/:id/repository/files/:file_path
``` ```
```bash ```bash
curl --request POST --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' --header "Content-Type: application/json" \ curl --request POST --header 'PRIVATE-TOKEN: <your_access_token>' --header "Content-Type: application/json" \
--data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \ --data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \
"content": "some content", "commit_message": "create a new file"}' \ "content": "some content", "commit_message": "create a new file"}' \
'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb'
...@@ -142,7 +142,7 @@ PUT /projects/:id/repository/files/:file_path ...@@ -142,7 +142,7 @@ PUT /projects/:id/repository/files/:file_path
``` ```
```bash ```bash
curl --request PUT --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' --header "Content-Type: application/json" \ curl --request PUT --header 'PRIVATE-TOKEN: <your_access_token>' --header "Content-Type: application/json" \
--data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \ --data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \
"content": "some content", "commit_message": "update file"}' \ "content": "some content", "commit_message": "update file"}' \
'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb'
...@@ -187,7 +187,7 @@ DELETE /projects/:id/repository/files/:file_path ...@@ -187,7 +187,7 @@ DELETE /projects/:id/repository/files/:file_path
``` ```
```bash ```bash
curl --request DELETE --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' --header "Content-Type: application/json" \ curl --request DELETE --header 'PRIVATE-TOKEN: <your_access_token>' --header "Content-Type: application/json" \
--data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \ --data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", \
"commit_message": "delete file"}' \ "commit_message": "delete file"}' \
'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb'
......
...@@ -22,7 +22,7 @@ PUT /projects/:id/repository/submodules/:submodule ...@@ -22,7 +22,7 @@ PUT /projects/:id/repository/submodules/:submodule
| `commit_message` | string | no | Commit message. If no message is provided, a default one will be set | | `commit_message` | string | no | Commit message. If no message is provided, a default one will be set |
```sh ```sh
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/repository/submodules/lib%2Fmodules%2Fexample" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/submodules/lib%2Fmodules%2Fexample"
--data "branch=master&commit_sha=3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88&commit_message=Update submodule reference" --data "branch=master&commit_sha=3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88&commit_message=Update submodule reference"
``` ```
......
...@@ -65,7 +65,7 @@ GET /projects/:id/issues/:issue_iid/resource_label_events ...@@ -65,7 +65,7 @@ GET /projects/:id/issues/:issue_iid/resource_label_events
``` ```
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events
``` ```
### Get single issue label event ### Get single issue label event
...@@ -85,7 +85,7 @@ Parameters: ...@@ -85,7 +85,7 @@ Parameters:
| `resource_label_event_id` | integer | yes | The ID of a label event | | `resource_label_event_id` | integer | yes | The ID of a label event |
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events/1 curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events/1
``` ```
## Epics ## Epics
...@@ -151,7 +151,7 @@ GET /groups/:id/epics/:epic_id/resource_label_events ...@@ -151,7 +151,7 @@ GET /groups/:id/epics/:epic_id/resource_label_events
``` ```
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics/11/resource_label_events curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/11/resource_label_events
``` ```
### Get single epic label event ### Get single epic label event
...@@ -171,7 +171,7 @@ Parameters: ...@@ -171,7 +171,7 @@ Parameters:
| `resource_label_event_id` | integer | yes | The ID of a label event | | `resource_label_event_id` | integer | yes | The ID of a label event |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/1/epics/11/resource_label_events/107 curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/11/resource_label_events/107
``` ```
## Merge requests ## Merge requests
...@@ -237,7 +237,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/resource_label_events ...@@ -237,7 +237,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/resource_label_events
``` ```
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/resource_label_events curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/resource_label_events
``` ```
### Get single merge request label event ### Get single merge request label event
...@@ -257,5 +257,5 @@ Parameters: ...@@ -257,5 +257,5 @@ Parameters:
| `resource_label_event_id` | integer | yes | The ID of a label event | | `resource_label_event_id` | integer | yes | The ID of a label event |
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/resource_label_events/120 curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/resource_label_events/120
``` ```
...@@ -22,7 +22,7 @@ GET /runners?status=active ...@@ -22,7 +22,7 @@ GET /runners?status=active
| `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | | `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/runners" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners"
``` ```
Example response: Example response:
...@@ -71,7 +71,7 @@ GET /runners/all?status=active ...@@ -71,7 +71,7 @@ GET /runners/all?status=active
| `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | | `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/runners/all" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/all"
``` ```
Example response: Example response:
...@@ -134,7 +134,7 @@ GET /runners/:id ...@@ -134,7 +134,7 @@ GET /runners/:id
| `id` | integer | yes | The ID of a runner | | `id` | integer | yes | The ID of a runner |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/runners/6" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6"
``` ```
Example response: Example response:
...@@ -193,7 +193,7 @@ PUT /runners/:id ...@@ -193,7 +193,7 @@ PUT /runners/:id
| `maximum_timeout` | integer | no | Maximum timeout set when this Runner will handle the job | | `maximum_timeout` | integer | no | Maximum timeout set when this Runner will handle the job |
``` ```
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/runners/6" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2" curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2"
``` ```
Example response: Example response:
...@@ -247,7 +247,7 @@ DELETE /runners/:id ...@@ -247,7 +247,7 @@ DELETE /runners/:id
| `id` | integer | yes | The ID of a runner | | `id` | integer | yes | The ID of a runner |
``` ```
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/runners/6" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6"
``` ```
## List runner's jobs ## List runner's jobs
...@@ -264,7 +264,7 @@ GET /runners/:id/jobs ...@@ -264,7 +264,7 @@ GET /runners/:id/jobs
| `status` | string | no | Status of the job; one of: `running`, `success`, `failed`, `canceled` | | `status` | string | no | Status of the job; one of: `running`, `success`, `failed`, `canceled` |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/runners/1/jobs?status=running" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/1/jobs?status=running"
``` ```
Example response: Example response:
...@@ -357,7 +357,7 @@ GET /projects/:id/runners?status=active ...@@ -357,7 +357,7 @@ GET /projects/:id/runners?status=active
| `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | | `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/9/runners" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/9/runners"
``` ```
Example response: Example response:
...@@ -401,7 +401,7 @@ POST /projects/:id/runners ...@@ -401,7 +401,7 @@ POST /projects/:id/runners
| `runner_id` | integer | yes | The ID of a runner | | `runner_id` | integer | yes | The ID of a runner |
``` ```
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/9/runners" --form "runner_id=9" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/9/runners" --form "runner_id=9"
``` ```
Example response: Example response:
...@@ -435,7 +435,7 @@ DELETE /projects/:id/runners/:runner_id ...@@ -435,7 +435,7 @@ DELETE /projects/:id/runners/:runner_id
| `runner_id` | integer | yes | The ID of a runner | | `runner_id` | integer | yes | The ID of a runner |
``` ```
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/9/runners/9" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/9/runners/9"
``` ```
## Register a new Runner ## Register a new Runner
......
...@@ -26,7 +26,7 @@ The response depends on the requested scope. ...@@ -26,7 +26,7 @@ The response depends on the requested scope.
### Scope: projects ### Scope: projects
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/search?scope=projects&search=flight curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=projects&search=flight
``` ```
Example response: Example response:
...@@ -57,7 +57,7 @@ Example response: ...@@ -57,7 +57,7 @@ Example response:
### Scope: issues ### Scope: issues
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/search?scope=issues&search=file curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=issues&search=file
``` ```
Example response: Example response:
...@@ -122,7 +122,7 @@ Example response: ...@@ -122,7 +122,7 @@ Example response:
### Scope: merge_requests ### Scope: merge_requests
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/search?scope=merge_requests&search=file curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=merge_requests&search=file
``` ```
Example response: Example response:
...@@ -199,7 +199,7 @@ Example response: ...@@ -199,7 +199,7 @@ Example response:
### Scope: milestones ### Scope: milestones
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/search?scope=milestones&search=release curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=milestones&search=release
``` ```
Example response: Example response:
...@@ -224,7 +224,7 @@ Example response: ...@@ -224,7 +224,7 @@ Example response:
### Scope: snippet_titles ### Scope: snippet_titles
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/search?scope=snippet_titles&search=sample curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=snippet_titles&search=sample
``` ```
Example response: Example response:
...@@ -255,7 +255,7 @@ Example response: ...@@ -255,7 +255,7 @@ Example response:
### Scope: snippet_blobs ### Scope: snippet_blobs
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/search?scope=snippet_blos&search=test curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=snippet_blos&search=test
``` ```
Example response: Example response:
...@@ -288,7 +288,7 @@ Example response: ...@@ -288,7 +288,7 @@ Example response:
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled. This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/search?scope=wiki_blobs&search=bye curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=wiki_blobs&search=bye
``` ```
Example response: Example response:
...@@ -313,7 +313,7 @@ Example response: ...@@ -313,7 +313,7 @@ Example response:
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled. This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/search?scope=commits&search=bye curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=commits&search=bye
``` ```
Example response: Example response:
...@@ -355,7 +355,7 @@ to use a filter simply include it in your query like so: `a query filename:some_ ...@@ -355,7 +355,7 @@ to use a filter simply include it in your query like so: `a query filename:some_
You may use wildcards (`*`) to use glob matching. You may use wildcards (`*`) to use glob matching.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/search?scope=blobs&search=installation curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=blobs&search=installation
``` ```
Example response: Example response:
...@@ -401,7 +401,7 @@ The response depends on the requested scope. ...@@ -401,7 +401,7 @@ The response depends on the requested scope.
### Scope: projects ### Scope: projects
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/3/search?scope=projects&search=flight curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=projects&search=flight
``` ```
Example response: Example response:
...@@ -432,7 +432,7 @@ Example response: ...@@ -432,7 +432,7 @@ Example response:
### Scope: issues ### Scope: issues
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/3/search?scope=issues&search=file curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=issues&search=file
``` ```
Example response: Example response:
...@@ -497,7 +497,7 @@ Example response: ...@@ -497,7 +497,7 @@ Example response:
### Scope: merge_requests ### Scope: merge_requests
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/3/search?scope=merge_requests&search=file curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=merge_requests&search=file
``` ```
Example response: Example response:
...@@ -574,7 +574,7 @@ Example response: ...@@ -574,7 +574,7 @@ Example response:
### Scope: milestones ### Scope: milestones
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/3/search?scope=milestones&search=release curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=milestones&search=release
``` ```
Example response: Example response:
...@@ -601,7 +601,7 @@ Example response: ...@@ -601,7 +601,7 @@ Example response:
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled. This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/6/search?scope=wiki_blobs&search=bye curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/6/search?scope=wiki_blobs&search=bye
``` ```
Example response: Example response:
...@@ -626,7 +626,7 @@ Example response: ...@@ -626,7 +626,7 @@ Example response:
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled. This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/6/search?scope=commits&search=bye curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/6/search?scope=commits&search=bye
``` ```
Example response: Example response:
...@@ -668,7 +668,7 @@ to use a filter simply include it in your query like so: `a query filename:some_ ...@@ -668,7 +668,7 @@ to use a filter simply include it in your query like so: `a query filename:some_
You may use wildcards (`*`) to use glob matching. You may use wildcards (`*`) to use glob matching.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/6/search?scope=blobs&search=installation curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/6/search?scope=blobs&search=installation
``` ```
Example response: Example response:
...@@ -712,7 +712,7 @@ The response depends on the requested scope. ...@@ -712,7 +712,7 @@ The response depends on the requested scope.
### Scope: issues ### Scope: issues
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/12/search?scope=issues&search=file curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/12/search?scope=issues&search=file
``` ```
Example response: Example response:
...@@ -777,7 +777,7 @@ Example response: ...@@ -777,7 +777,7 @@ Example response:
### Scope: merge_requests ### Scope: merge_requests
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/6/search?scope=merge_requests&search=file curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=merge_requests&search=file
``` ```
Example response: Example response:
...@@ -854,7 +854,7 @@ Example response: ...@@ -854,7 +854,7 @@ Example response:
### Scope: milestones ### Scope: milestones
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/12/search?scope=milestones&search=release curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/12/search?scope=milestones&search=release
``` ```
Example response: Example response:
...@@ -879,7 +879,7 @@ Example response: ...@@ -879,7 +879,7 @@ Example response:
### Scope: notes ### Scope: notes
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/6/search?scope=notes&search=maxime curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=notes&search=maxime
``` ```
Example response: Example response:
...@@ -928,7 +928,7 @@ results: ...@@ -928,7 +928,7 @@ results:
times in the content. times in the content.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/6/search?scope=wiki_blobs&search=bye curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=wiki_blobs&search=bye
``` ```
Example response: Example response:
...@@ -951,7 +951,7 @@ Example response: ...@@ -951,7 +951,7 @@ Example response:
### Scope: commits ### Scope: commits
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/6/search?scope=commits&search=bye curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=commits&search=bye
``` ```
Example response: Example response:
...@@ -998,7 +998,7 @@ Blobs searches are performed on both filenames and contents. Search results: ...@@ -998,7 +998,7 @@ Blobs searches are performed on both filenames and contents. Search results:
times in the content. times in the content.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/6/search?scope=blobs&search=installation curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=blobs&search=installation
``` ```
Example response: Example response:
......
...@@ -639,7 +639,7 @@ Example response: ...@@ -639,7 +639,7 @@ Example response:
"job_events": true, "job_events": true,
"pipeline_events": true, "pipeline_events": true,
"properties": { "properties": {
"token": "9koXpg98eAheJpvBs5tK" "token": "<your_access_token>"
} }
} }
``` ```
......
...@@ -19,7 +19,7 @@ GET /application/settings ...@@ -19,7 +19,7 @@ GET /application/settings
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/application/settings curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/application/settings
``` ```
Example response: Example response:
...@@ -76,7 +76,7 @@ PUT /application/settings ...@@ -76,7 +76,7 @@ PUT /application/settings
``` ```
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/application/settings?signup_enabled=false&default_project_visibility=internal curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/application/settings?signup_enabled=false&default_project_visibility=internal
``` ```
Example response: Example response:
......
...@@ -15,7 +15,7 @@ GET /sidekiq/queue_metrics ...@@ -15,7 +15,7 @@ GET /sidekiq/queue_metrics
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/sidekiq/queue_metrics curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/sidekiq/queue_metrics
``` ```
Example response: Example response:
...@@ -40,7 +40,7 @@ GET /sidekiq/process_metrics ...@@ -40,7 +40,7 @@ GET /sidekiq/process_metrics
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/sidekiq/process_metrics curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/sidekiq/process_metrics
``` ```
Example response: Example response:
...@@ -82,7 +82,7 @@ GET /sidekiq/job_stats ...@@ -82,7 +82,7 @@ GET /sidekiq/job_stats
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/sidekiq/job_stats curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/sidekiq/job_stats
``` ```
Example response: Example response:
...@@ -106,7 +106,7 @@ GET /sidekiq/compound_metrics ...@@ -106,7 +106,7 @@ GET /sidekiq/compound_metrics
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/sidekiq/compound_metrics curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/sidekiq/compound_metrics
``` ```
Example response: Example response:
......
...@@ -38,7 +38,7 @@ Parameters: ...@@ -38,7 +38,7 @@ Parameters:
| `id` | Integer | yes | The ID of a snippet | | `id` | Integer | yes | The ID of a snippet |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/snippets/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/snippets/1
``` ```
Example response: Example response:
...@@ -80,7 +80,7 @@ Parameters: ...@@ -80,7 +80,7 @@ Parameters:
| `id` | Integer | yes | The ID of a snippet | | `id` | Integer | yes | The ID of a snippet |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/snippets/1/raw curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/snippets/1/raw
``` ```
Example response: Example response:
...@@ -208,7 +208,7 @@ Parameters: ...@@ -208,7 +208,7 @@ Parameters:
``` ```
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/snippets/1" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/snippets/1"
``` ```
upon successful delete a `204 No content` HTTP code shall be expected, with no data, upon successful delete a `204 No content` HTTP code shall be expected, with no data,
...@@ -226,7 +226,7 @@ GET /snippets/public ...@@ -226,7 +226,7 @@ GET /snippets/public
| `page` | Integer | no | the page to retrieve | | `page` | Integer | no | the page to retrieve |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/snippets/public?per_page=2&page=1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/snippets/public?per_page=2&page=1
``` ```
Example response: Example response:
...@@ -288,7 +288,7 @@ GET /snippets/:id/user_agent_detail ...@@ -288,7 +288,7 @@ GET /snippets/:id/user_agent_detail
| `id` | Integer | yes | The ID of a snippet | | `id` | Integer | yes | The ID of a snippet |
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/snippets/1/user_agent_detail curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/snippets/1/user_agent_detail
``` ```
Example response: Example response:
......
...@@ -16,7 +16,7 @@ PUT /suggestions/:id/apply ...@@ -16,7 +16,7 @@ PUT /suggestions/:id/apply
| `id` | integer/string | yes | The ID of a suggestion | | `id` | integer/string | yes | The ID of a suggestion |
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/suggestions/5/apply curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/suggestions/5/apply
``` ```
Example response: Example response:
......
...@@ -20,7 +20,7 @@ GET /hooks ...@@ -20,7 +20,7 @@ GET /hooks
Example request: Example request:
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/hooks curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/hooks
``` ```
Example response: Example response:
...@@ -63,7 +63,7 @@ POST /hooks ...@@ -63,7 +63,7 @@ POST /hooks
Example request: Example request:
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/hooks?url=https://gitlab.example.com/hook" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/hooks?url=https://gitlab.example.com/hook"
``` ```
Example response: Example response:
...@@ -96,7 +96,7 @@ GET /hooks/:id ...@@ -96,7 +96,7 @@ GET /hooks/:id
Example request: Example request:
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/hooks/2 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/hooks/2
``` ```
Example response: Example response:
...@@ -129,5 +129,5 @@ DELETE /hooks/:id ...@@ -129,5 +129,5 @@ DELETE /hooks/:id
Example request: Example request:
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/hooks/2 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/hooks/2
``` ```
\ No newline at end of file
...@@ -65,7 +65,7 @@ Parameters: ...@@ -65,7 +65,7 @@ Parameters:
| `tag_name` | string | yes | The name of the tag | | `tag_name` | string | yes | The name of the tag |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/repository/tags/v1.0.0 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/repository/tags/v1.0.0
``` ```
Example Response: Example Response:
......
...@@ -116,7 +116,7 @@ If you omit the `fullname` parameter but authenticate your request, the name of ...@@ -116,7 +116,7 @@ If you omit the `fullname` parameter but authenticate your request, the name of
the authenticated user will be used to replace the copyright holder placeholder. the authenticated user will be used to replace the copyright holder placeholder.
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/templates/licenses/mit?project=My+Cool+Project curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/templates/licenses/mit?project=My+Cool+Project
``` ```
Example response: Example response:
......
...@@ -23,7 +23,7 @@ Parameters: ...@@ -23,7 +23,7 @@ Parameters:
| `type` | string | no | The type of a todo. Can be either `Issue` or `MergeRequest` | | `type` | string | no | The type of a todo. Can be either `Issue` or `MergeRequest` |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/todos curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/todos
``` ```
Example Response: Example Response:
...@@ -195,7 +195,7 @@ Parameters: ...@@ -195,7 +195,7 @@ Parameters:
| `id` | integer | yes | The ID of a todo | | `id` | integer | yes | The ID of a todo |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/todos/130/mark_as_done curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/todos/130/mark_as_done
``` ```
Example Response: Example Response:
...@@ -285,8 +285,7 @@ POST /todos/mark_as_done ...@@ -285,8 +285,7 @@ POST /todos/mark_as_done
``` ```
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/todos/mark_as_done curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/todos/mark_as_done
``` ```
[ce-3188]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3188 [ce-3188]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3188
...@@ -463,7 +463,7 @@ GET /user/status ...@@ -463,7 +463,7 @@ GET /user/status
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/user/status" curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/user/status"
``` ```
Example response: Example response:
...@@ -518,7 +518,7 @@ PUT /user/status ...@@ -518,7 +518,7 @@ PUT /user/status
When both parameters `emoji` and `message` are empty, the status will be cleared. When both parameters `emoji` and `message` are empty, the status will be cleared.
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "emoji=coffee" --data "message=I crave coffee" https://gitlab.example.com/api/v4/user/status curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --data "emoji=coffee" --data "message=I crave coffee" https://gitlab.example.com/api/v4/user/status
``` ```
Example responses Example responses
...@@ -684,7 +684,7 @@ GET /user/gpg_keys ...@@ -684,7 +684,7 @@ GET /user/gpg_keys
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/user/gpg_keys curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/user/gpg_keys
``` ```
Example response: Example response:
...@@ -714,7 +714,7 @@ Parameters: ...@@ -714,7 +714,7 @@ Parameters:
| `key_id` | integer | yes | The ID of the GPG key | | `key_id` | integer | yes | The ID of the GPG key |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/user/gpg_keys/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/user/gpg_keys/1
``` ```
Example response: Example response:
...@@ -742,7 +742,7 @@ Parameters: ...@@ -742,7 +742,7 @@ Parameters:
| key | string | yes | The new GPG key | | key | string | yes | The new GPG key |
```bash ```bash
curl --data "key=-----BEGIN PGP PUBLIC KEY BLOCK-----\r\n\r\nxsBNBFV..." --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/user/gpg_keys curl --data "key=-----BEGIN PGP PUBLIC KEY BLOCK-----\r\n\r\nxsBNBFV..." --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/user/gpg_keys
``` ```
Example response: Example response:
...@@ -772,7 +772,7 @@ Parameters: ...@@ -772,7 +772,7 @@ Parameters:
| `key_id` | integer | yes | The ID of the GPG key | | `key_id` | integer | yes | The ID of the GPG key |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/user/gpg_keys/1 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/user/gpg_keys/1
``` ```
Returns `204 No Content` on success, or `404 Not found` if the key cannot be found. Returns `204 No Content` on success, or `404 Not found` if the key cannot be found.
...@@ -792,7 +792,7 @@ Parameters: ...@@ -792,7 +792,7 @@ Parameters:
| `id` | integer | yes | The ID of the user | | `id` | integer | yes | The ID of the user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/2/gpg_keys curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/2/gpg_keys
``` ```
Example response: Example response:
...@@ -823,7 +823,7 @@ Parameters: ...@@ -823,7 +823,7 @@ Parameters:
| `key_id` | integer | yes | The ID of the GPG key | | `key_id` | integer | yes | The ID of the GPG key |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/2/gpg_keys/1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/2/gpg_keys/1
``` ```
Example response: Example response:
...@@ -852,7 +852,7 @@ Parameters: ...@@ -852,7 +852,7 @@ Parameters:
| `key_id` | integer | yes | The ID of the GPG key | | `key_id` | integer | yes | The ID of the GPG key |
```bash ```bash
curl --data "key=-----BEGIN PGP PUBLIC KEY BLOCK-----\r\n\r\nxsBNBFV..." --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/2/gpg_keys curl --data "key=-----BEGIN PGP PUBLIC KEY BLOCK-----\r\n\r\nxsBNBFV..." --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/2/gpg_keys
``` ```
Example response: Example response:
...@@ -883,7 +883,7 @@ Parameters: ...@@ -883,7 +883,7 @@ Parameters:
| `key_id` | integer | yes | The ID of the GPG key | | `key_id` | integer | yes | The ID of the GPG key |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/2/gpg_keys/1 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/2/gpg_keys/1
``` ```
## List emails ## List emails
...@@ -1068,7 +1068,7 @@ Parameters: ...@@ -1068,7 +1068,7 @@ Parameters:
| `state` | string | no | filter tokens based on state (`all`, `active`, `inactive`) | | `state` | string | no | filter tokens based on state (`all`, `active`, `inactive`) |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/42/impersonation_tokens curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/42/impersonation_tokens
``` ```
Example response: Example response:
...@@ -1120,7 +1120,7 @@ Parameters: ...@@ -1120,7 +1120,7 @@ Parameters:
| `impersonation_token_id` | integer | yes | The ID of the impersonation token | | `impersonation_token_id` | integer | yes | The ID of the impersonation token |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/42/impersonation_tokens/2 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/42/impersonation_tokens/2
``` ```
Example response: Example response:
...@@ -1163,7 +1163,7 @@ POST /users/:user_id/impersonation_tokens ...@@ -1163,7 +1163,7 @@ POST /users/:user_id/impersonation_tokens
| `scopes` | array | yes | The array of scopes of the impersonation token (`api`, `read_user`) | | `scopes` | array | yes | The array of scopes of the impersonation token (`api`, `read_user`) |
``` ```
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "name=mytoken" --data "expires_at=2017-04-04" --data "scopes[]=api" https://gitlab.example.com/api/v4/users/42/impersonation_tokens curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "name=mytoken" --data "expires_at=2017-04-04" --data "scopes[]=api" https://gitlab.example.com/api/v4/users/42/impersonation_tokens
``` ```
Example response: Example response:
...@@ -1195,7 +1195,7 @@ DELETE /users/:user_id/impersonation_tokens/:impersonation_token_id ...@@ -1195,7 +1195,7 @@ DELETE /users/:user_id/impersonation_tokens/:impersonation_token_id
``` ```
``` ```
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/users/42/impersonation_tokens/1 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/42/impersonation_tokens/1
``` ```
Parameters: Parameters:
...@@ -1230,7 +1230,7 @@ Parameters: ...@@ -1230,7 +1230,7 @@ Parameters:
| `from` | string | no | Date string in the format YEAR-MONTH-DAY, e.g. `2016-03-11`. Defaults to 6 months ago. | | `from` | string | no | Date string in the format YEAR-MONTH-DAY, e.g. `2016-03-11`. Defaults to 6 months ago. |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/user/activities curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/user/activities
``` ```
Example response: Example response:
......
...@@ -10,7 +10,7 @@ GET /version ...@@ -10,7 +10,7 @@ GET /version
``` ```
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/version curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/version
``` ```
Example response: Example response:
......
...@@ -18,7 +18,7 @@ GET /projects/:id/wikis ...@@ -18,7 +18,7 @@ GET /projects/:id/wikis
| `with_content` | boolean | no | Include pages' content | | `with_content` | boolean | no | Include pages' content |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/wikis?with_content=1 curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/wikis?with_content=1
``` ```
Example response: Example response:
...@@ -59,7 +59,7 @@ GET /projects/:id/wikis/:slug ...@@ -59,7 +59,7 @@ GET /projects/:id/wikis/:slug
| `slug` | string | yes | The slug (a unique string) of the wiki page | | `slug` | string | yes | The slug (a unique string) of the wiki page |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/wikis/home curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/wikis/home
``` ```
Example response: Example response:
...@@ -89,7 +89,7 @@ POST /projects/:id/wikis ...@@ -89,7 +89,7 @@ POST /projects/:id/wikis
| `format` | string | no | The format of the wiki page. Available formats are: `markdown` (default), `rdoc`, and `asciidoc` | | `format` | string | no | The format of the wiki page. Available formats are: `markdown` (default), `rdoc`, and `asciidoc` |
```bash ```bash
curl --data "format=rdoc&title=Hello&content=Hello world" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/wikis" curl --data "format=rdoc&title=Hello&content=Hello world" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis"
``` ```
Example response: Example response:
...@@ -121,7 +121,7 @@ PUT /projects/:id/wikis/:slug ...@@ -121,7 +121,7 @@ PUT /projects/:id/wikis/:slug
```bash ```bash
curl --request PUT --data "format=rdoc&content=documentation&title=Docs" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/wikis/foo" curl --request PUT --data "format=rdoc&content=documentation&title=Docs" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis/foo"
``` ```
Example response: Example response:
...@@ -149,7 +149,7 @@ DELETE /projects/:id/wikis/:slug ...@@ -149,7 +149,7 @@ DELETE /projects/:id/wikis/:slug
| `slug` | string | yes | The slug (a unique string) of the wiki page | | `slug` | string | yes | The slug (a unique string) of the wiki page |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/wikis/foo" curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/wikis/foo"
``` ```
On success the HTTP status code is `204` and no JSON response is expected. On success the HTTP status code is `204` and no JSON response is expected.
...@@ -177,7 +177,7 @@ The `file=` parameter must point to a file on your filesystem and be preceded ...@@ -177,7 +177,7 @@ The `file=` parameter must point to a file on your filesystem and be preceded
by `@`. For example: by `@`. For example:
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "file=@dk.png" https://gitlab.example.com/api/v4/projects/1/wikis/attachments curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "file=@dk.png" https://gitlab.example.com/api/v4/projects/1/wikis/attachments
``` ```
Example response: Example response:
......
...@@ -555,7 +555,7 @@ You can use the following fake tokens as examples. ...@@ -555,7 +555,7 @@ You can use the following fake tokens as examples.
| **Token type** | **Token value** | | **Token type** | **Token value** |
|:----------------------|:-------------------------------------------------------------------| |:----------------------|:-------------------------------------------------------------------|
| Private user token | `9koXpg98eAheJpvBs5tK` | | Private user token | `<your_access_token>` |
| Personal access token | `n671WNGecHugsdEDPsyo` | | Personal access token | `n671WNGecHugsdEDPsyo` |
| Application ID | `2fcb195768c39e9a94cec2c2e32c59c0aad7a3365c10892e8116b5d83d4096b6` | | Application ID | `2fcb195768c39e9a94cec2c2e32c59c0aad7a3365c10892e8116b5d83d4096b6` |
| Application secret | `04f294d1eaca42b8692017b426d53bbc8fe75f827734f0260710b83a556082df` | | Application secret | `04f294d1eaca42b8692017b426d53bbc8fe75f827734f0260710b83a556082df` |
...@@ -602,7 +602,7 @@ Rendered example: ...@@ -602,7 +602,7 @@ Rendered example:
#### cURL commands #### cURL commands
- Use `https://gitlab.example.com/api/v4/` as an endpoint. - Use `https://gitlab.example.com/api/v4/` as an endpoint.
- Wherever needed use this personal access token: `9koXpg98eAheJpvBs5tK`. - Wherever needed use this personal access token: `<your_access_token>`.
- Always put the request first. `GET` is the default so you don't have to - Always put the request first. `GET` is the default so you don't have to
include it. include it.
- Use double quotes to the URL when it includes additional parameters. - Use double quotes to the URL when it includes additional parameters.
...@@ -611,7 +611,7 @@ Rendered example: ...@@ -611,7 +611,7 @@ Rendered example:
| Methods | Description | | Methods | Description |
|:-------------------------------------------|:------------------------------------------------------| |:-------------------------------------------|:------------------------------------------------------|
| `-H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK"` | Use this method as is, whenever authentication needed | | `-H "PRIVATE-TOKEN: <your_access_token>"` | Use this method as is, whenever authentication needed |
| `-X POST` | Use this method when creating new objects | | `-X POST` | Use this method when creating new objects |
| `-X PUT` | Use this method when updating existing objects | | `-X PUT` | Use this method when updating existing objects |
| `-X DELETE` | Use this method when removing existing objects | | `-X DELETE` | Use this method when removing existing objects |
...@@ -625,7 +625,7 @@ Below is a set of [cURL][] examples that you can use in the API documentation. ...@@ -625,7 +625,7 @@ Below is a set of [cURL][] examples that you can use in the API documentation.
Get the details of a group: Get the details of a group:
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/gitlab-org curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/gitlab-org
``` ```
##### cURL example with parameters passed in the URL ##### cURL example with parameters passed in the URL
...@@ -633,7 +633,7 @@ curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/a ...@@ -633,7 +633,7 @@ curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/a
Create a new project under the authenticated user's namespace: Create a new project under the authenticated user's namespace:
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects?name=foo" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects?name=foo"
``` ```
##### Post data using cURL's --data ##### Post data using cURL's --data
...@@ -643,7 +643,7 @@ cURL's `--data` option. The example below will create a new project `foo` under ...@@ -643,7 +643,7 @@ cURL's `--data` option. The example below will create a new project `foo` under
the authenticated user's namespace. the authenticated user's namespace.
```bash ```bash
curl --data "name=foo" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects" curl --data "name=foo" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects"
``` ```
##### Post data using JSON content ##### Post data using JSON content
...@@ -652,7 +652,7 @@ curl --data "name=foo" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://g ...@@ -652,7 +652,7 @@ curl --data "name=foo" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://g
and double quotes. and double quotes.
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --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
``` ```
##### Post data using form-data ##### Post data using form-data
...@@ -661,7 +661,7 @@ Instead of using JSON or urlencode you can use multipart/form-data which ...@@ -661,7 +661,7 @@ Instead of using JSON or urlencode you can use multipart/form-data which
properly handles data encoding: properly handles data encoding:
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --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 The above example is run by and administrator and will add an SSH public key
...@@ -675,7 +675,7 @@ contains spaces in its title. Observe how spaces are escaped using the `%20` ...@@ -675,7 +675,7 @@ contains spaces in its title. Observe how spaces are escaped using the `%20`
ASCII code. ASCII code.
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/42/issues?title=Hello%20Dude" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/42/issues?title=Hello%20Dude"
``` ```
Use `%2F` for slashes (`/`). Use `%2F` for slashes (`/`).
...@@ -687,7 +687,7 @@ restrict the sign-up e-mail domains of a GitLab instance to `*.example.com` and ...@@ -687,7 +687,7 @@ restrict the sign-up e-mail domains of a GitLab instance to `*.example.com` and
`example.net`, you would do something like this: `example.net`, you would do something like this:
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "domain_whitelist[]=*.example.com" --data "domain_whitelist[]=example.net" https://gitlab.example.com/api/v4/application/settings curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --data "domain_whitelist[]=*.example.com" --data "domain_whitelist[]=example.net" https://gitlab.example.com/api/v4/application/settings
``` ```
[cURL]: http://curl.haxx.se/ "cURL website" [cURL]: http://curl.haxx.se/ "cURL website"
......
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