@@ -101,7 +101,7 @@ PUT /projects/:id/repository/branches/:branch/protect
```
```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 |
...
...
@@ -149,7 +149,7 @@ PUT /projects/:id/repository/branches/:branch/unprotect
```
```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 |
...
...
@@ -197,7 +197,7 @@ POST /projects/:id/repository/branches
| `ref` | string | yes | The branch name or commit SHA to create branch from |
```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 |
@@ -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 |
| `branch` | string | yes | The name of the branch |
```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:
...
...
@@ -249,7 +249,7 @@ Parameters:
| `sha` | string | yes | The commit hash or name of a repository branch or tag |
@@ -459,7 +459,7 @@ POST /projects/:id/statuses/:sha
| `coverage` | float | no | The total code coverage
```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
| `external_url` | string | no | The new external_url |
```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"
curl --request PUT --data"name=documentation&new_name=docs&color=#8E44AD&description=Documentation"--header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK""https://gitlab.example.com/api/v3/projects/1/labels"
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"
```
Example response:
...
...
@@ -202,7 +202,7 @@ POST /projects/:id/labels/:label_id/subscribe
| `label_id` | integer or string | yes | The ID or title of a project's label |
```bash
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/labels/1/subscribe
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/labels/1/subscribe
```
Example response:
...
...
@@ -237,7 +237,7 @@ POST /projects/:id/labels/:label_id/unsubscribe
| `label_id` | integer or string | yes | The ID or title of a project's label |
```bash
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/labels/1/unsubscribe
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/labels/1/unsubscribe
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK""https://gitlab.example.com/api/v3/license?license=eyJkYXRhIjoiMHM5Q...S01Udz09XG4ifQ=="
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK""https://gitlab.example.com/api/v4/license?license=eyJkYXRhIjoiMHM5Q...S01Udz09XG4ifQ=="
@@ -15,7 +15,7 @@ GET /projects/:id/repository/files
```
```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:
...
...
@@ -46,7 +46,7 @@ POST /projects/:id/repository/files
```
```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:
...
...
@@ -75,7 +75,7 @@ PUT /projects/:id/repository/files
```
```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 |