@@ -95,7 +95,7 @@ PUT /projects/:id/repository/branches/:branch/protect
...
@@ -95,7 +95,7 @@ PUT /projects/:id/repository/branches/:branch/protect
```
```
```bash
```bash
curl -X PUT -H"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/v3/projects/5/repository/branches/master/protect?developers_can_push=true&developers_can_merge=true
```
```
| Attribute | Type | Required | Description |
| Attribute | Type | Required | Description |
...
@@ -140,7 +140,7 @@ PUT /projects/:id/repository/branches/:branch/unprotect
...
@@ -140,7 +140,7 @@ PUT /projects/:id/repository/branches/:branch/unprotect
```
```
```bash
```bash
curl -X PUT -H"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/v3/projects/5/repository/branches/master/unprotect
```
```
| Attribute | Type | Required | Description |
| Attribute | Type | Required | Description |
...
@@ -185,7 +185,7 @@ POST /projects/:id/repository/branches
...
@@ -185,7 +185,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 -X POST -H"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK""https://gitlab.example.com/api/v3/projects/5/repository/branches?branch_name=newbranch&ref=master"
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK""https://gitlab.example.com/api/v3/projects/5/repository/branches?branch_name=newbranch&ref=master"
```
```
Example response:
Example response:
...
@@ -230,7 +230,7 @@ It returns `200` if it succeeds, `404` if the branch to be deleted does not exis
...
@@ -230,7 +230,7 @@ It returns `200` if it succeeds, `404` if the branch to be deleted does not exis
or `400` for other reasons. In case of an error, an explaining message is provided.
or `400` for other reasons. In case of an error, an explaining message is provided.
| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `pending`, `running`, `failed`, `success`, `canceled`; showing all builds if none provided |
| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `pending`, `running`, `failed`, `success`, `canceled`; showing all builds if none provided |
@@ -123,7 +123,7 @@ GET /projects/:id/repository/commits/:sha/builds
...
@@ -123,7 +123,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: `pending`, `running`, `failed`, `success`, `canceled`; showing all builds if none provided |
| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `pending`, `running`, `failed`, `success`, `canceled`; showing all builds if none provided |
@@ -315,7 +315,7 @@ POST /projects/:id/statuses/:sha
...
@@ -315,7 +315,7 @@ POST /projects/:id/statuses/:sha
| `description` | string | no | The short description of the status
| `description` | string | no | The short description of the status
```bash
```bash
curl -X POST -H"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/v3/projects/17/statuses/18f3e63d05582537db6d183d9d557be09e1f90c8?state=success"
@@ -76,7 +76,7 @@ PUT /projects/:id/environments/:environments_id
...
@@ -76,7 +76,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 -X PUT --data"name=staging&external_url=https://staging.example.gitlab.com"-H"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK""https://gitlab.example.com/api/v3/projects/1/environment/1"
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/environment/1"
| `description` | string | no | The new description of the label |
| `description` | string | no | The new description of the label |
```bash
```bash
curl -X PUT --data"name=documentation&new_name=docs&color=#8E44AD&description=Documentation"-H"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/v3/projects/1/labels"
```
```
Example response:
Example response:
...
@@ -184,7 +184,7 @@ POST /projects/:id/labels/:label_id/subscription
...
@@ -184,7 +184,7 @@ POST /projects/:id/labels/:label_id/subscription
| `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 -X POST -H"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/labels/1/subscription
curl --request POST --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/labels/1/subscription
@@ -13,7 +13,7 @@ GET /projects/:id/repository/files
...
@@ -13,7 +13,7 @@ GET /projects/:id/repository/files
```
```
```bash
```bash
curl -X GET -H'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/v3/projects/13083/repository/files?file_path=app/models/key.rb&ref=master'
```
```
Example response:
Example response:
...
@@ -44,7 +44,7 @@ POST /projects/:id/repository/files
...
@@ -44,7 +44,7 @@ POST /projects/:id/repository/files
```
```
```bash
```bash
curl -X POST -H'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch_name=master&content=some%20content&commit_message=create%20a%20new%20file'
curl --request POST --header'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch_name=master&content=some%20content&commit_message=create%20a%20new%20file'
```
```
Example response:
Example response:
...
@@ -71,7 +71,7 @@ PUT /projects/:id/repository/files
...
@@ -71,7 +71,7 @@ PUT /projects/:id/repository/files
```
```
```bash
```bash
curl -X PUT -H'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch_name=master&content=some%20other%20content&commit_message=update%20file'
curl --request PUT --header'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch_name=master&content=some%20other%20content&commit_message=update%20file'
curl -X PUT -H'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch_name=master&commit_message=delete%20file'
curl --request PUT --header'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK''https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch_name=master&commit_message=delete%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 |
| `enabled_git_access_protocol` | string | no | Enabled protocols for Git access. Allowed values are: `ssh`, `http`, and `nil` to allow both protocols.
| `enabled_git_access_protocol` | string | no | Enabled protocols for Git access. Allowed values are: `ssh`, `http`, and `nil` to allow both protocols.
```bash
```bash
curl -X PUT -H"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings?signup_enabled=false&default_project_visibility=1
curl --request PUT --header"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings?signup_enabled=false&default_project_visibility=1