@@ -101,7 +101,7 @@ PUT /projects/:id/repository/branches/:branch/protect
...
@@ -101,7 +101,7 @@ PUT /projects/:id/repository/branches/:branch/protect
```
```
```bash
```bash
curl --request PUT --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master/protect?developers_can_push=true&developers_can_merge=true
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
```
```
| Attribute | Type | Required | Description |
| Attribute | Type | Required | Description |
...
@@ -149,7 +149,7 @@ PUT /projects/:id/repository/branches/:branch/unprotect
...
@@ -149,7 +149,7 @@ PUT /projects/:id/repository/branches/:branch/unprotect
```
```
```bash
```bash
curl --request PUT --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master/unprotect
curl --request PUT --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/repository/branches/master/unprotect
```
```
| Attribute | Type | Required | Description |
| Attribute | Type | Required | Description |
...
@@ -197,7 +197,7 @@ POST /projects/:id/repository/branches
...
@@ -197,7 +197,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/v3/projects/5/repository/branches?branch=newbranch&ref=master"
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK""https://gitlab.example.com/api/v4/projects/5/repository/branches?branch=newbranch&ref=master"
| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`; showing all builds if none provided |
| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`; showing all builds if none provided |
@@ -135,7 +135,7 @@ GET /projects/:id/repository/commits/:sha/builds
...
@@ -135,7 +135,7 @@ GET /projects/:id/repository/commits/:sha/builds
| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`; showing all builds if none provided |
| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`; showing all builds if none provided |
| `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/v3/projects/5/repository/commits/master/cherry_pick"
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK"--form"branch=master""https://gitlab.example.com/api/v4/projects/5/repository/commits/master/cherry_pick"
```
```
Example response:
Example response:
...
@@ -249,7 +249,7 @@ Parameters:
...
@@ -249,7 +249,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 |
@@ -459,7 +459,7 @@ POST /projects/:id/statuses/:sha
...
@@ -459,7 +459,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/v3/projects/17/statuses/18f3e63d05582537db6d183d9d557be09e1f90c8?state=success"
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK""https://gitlab.example.com/api/v4/projects/17/statuses/18f3e63d05582537db6d183d9d557be09e1f90c8?state=success"
@@ -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/v3/projects/1/environments/1"
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"
| `merge_request_for_resolving_discussions` | integer | no | The IID of a merge request in which to resolve all issues. This will fill the issue with a default description and mark all discussions as resolved. When passing a description or title, these values will take precedence over the default values. |
| `merge_request_for_resolving_discussions` | integer | no | The IID of a merge request in which to resolve all issues. This will fill the issue with a default description and mark all discussions as resolved. When passing a description or title, these values will take precedence over the default values. |
```bash
```bash
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues?title=Issues%20with%20auth&labels=bug
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/4/issues?title=Issues%20with%20auth&labels=bug
```
```
Example response:
Example response:
...
@@ -395,7 +395,7 @@ PUT /projects/:id/issues/:issue_id
...
@@ -395,7 +395,7 @@ PUT /projects/:id/issues/:issue_id
| `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` |
| `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` |
```bash
```bash
curl --request PUT --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/85?state_event=close
curl --request PUT --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/4/issues/85?state_event=close
@@ -15,7 +15,7 @@ GET /projects/:id/repository/files
...
@@ -15,7 +15,7 @@ GET /projects/:id/repository/files
```
```
```bash
```bash
curl --request GET --header'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/models/key.rb&ref=master'
curl --request GET --header'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v4/projects/13083/repository/files?file_path=app/models/key.rb&ref=master'
```
```
Example response:
Example response:
...
@@ -46,7 +46,7 @@ POST /projects/:id/repository/files
...
@@ -46,7 +46,7 @@ POST /projects/:id/repository/files
```
```
```bash
```bash
curl --request POST --header'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch=master&author_email=author%40example.com&author_name=Firstname%20Lastname&content=some%20content&commit_message=create%20a%20new%20file'
curl --request POST --header'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v4/projects/13083/repository/files?file_path=app/project.rb&branch=master&author_email=author%40example.com&author_name=Firstname%20Lastname&content=some%20content&commit_message=create%20a%20new%20file'
```
```
Example response:
Example response:
...
@@ -75,7 +75,7 @@ PUT /projects/:id/repository/files
...
@@ -75,7 +75,7 @@ PUT /projects/:id/repository/files
```
```
```bash
```bash
curl --request PUT --header'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch=master&author_email=author%40example.com&author_name=Firstname%20Lastname&content=some%20other%20content&commit_message=update%20file'
curl --request PUT --header'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v4/projects/13083/repository/files?file_path=app/project.rb&branch=master&author_email=author%40example.com&author_name=Firstname%20Lastname&content=some%20other%20content&commit_message=update%20file'
| `scope` | string | no | The scope of runners to show, one of: `specific`, `shared`, `active`, `paused`, `online`; showing all runners if none provided |
| `scope` | string | no | The scope of runners to show, one of: `specific`, `shared`, `active`, `paused`, `online`; showing all runners if none provided |