Commit 68097a3a authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'api-examples-curl-long-options' into 'master'

Use long options for curl examples in documentation

## What does this MR do?

Use long options (e.g. `--header` instead of `-H`) for curl examples in documentation.

## Why was this MR needed?

Short options are less readable.

## What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5465#note_13603730


See merge request !5703
parents 2aad2f05 31464745
...@@ -232,6 +232,13 @@ teaspoon: ...@@ -232,6 +232,13 @@ teaspoon:
paths: paths:
- coverage-javascript/default/ - coverage-javascript/default/
lint-doc:
stage: test
image: "phusion/baseimage:latest"
before_script: []
script:
- scripts/lint-doc.sh
bundler:audit: bundler:audit:
stage: test stage: test
<<: *ruby-static-analysis <<: *ruby-static-analysis
......
...@@ -7,6 +7,7 @@ v 8.11.0 (unreleased) ...@@ -7,6 +7,7 @@ v 8.11.0 (unreleased)
- Improve diff performance by eliminating redundant checks for text blobs - Improve diff performance by eliminating redundant checks for text blobs
- Convert switch icon into icon font (ClemMakesApps) - Convert switch icon into icon font (ClemMakesApps)
- API: Endpoints for enabling and disabling deploy keys - API: Endpoints for enabling and disabling deploy keys
- Use long options for curl examples in documentation !5703 (winniehell)
- Remove magic comments (`# encoding: UTF-8`) from Ruby files. !5456 (winniehell) - Remove magic comments (`# encoding: UTF-8`) from Ruby files. !5456 (winniehell)
- Add support for relative links starting with ./ or / to RelativeLinkFilter (winniehell) - Add support for relative links starting with ./ or / to RelativeLinkFilter (winniehell)
- Ignore URLs starting with // in Markdown links !5677 (winniehell) - Ignore URLs starting with // in Markdown links !5677 (winniehell)
......
...@@ -74,7 +74,7 @@ You can use an OAuth 2 token to authenticate with the API by passing it either i ...@@ -74,7 +74,7 @@ You can use an OAuth 2 token to authenticate with the API by passing it either i
Example of using the OAuth2 token in the header: Example of using the OAuth2 token in the header:
```shell ```shell
curl -H "Authorization: Bearer OAUTH-TOKEN" https://gitlab.example.com/api/v3/projects curl --header "Authorization: Bearer OAUTH-TOKEN" https://gitlab.example.com/api/v3/projects
``` ```
Read more about [GitLab as an OAuth2 client](oauth2.md). Read more about [GitLab as an OAuth2 client](oauth2.md).
...@@ -204,7 +204,7 @@ resources you can pass the following parameters: ...@@ -204,7 +204,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 -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/namespaces?per_page=50 curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/namespaces?per_page=50
``` ```
### Pagination Link header ### Pagination Link header
...@@ -218,7 +218,7 @@ and we request the second page (`page=2`) of [comments](notes.md) of the issue ...@@ -218,7 +218,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 -I -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/8/issues/8/notes?per_page=3&page=2 curl --head --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/8/issues/8/notes?per_page=3&page=2
``` ```
The response will then be: The response will then be:
......
...@@ -25,7 +25,7 @@ Parameters: ...@@ -25,7 +25,7 @@ Parameters:
| `awardable_id` | integer | yes | The ID of an awardable | | `awardable_id` | integer | yes | The ID of an awardable |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji
``` ```
Example Response: Example Response:
...@@ -85,7 +85,7 @@ Parameters: ...@@ -85,7 +85,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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji/1 curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji/1
``` ```
Example Response: Example Response:
...@@ -127,7 +127,7 @@ Parameters: ...@@ -127,7 +127,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 -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji?name=blowfish curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji?name=blowfish
``` ```
Example Response: Example Response:
...@@ -170,7 +170,7 @@ Parameters: ...@@ -170,7 +170,7 @@ Parameters:
| `award_id` | integer | yes | The ID of a award_emoji | | `award_id` | integer | yes | The ID of a award_emoji |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji/344 curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji/344
``` ```
Example Response: Example Response:
...@@ -217,7 +217,7 @@ Parameters: ...@@ -217,7 +217,7 @@ Parameters:
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/notes/1/award_emoji curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/notes/1/award_emoji
``` ```
Example Response: Example Response:
...@@ -259,7 +259,7 @@ Parameters: ...@@ -259,7 +259,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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/notes/1/award_emoji/2 curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/notes/1/award_emoji/2
``` ```
Example Response: Example Response:
...@@ -299,7 +299,7 @@ Parameters: ...@@ -299,7 +299,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 -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/notes/1/award_emoji?name=rocket curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/notes/1/award_emoji?name=rocket
``` ```
Example Response: Example Response:
...@@ -342,7 +342,7 @@ Parameters: ...@@ -342,7 +342,7 @@ Parameters:
| `award_id` | integer | yes | The ID of a award_emoji | | `award_id` | integer | yes | The ID of a award_emoji |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji/345 curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" http://gitlab.example.com/api/v3/projects/1/issues/80/award_emoji/345
``` ```
Example Response: Example Response:
......
...@@ -13,7 +13,7 @@ GET /projects/:id/repository/branches ...@@ -13,7 +13,7 @@ GET /projects/:id/repository/branches
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches
``` ```
Example response: Example response:
...@@ -57,7 +57,7 @@ GET /projects/:id/repository/branches/:branch ...@@ -57,7 +57,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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master
``` ```
Example response: Example response:
...@@ -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.
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/branches/newbranch" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/branches/newbranch"
``` ```
Example response: Example response:
......
...@@ -15,7 +15,7 @@ GET /projects/:id/triggers ...@@ -15,7 +15,7 @@ GET /projects/:id/triggers
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project |
``` ```
curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers" curl --header "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers"
``` ```
```json ```json
...@@ -51,7 +51,7 @@ GET /projects/:id/triggers/:token ...@@ -51,7 +51,7 @@ GET /projects/:id/triggers/:token
| `token` | string | yes | The `token` of a trigger | | `token` | string | yes | The `token` of a trigger |
``` ```
curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d" curl --header "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d"
``` ```
```json ```json
...@@ -77,7 +77,7 @@ POST /projects/:id/triggers ...@@ -77,7 +77,7 @@ POST /projects/:id/triggers
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project |
``` ```
curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers" curl --request POST --header "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers"
``` ```
```json ```json
...@@ -104,7 +104,7 @@ DELETE /projects/:id/triggers/:token ...@@ -104,7 +104,7 @@ DELETE /projects/:id/triggers/:token
| `token` | string | yes | The `token` of a trigger | | `token` | string | yes | The `token` of a trigger |
``` ```
curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d" curl --request DELETE --header "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d"
``` ```
```json ```json
......
...@@ -13,7 +13,7 @@ GET /projects/:id/variables ...@@ -13,7 +13,7 @@ GET /projects/:id/variables
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project |
``` ```
curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables" curl --header "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/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 -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/TEST_VARIABLE_1" curl --header "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/TEST_VARIABLE_1"
``` ```
```json ```json
...@@ -68,7 +68,7 @@ POST /projects/:id/variables ...@@ -68,7 +68,7 @@ POST /projects/:id/variables
| `value` | string | yes | The `value` of a variable | | `value` | string | yes | The `value` of a variable |
``` ```
curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables" -F "key=NEW_VARIABLE" -F "value=new value" curl --request POST --header "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables" --form "key=NEW_VARIABLE" --form "value=new value"
``` ```
```json ```json
...@@ -93,7 +93,7 @@ PUT /projects/:id/variables/:key ...@@ -93,7 +93,7 @@ PUT /projects/:id/variables/:key
| `value` | string | yes | The `value` of a variable | | `value` | string | yes | The `value` of a variable |
``` ```
curl -X PUT -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/NEW_VARIABLE" -F "value=updated value" curl --request PUT --header "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/NEW_VARIABLE" --form "value=updated value"
``` ```
```json ```json
...@@ -117,7 +117,7 @@ DELETE /projects/:id/variables/:key ...@@ -117,7 +117,7 @@ DELETE /projects/:id/variables/:key
| `key` | string | yes | The `key` of a variable | | `key` | string | yes | The `key` of a variable |
``` ```
curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/VARIABLE_1" curl --request DELETE --header "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/VARIABLE_1"
``` ```
```json ```json
......
...@@ -14,7 +14,7 @@ GET /projects/:id/builds ...@@ -14,7 +14,7 @@ GET /projects/:id/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 |
``` ```
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds"
``` ```
Example of response Example of response
...@@ -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 |
``` ```
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/repository/commits/0ff3ae198f8601a285adcf5c0fff204ee6fba5fd/builds" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/repository/commits/0ff3ae198f8601a285adcf5c0fff204ee6fba5fd/builds"
``` ```
Example of response Example of response
...@@ -209,7 +209,7 @@ GET /projects/:id/builds/:build_id ...@@ -209,7 +209,7 @@ GET /projects/:id/builds/:build_id
| `build_id` | integer | yes | The ID of a build | | `build_id` | integer | yes | The ID of a build |
``` ```
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/8" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/8"
``` ```
Example of response Example of response
...@@ -271,7 +271,7 @@ GET /projects/:id/builds/:build_id/artifacts ...@@ -271,7 +271,7 @@ GET /projects/:id/builds/:build_id/artifacts
| `build_id` | integer | yes | The ID of a build | | `build_id` | integer | yes | The ID of a build |
``` ```
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/8/artifacts" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/8/artifacts"
``` ```
Response: Response:
...@@ -305,7 +305,7 @@ Parameters ...@@ -305,7 +305,7 @@ Parameters
Example request: Example request:
``` ```
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/artifacts/master/download?job=test" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/artifacts/master/download?job=test"
``` ```
Example response: Example response:
...@@ -331,7 +331,7 @@ GET /projects/:id/builds/:build_id/trace ...@@ -331,7 +331,7 @@ GET /projects/:id/builds/:build_id/trace
| build_id | integer | yes | The ID of a build | | build_id | integer | yes | The ID of a build |
``` ```
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/8/trace" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/8/trace"
``` ```
Response: Response:
...@@ -355,7 +355,7 @@ POST /projects/:id/builds/:build_id/cancel ...@@ -355,7 +355,7 @@ POST /projects/:id/builds/:build_id/cancel
| `build_id` | integer | yes | The ID of a build | | `build_id` | integer | yes | The ID of a build |
``` ```
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/cancel" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/cancel"
``` ```
Example of response Example of response
...@@ -401,7 +401,7 @@ POST /projects/:id/builds/:build_id/retry ...@@ -401,7 +401,7 @@ POST /projects/:id/builds/:build_id/retry
| `build_id` | integer | yes | The ID of a build | | `build_id` | integer | yes | The ID of a build |
``` ```
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/retry" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/retry"
``` ```
Example of response Example of response
...@@ -451,7 +451,7 @@ Parameters ...@@ -451,7 +451,7 @@ Parameters
Example of request Example of request
``` ```
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/erase" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/erase"
``` ```
Example of response Example of response
...@@ -501,7 +501,7 @@ Parameters ...@@ -501,7 +501,7 @@ Parameters
Example request: Example request:
``` ```
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/artifacts/keep" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/artifacts/keep"
``` ```
Example response: Example response:
......
...@@ -35,7 +35,7 @@ POST /ci/api/v1/builds/register ...@@ -35,7 +35,7 @@ POST /ci/api/v1/builds/register
``` ```
curl -X POST "https://gitlab.example.com/ci/api/v1/builds/register" -F "token=t0k3n" curl --request POST "https://gitlab.example.com/ci/api/v1/builds/register" --form "token=t0k3n"
``` ```
### Update details of an existing build ### Update details of an existing build
...@@ -52,7 +52,7 @@ PUT /ci/api/v1/builds/:id ...@@ -52,7 +52,7 @@ PUT /ci/api/v1/builds/:id
| `trace` | string | no | The trace of a build | | `trace` | string | no | The trace of a build |
``` ```
curl -X PUT "https://gitlab.example.com/ci/api/v1/builds/1234" -F "token=t0k3n" -F "state=running" -F "trace=Running git clone...\n" curl --request PUT "https://gitlab.example.com/ci/api/v1/builds/1234" --form "token=t0k3n" --form "state=running" --form "trace=Running git clone...\n"
``` ```
### Incremental build trace update ### Incremental build trace update
...@@ -87,7 +87,7 @@ Headers: ...@@ -87,7 +87,7 @@ Headers:
| `Content-Range` | string | yes | Bytes range of trace that is sent | | `Content-Range` | string | yes | Bytes range of trace that is sent |
``` ```
curl -X PATCH "https://gitlab.example.com/ci/api/v1/builds/1234/trace.txt" -H "BUILD-TOKEN=build_t0k3n" -H "Content-Range=0-21" -d "Running git clone...\n" curl --request PATCH "https://gitlab.example.com/ci/api/v1/builds/1234/trace.txt" --header "BUILD-TOKEN=build_t0k3n" --header "Content-Range=0-21" --data "Running git clone...\n"
``` ```
...@@ -104,7 +104,7 @@ POST /ci/api/v1/builds/:id/artifacts ...@@ -104,7 +104,7 @@ POST /ci/api/v1/builds/:id/artifacts
| `file` | mixed | yes | Artifacts file | | `file` | mixed | yes | Artifacts file |
``` ```
curl -X POST "https://gitlab.example.com/ci/api/v1/builds/1234/artifacts" -F "token=build_t0k3n" -F "file=@/path/to/file" curl --request POST "https://gitlab.example.com/ci/api/v1/builds/1234/artifacts" --form "token=build_t0k3n" --form "file=@/path/to/file"
``` ```
### Download the artifacts file from build ### Download the artifacts file from build
...@@ -119,7 +119,7 @@ GET /ci/api/v1/builds/:id/artifacts ...@@ -119,7 +119,7 @@ GET /ci/api/v1/builds/:id/artifacts
| `token` | string | yes | The build authorization token | | `token` | string | yes | The build authorization token |
``` ```
curl "https://gitlab.example.com/ci/api/v1/builds/1234/artifacts" -F "token=build_t0k3n" curl "https://gitlab.example.com/ci/api/v1/builds/1234/artifacts" --form "token=build_t0k3n"
``` ```
### Remove the artifacts file from build ### Remove the artifacts file from build
...@@ -134,5 +134,5 @@ DELETE /ci/api/v1/builds/:id/artifacts ...@@ -134,5 +134,5 @@ DELETE /ci/api/v1/builds/:id/artifacts
| `token` | string | yes | The build authorization token | | `token` | string | yes | The build authorization token |
``` ```
curl -X DELETE "https://gitlab.example.com/ci/api/v1/builds/1234/artifacts" -F "token=build_t0k3n" curl --request DELETE "https://gitlab.example.com/ci/api/v1/builds/1234/artifacts" --form "token=build_t0k3n"
``` ```
...@@ -35,7 +35,7 @@ POST /ci/api/v1/runners/register ...@@ -35,7 +35,7 @@ POST /ci/api/v1/runners/register
Example request: Example request:
```sh ```sh
curl -X POST "https://gitlab.example.com/ci/api/v1/runners/register" -F "token=t0k3n" curl --request POST "https://gitlab.example.com/ci/api/v1/runners/register" --form "token=t0k3n"
``` ```
## Delete a Runner ## Delete a Runner
...@@ -53,5 +53,5 @@ DELETE /ci/api/v1/runners/delete ...@@ -53,5 +53,5 @@ DELETE /ci/api/v1/runners/delete
Example request: Example request:
```sh ```sh
curl -X DELETE "https://gitlab.example.com/ci/api/v1/runners/delete" -F "token=t0k3n" curl --request DELETE "https://gitlab.example.com/ci/api/v1/runners/delete" --form "token=t0k3n"
``` ```
...@@ -16,7 +16,7 @@ GET /projects/:id/repository/commits ...@@ -16,7 +16,7 @@ GET /projects/:id/repository/commits
| `until` | string | no | Only commits before or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | | `until` | string | no | Only commits before or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits"
``` ```
Example response: Example response:
...@@ -62,7 +62,7 @@ Parameters: ...@@ -62,7 +62,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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits/master curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits/master
``` ```
Example response: Example response:
...@@ -106,7 +106,7 @@ Parameters: ...@@ -106,7 +106,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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits/master/diff" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits/master/diff"
``` ```
Example response: Example response:
...@@ -142,7 +142,7 @@ Parameters: ...@@ -142,7 +142,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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits/master/comments" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits/master/comments"
``` ```
Example response: Example response:
...@@ -195,7 +195,7 @@ POST /projects/:id/repository/commits/:sha/comments ...@@ -195,7 +195,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 -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -F "note=Nice picture man\!" -F "path=dudeism.md" -F "line=11" -F "line_type=new" https://gitlab.example.com/api/v3/projects/17/repository/commits/18f3e63d05582537db6d183d9d557be09e1f90c8/comments 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/v3/projects/17/repository/commits/18f3e63d05582537db6d183d9d557be09e1f90c8/comments
``` ```
Example response: Example response:
...@@ -240,7 +240,7 @@ GET /projects/:id/repository/commits/:sha/statuses ...@@ -240,7 +240,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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/17/repository/commits/18f3e63d05582537db6d183d9d557be09e1f90c8/statuses curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/17/repository/commits/18f3e63d05582537db6d183d9d557be09e1f90c8/statuses
``` ```
Example response: Example response:
...@@ -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"
``` ```
Example response: Example response:
......
...@@ -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 -H 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/projects curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/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 -H 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/groups curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/groups
# For group 1234: # For group 1234:
curl -H 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/groups/1234 curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/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 -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -H "Content-Type: application/json" \ curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "Content-Type: application/json" \
--data '{"title": "my key", "key": "ssh-rsa AAAA..."}' https://gitlab.example.com/api/v3/projects/${project_id}/deploy_keys --data '{"title": "my key", "key": "ssh-rsa AAAA..."}' https://gitlab.example.com/api/v3/projects/${project_id}/deploy_keys
done done
``` ```
...@@ -9,7 +9,7 @@ GET /deploy_keys ...@@ -9,7 +9,7 @@ GET /deploy_keys
``` ```
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/deploy_keys" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/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 | yes | The ID of the project | | `id` | integer | yes | The ID of the project |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/deploy_keys" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/deploy_keys"
``` ```
Example response: Example response:
...@@ -82,7 +82,7 @@ Parameters: ...@@ -82,7 +82,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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/deploy_keys/11" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/deploy_keys/11"
``` ```
Example response: Example response:
...@@ -114,7 +114,7 @@ POST /projects/:id/deploy_keys ...@@ -114,7 +114,7 @@ POST /projects/:id/deploy_keys
| `key` | string | yes | New deploy key | | `key` | string | yes | New deploy key |
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -H "Content-Type: application/json" --data '{"title": "My deploy key", "key": "ssh-rsa AAAA..."}' "https://gitlab.example.com/api/v3/projects/5/deploy_keys/" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "Content-Type: application/json" --data '{"title": "My deploy key", "key": "ssh-rsa AAAA..."}' "https://gitlab.example.com/api/v3/projects/5/deploy_keys/"
``` ```
Example response: Example response:
...@@ -142,7 +142,7 @@ DELETE /projects/:id/deploy_keys/:key_id ...@@ -142,7 +142,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 -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/deploy_keys/13" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/deploy_keys/13"
``` ```
Example response: Example response:
...@@ -165,7 +165,7 @@ Example response: ...@@ -165,7 +165,7 @@ Example response:
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 -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/deploy_keys/13/enable curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/deploy_keys/13/enable
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
...@@ -189,7 +189,7 @@ Example response: ...@@ -189,7 +189,7 @@ Example response:
Disable a deploy key for a project. Returns the disabled key. Disable a deploy key for a project. Returns the disabled key.
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/deploy_keys/13/disable curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/deploy_keys/13/disable
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
......
...@@ -13,7 +13,7 @@ GET /projects/:id/environments ...@@ -13,7 +13,7 @@ GET /projects/:id/environments
| `id` | integer | yes | The ID of the project | | `id` | integer | yes | The ID of the project |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/environments curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/environments
``` ```
Example response: Example response:
...@@ -45,7 +45,7 @@ POST /projects/:id/environment ...@@ -45,7 +45,7 @@ POST /projects/:id/environment
| `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" -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/environments" curl --data "name=deploy&external_url=https://deploy.example.gitlab.com" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/environments"
``` ```
Example response: Example response:
...@@ -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"
``` ```
Example response: Example response:
...@@ -103,7 +103,7 @@ DELETE /projects/:id/environments/:environment_id ...@@ -103,7 +103,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 -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/environment/1" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/environment/1"
``` ```
Example response: Example response:
......
...@@ -104,7 +104,7 @@ Parameters: ...@@ -104,7 +104,7 @@ Parameters:
| `id` | integer/string | yes | The ID or path of a group | | `id` | integer/string | yes | The ID or path of a group |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/groups/4 curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/groups/4
``` ```
Example response: Example response:
...@@ -319,7 +319,7 @@ PUT /groups/:id ...@@ -319,7 +319,7 @@ PUT /groups/:id
| `visibility_level` | integer | no | The visibility level of the group. 0 for private, 10 for internal, 20 for public. | | `visibility_level` | integer | no | The visibility level of the group. 0 for private, 10 for internal, 20 for public. |
```bash ```bash
curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/groups/5?name=Experimental" curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/groups/5?name=Experimental"
``` ```
......
...@@ -33,7 +33,7 @@ GET /issues?labels=foo,bar&state=opened ...@@ -33,7 +33,7 @@ GET /issues?labels=foo,bar&state=opened
| `sort` | string | no | Return requests sorted in `asc` or `desc` order. Default is `desc` | | `sort` | string | no | Return requests sorted in `asc` or `desc` order. Default is `desc` |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/issues curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/issues
``` ```
Example response: Example response:
...@@ -110,7 +110,7 @@ GET /groups/:id/issues?milestone=1.0.0&state=opened ...@@ -110,7 +110,7 @@ GET /groups/:id/issues?milestone=1.0.0&state=opened
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/groups/4/issues curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/groups/4/issues
``` ```
Example response: Example response:
...@@ -189,7 +189,7 @@ GET /projects/:id/issues?iid=42 ...@@ -189,7 +189,7 @@ GET /projects/:id/issues?iid=42
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues
``` ```
Example response: Example response:
...@@ -254,7 +254,7 @@ GET /projects/:id/issues/:issue_id ...@@ -254,7 +254,7 @@ GET /projects/:id/issues/:issue_id
| `issue_id`| integer | yes | The ID of a project's issue | | `issue_id`| integer | yes | The ID of a project's issue |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/41 curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/41
``` ```
Example response: Example response:
...@@ -327,7 +327,7 @@ POST /projects/:id/issues ...@@ -327,7 +327,7 @@ POST /projects/:id/issues
| `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 -X POST -H "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/v3/projects/4/issues?title=Issues%20with%20auth&labels=bug
``` ```
Example response: Example response:
...@@ -388,7 +388,7 @@ PUT /projects/:id/issues/:issue_id ...@@ -388,7 +388,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 -X PUT -H "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/v3/projects/4/issues/85?state_event=close
``` ```
Example response: Example response:
...@@ -438,7 +438,7 @@ DELETE /projects/:id/issues/:issue_id ...@@ -438,7 +438,7 @@ DELETE /projects/:id/issues/:issue_id
| `issue_id` | integer | yes | The ID of a project's issue | | `issue_id` | integer | yes | The ID of a project's issue |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/85 curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/85
``` ```
## Move an issue ## Move an issue
...@@ -463,7 +463,7 @@ POST /projects/:id/issues/:issue_id/move ...@@ -463,7 +463,7 @@ POST /projects/:id/issues/:issue_id/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 -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/85/move curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/85/move
``` ```
Example response: Example response:
...@@ -518,7 +518,7 @@ POST /projects/:id/issues/:issue_id/subscription ...@@ -518,7 +518,7 @@ POST /projects/:id/issues/:issue_id/subscription
| `issue_id` | integer | yes | The ID of a project's issue | | `issue_id` | integer | yes | The ID of a project's issue |
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/93/subscription curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/93/subscription
``` ```
Example response: Example response:
...@@ -573,7 +573,7 @@ DELETE /projects/:id/issues/:issue_id/subscription ...@@ -573,7 +573,7 @@ DELETE /projects/:id/issues/:issue_id/subscription
| `issue_id` | integer | yes | The ID of a project's issue | | `issue_id` | integer | yes | The ID of a project's issue |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/93/subscription curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/93/subscription
``` ```
Example response: Example response:
...@@ -628,7 +628,7 @@ POST /projects/:id/issues/:issue_id/todo ...@@ -628,7 +628,7 @@ POST /projects/:id/issues/:issue_id/todo
| `issue_id` | integer | yes | The ID of a project's issue | | `issue_id` | integer | yes | The ID of a project's issue |
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/93/todo curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/93/todo
``` ```
Example response: Example response:
......
...@@ -13,7 +13,7 @@ GET /projects/:id/labels ...@@ -13,7 +13,7 @@ GET /projects/:id/labels
| `id` | integer | yes | The ID of the project | | `id` | integer | yes | The ID of the project |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/labels curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/labels
``` ```
Example response: Example response:
...@@ -82,7 +82,7 @@ POST /projects/:id/labels ...@@ -82,7 +82,7 @@ POST /projects/:id/labels
| `description` | string | no | The description of the label | | `description` | string | no | The description of the label |
```bash ```bash
curl --data "name=feature&color=#5843AD" -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels" curl --data "name=feature&color=#5843AD" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels"
``` ```
Example response: Example response:
...@@ -113,7 +113,7 @@ DELETE /projects/:id/labels ...@@ -113,7 +113,7 @@ DELETE /projects/:id/labels
| `name` | string | yes | The name of the label | | `name` | string | yes | The name of the label |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels?name=bug" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels?name=bug"
``` ```
Example response: Example response:
...@@ -153,7 +153,7 @@ PUT /projects/:id/labels ...@@ -153,7 +153,7 @@ PUT /projects/:id/labels
| `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
``` ```
Example response: Example response:
...@@ -219,7 +219,7 @@ DELETE /projects/:id/labels/:label_id/subscription ...@@ -219,7 +219,7 @@ DELETE /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 DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/labels/1/subscription curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/labels/1/subscription
``` ```
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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/licenses/mit?project=My+Cool+Project curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/licenses/mit?project=My+Cool+Project
``` ```
Example response: Example response:
......
...@@ -418,7 +418,7 @@ DELETE /projects/:id/merge_requests/:merge_request_id ...@@ -418,7 +418,7 @@ DELETE /projects/:id/merge_requests/:merge_request_id
| `merge_request_id` | integer | yes | The ID of a project's merge request | | `merge_request_id` | integer | yes | The ID of a project's merge request |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/merge_request/85 curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/merge_request/85
``` ```
## Accept MR ## Accept MR
...@@ -587,7 +587,7 @@ GET /projects/:id/merge_requests/:merge_request_id/closes_issues ...@@ -587,7 +587,7 @@ GET /projects/:id/merge_requests/:merge_request_id/closes_issues
| `merge_request_id` | integer | yes | The ID of the merge request | | `merge_request_id` | integer | yes | The ID of the merge request |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/76/merge_requests/1/closes_issues curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/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:
...@@ -665,7 +665,7 @@ POST /projects/:id/merge_requests/:merge_request_id/subscription ...@@ -665,7 +665,7 @@ POST /projects/:id/merge_requests/:merge_request_id/subscription
| `merge_request_id` | integer | yes | The ID of the merge request | | `merge_request_id` | integer | yes | The ID of the merge request |
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/17/subscription curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/17/subscription
``` ```
Example response: Example response:
...@@ -739,7 +739,7 @@ DELETE /projects/:id/merge_requests/:merge_request_id/subscription ...@@ -739,7 +739,7 @@ DELETE /projects/:id/merge_requests/:merge_request_id/subscription
| `merge_request_id` | integer | yes | The ID of the merge request | | `merge_request_id` | integer | yes | The ID of the merge request |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/17/subscription curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/17/subscription
``` ```
Example response: Example response:
...@@ -812,7 +812,7 @@ POST /projects/:id/merge_requests/:merge_request_id/todo ...@@ -812,7 +812,7 @@ POST /projects/:id/merge_requests/:merge_request_id/todo
| `merge_request_id` | integer | yes | The ID of the merge request | | `merge_request_id` | integer | yes | The ID of the merge request |
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/27/todo curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/27/todo
``` ```
Example response: Example response:
......
...@@ -20,7 +20,7 @@ Parameters: ...@@ -20,7 +20,7 @@ Parameters:
| `state` | string | optional | Return only `active` or `closed` milestones` | | `state` | string | optional | Return only `active` or `closed` milestones` |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/milestones curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/namespaces curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/namespaces
``` ```
Example response: Example response:
...@@ -54,7 +54,7 @@ GET /namespaces?search=foobar ...@@ -54,7 +54,7 @@ GET /namespaces?search=foobar
Example request: Example request:
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/namespaces?search=twitter curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/namespaces?search=twitter
``` ```
Example response: Example response:
......
...@@ -124,7 +124,7 @@ Parameters: ...@@ -124,7 +124,7 @@ Parameters:
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/11/notes/636 curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/11/notes/636
``` ```
Example Response: Example Response:
...@@ -248,7 +248,7 @@ Parameters: ...@@ -248,7 +248,7 @@ Parameters:
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/snippets/52/notes/1659 curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/snippets/52/notes/1659
``` ```
Example Response: Example Response:
...@@ -376,7 +376,7 @@ Parameters: ...@@ -376,7 +376,7 @@ Parameters:
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/7/notes/1602 curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/7/notes/1602
``` ```
Example Response: Example Response:
......
...@@ -60,7 +60,7 @@ GET https://localhost:3000/api/v3/user?access_token=OAUTH-TOKEN ...@@ -60,7 +60,7 @@ GET https://localhost:3000/api/v3/user?access_token=OAUTH-TOKEN
Or you can put the token to the Authorization header: Or you can put the token to the Authorization header:
``` ```
curl -H "Authorization: Bearer OAUTH-TOKEN" https://localhost:3000/api/v3/user curl --header "Authorization: Bearer OAUTH-TOKEN" https://localhost:3000/api/v3/user
``` ```
## Resource Owner Password Credentials ## Resource Owner Password Credentials
......
...@@ -529,7 +529,7 @@ POST /projects/:id/star ...@@ -529,7 +529,7 @@ POST /projects/:id/star
| `id` | integer | yes | The ID of the project | | `id` | integer | yes | The ID of the project |
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star"
``` ```
Example response: Example response:
...@@ -595,7 +595,7 @@ DELETE /projects/:id/star ...@@ -595,7 +595,7 @@ DELETE /projects/:id/star
| `id` | integer | yes | The ID of the project | | `id` | integer | yes | The ID of the project |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star"
``` ```
Example response: Example response:
...@@ -665,7 +665,7 @@ POST /projects/:id/archive ...@@ -665,7 +665,7 @@ POST /projects/:id/archive
| `id` | integer | yes | The ID of the project | | `id` | integer | yes | The ID of the project |
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/archive" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/archive"
``` ```
Example response: Example response:
...@@ -751,7 +751,7 @@ POST /projects/:id/unarchive ...@@ -751,7 +751,7 @@ POST /projects/:id/unarchive
| `id` | integer | yes | The ID of the project | | `id` | integer | yes | The ID of the project |
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/unarchive" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/unarchive"
``` ```
Example response: Example response:
......
...@@ -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'
``` ```
Example response: Example response:
...@@ -107,7 +107,7 @@ DELETE /projects/:id/repository/files ...@@ -107,7 +107,7 @@ DELETE /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&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'
``` ```
Example response: Example response:
......
...@@ -18,7 +18,7 @@ GET /runners?scope=active ...@@ -18,7 +18,7 @@ GET /runners?scope=active
| `scope` | string | no | The scope of specific runners to show, one of: `active`, `paused`, `online`; showing all runners if none provided | | `scope` | string | no | The scope of specific runners to show, one of: `active`, `paused`, `online`; showing all runners if none provided |
``` ```
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners"
``` ```
Example response: Example response:
...@@ -57,7 +57,7 @@ GET /runners/all?scope=online ...@@ -57,7 +57,7 @@ GET /runners/all?scope=online
| `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 |
``` ```
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/all" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/all"
``` ```
Example response: Example response:
...@@ -108,7 +108,7 @@ GET /runners/:id ...@@ -108,7 +108,7 @@ GET /runners/:id
| `id` | integer | yes | The ID of a runner | | `id` | integer | yes | The ID of a runner |
``` ```
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6"
``` ```
Example response: Example response:
...@@ -158,7 +158,7 @@ PUT /runners/:id ...@@ -158,7 +158,7 @@ PUT /runners/:id
| `tag_list` | array | no | The list of tags for a runner; put array of tags, that should be finally assigned to a runner | | `tag_list` | array | no | The list of tags for a runner; put array of tags, that should be finally assigned to a runner |
``` ```
curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6" -F "description=test-1-20150125-test" -F "tag_list=ruby,mysql,tag1,tag2" curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2"
``` ```
Example response: Example response:
...@@ -207,7 +207,7 @@ DELETE /runners/:id ...@@ -207,7 +207,7 @@ DELETE /runners/:id
| `id` | integer | yes | The ID of a runner | | `id` | integer | yes | The ID of a runner |
``` ```
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6"
``` ```
Example response: Example response:
...@@ -237,7 +237,7 @@ GET /projects/:id/runners ...@@ -237,7 +237,7 @@ GET /projects/:id/runners
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project |
``` ```
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/9/runners" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/9/runners"
``` ```
Example response: Example response:
...@@ -275,7 +275,7 @@ POST /projects/:id/runners ...@@ -275,7 +275,7 @@ POST /projects/:id/runners
| `runner_id` | integer | yes | The ID of a runner | | `runner_id` | integer | yes | The ID of a runner |
``` ```
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/9/runners" -F "runner_id=9" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/9/runners" --form "runner_id=9"
``` ```
Example response: Example response:
...@@ -306,7 +306,7 @@ DELETE /projects/:id/runners/:runner_id ...@@ -306,7 +306,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 -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/9/runners/9" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/9/runners/9"
``` ```
Example response: Example response:
......
...@@ -21,7 +21,7 @@ POST /session ...@@ -21,7 +21,7 @@ POST /session
| `password` | string | yes | The password of the user | | `password` | string | yes | The password of the user |
```bash ```bash
curl -X POST "https://gitlab.example.com/api/v3/session?login=john_smith&password=strongpassw0rd" curl --request POST "https://gitlab.example.com/api/v3/session?login=john_smith&password=strongpassw0rd"
``` ```
Example response: Example response:
......
...@@ -13,7 +13,7 @@ GET /application/settings ...@@ -13,7 +13,7 @@ GET /application/settings
``` ```
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings
``` ```
Example response: Example response:
...@@ -75,7 +75,7 @@ PUT /application/settings ...@@ -75,7 +75,7 @@ PUT /application/settings
| `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
``` ```
Example response: Example response:
......
...@@ -15,7 +15,7 @@ GET /sidekiq/queue_metrics ...@@ -15,7 +15,7 @@ GET /sidekiq/queue_metrics
``` ```
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/sidekiq/queue_metrics curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/sidekiq/process_metrics curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/sidekiq/job_stats curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/sidekiq/compound_metrics curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/sidekiq/compound_metrics
``` ```
Example response: Example response:
......
...@@ -20,7 +20,7 @@ GET /hooks ...@@ -20,7 +20,7 @@ GET /hooks
Example request: Example request:
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/hooks curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/hooks
``` ```
Example response: Example response:
...@@ -52,7 +52,7 @@ POST /hooks ...@@ -52,7 +52,7 @@ POST /hooks
Example request: Example request:
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/hooks?url=https://gitlab.example.com/hook" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/hooks?url=https://gitlab.example.com/hook"
``` ```
Example response: Example response:
...@@ -80,7 +80,7 @@ GET /hooks/:id ...@@ -80,7 +80,7 @@ GET /hooks/:id
Example request: Example request:
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/hooks/2 curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/hooks/2
``` ```
Example response: Example response:
...@@ -117,7 +117,7 @@ DELETE /hooks/:id ...@@ -117,7 +117,7 @@ DELETE /hooks/:id
Example request: Example request:
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/hooks/2 curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/hooks/2
``` ```
Example response: Example response:
......
...@@ -56,7 +56,7 @@ Parameters: ...@@ -56,7 +56,7 @@ Parameters:
| `tag_name` | string | yes | The name of the tag | | `tag_name` | string | yes | The name of the tag |
```bash ```bash
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/tags/v1.0.0 curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/tags/v1.0.0
``` ```
Example Response: Example Response:
......
...@@ -22,7 +22,7 @@ Parameters: ...@@ -22,7 +22,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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/todos curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/todos
``` ```
Example Response: Example Response:
...@@ -194,7 +194,7 @@ Parameters: ...@@ -194,7 +194,7 @@ Parameters:
| `id` | integer | yes | The ID of a todo | | `id` | integer | yes | The ID of a todo |
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/todos/130 curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/todos/130
``` ```
Example Response: Example Response:
...@@ -284,7 +284,7 @@ DELETE /todos ...@@ -284,7 +284,7 @@ DELETE /todos
``` ```
```bash ```bash
curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/todos curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/todos
``` ```
Example Response: Example Response:
......
...@@ -49,7 +49,7 @@ apt-get update -yqq ...@@ -49,7 +49,7 @@ apt-get update -yqq
apt-get install git -yqq apt-get install git -yqq
# Install phpunit, the tool that we will use for testing # Install phpunit, the tool that we will use for testing
curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar curl --location --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit
# Install mysql driver # Install mysql driver
...@@ -235,7 +235,7 @@ cache: ...@@ -235,7 +235,7 @@ cache:
before_script: before_script:
# Install composer dependencies # Install composer dependencies
- curl -sS https://getcomposer.org/installer | php - curl --silent --show-error https://getcomposer.org/installer | php
- php composer.phar install - php composer.phar install
... ...
......
...@@ -77,9 +77,9 @@ See the [Examples](#examples) section below for more details. ...@@ -77,9 +77,9 @@ See the [Examples](#examples) section below for more details.
Using cURL you can trigger a rebuild with minimal effort, for example: Using cURL you can trigger a rebuild with minimal effort, for example:
```bash ```bash
curl -X POST \ curl --request POST \
-F token=TOKEN \ --form token=TOKEN \
-F ref=master \ --form ref=master \
https://gitlab.example.com/api/v3/projects/9/trigger/builds https://gitlab.example.com/api/v3/projects/9/trigger/builds
``` ```
...@@ -88,7 +88,7 @@ In this case, the project with ID `9` will get rebuilt on `master` branch. ...@@ -88,7 +88,7 @@ In this case, the project with ID `9` will get rebuilt on `master` branch.
Alternatively, you can pass the `token` and `ref` arguments in the query string: Alternatively, you can pass the `token` and `ref` arguments in the query string:
```bash ```bash
curl -X POST \ curl --request POST \
"https://gitlab.example.com/api/v3/projects/9/trigger/builds?token=TOKEN&ref=master" "https://gitlab.example.com/api/v3/projects/9/trigger/builds?token=TOKEN&ref=master"
``` ```
...@@ -103,7 +103,7 @@ need to add in project's A `.gitlab-ci.yml`: ...@@ -103,7 +103,7 @@ need to add in project's A `.gitlab-ci.yml`:
build_docs: build_docs:
stage: deploy stage: deploy
script: script:
- "curl -X POST -F token=TOKEN -F ref=master https://gitlab.example.com/api/v3/projects/9/trigger/builds" - "curl --request POST --form token=TOKEN --form ref=master https://gitlab.example.com/api/v3/projects/9/trigger/builds"
only: only:
- tags - tags
``` ```
...@@ -158,10 +158,10 @@ You can then trigger a rebuild while you pass the `UPLOAD_TO_S3` variable ...@@ -158,10 +158,10 @@ You can then trigger a rebuild while you pass the `UPLOAD_TO_S3` variable
and the script of the `upload_package` job will run: and the script of the `upload_package` job will run:
```bash ```bash
curl -X POST \ curl --request POST \
-F token=TOKEN \ --form token=TOKEN \
-F ref=master \ --form ref=master \
-F "variables[UPLOAD_TO_S3]=true" \ --form "variables[UPLOAD_TO_S3]=true" \
https://gitlab.example.com/api/v3/projects/9/trigger/builds https://gitlab.example.com/api/v3/projects/9/trigger/builds
``` ```
...@@ -172,7 +172,7 @@ in conjunction with cron. The example below triggers a build on the `master` ...@@ -172,7 +172,7 @@ in conjunction with cron. The example below triggers a build on the `master`
branch of project with ID `9` every night at `00:30`: branch of project with ID `9` every night at `00:30`:
```bash ```bash
30 0 * * * curl -X POST -F token=TOKEN -F ref=master https://gitlab.example.com/api/v3/projects/9/trigger/builds 30 0 * * * curl --request POST --form token=TOKEN --form ref=master https://gitlab.example.com/api/v3/projects/9/trigger/builds
``` ```
[ci-229]: https://gitlab.com/gitlab-org/gitlab-ci/merge_requests/229 [ci-229]: https://gitlab.com/gitlab-org/gitlab-ci/merge_requests/229
...@@ -355,7 +355,7 @@ Below is a set of [cURL][] examples that you can use in the API documentation. ...@@ -355,7 +355,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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/groups/gitlab-org curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/groups/gitlab-org
``` ```
#### cURL example with parameters passed in the URL #### cURL example with parameters passed in the URL
...@@ -363,7 +363,7 @@ curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/ ...@@ -363,7 +363,7 @@ curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/
Create a new project under the authenticated user's namespace: Create a new project under the authenticated user's namespace:
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects?name=foo" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects?name=foo"
``` ```
#### Post data using cURL's --data #### Post data using cURL's --data
...@@ -373,7 +373,7 @@ cURL's `--data` option. The example below will create a new project `foo` under ...@@ -373,7 +373,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" -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects" curl --data "name=foo" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects"
``` ```
#### Post data using JSON content #### Post data using JSON content
...@@ -382,7 +382,7 @@ curl --data "name=foo" -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab. ...@@ -382,7 +382,7 @@ curl --data "name=foo" -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.
and double quotes. and double quotes.
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -H "Content-Type: application/json" --data '{"path": "my-group", "name": "My group"}' https://gitlab.example.com/api/v3/groups curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "Content-Type: application/json" --data '{"path": "my-group", "name": "My group"}' https://gitlab.example.com/api/v3/groups
``` ```
#### Post data using form-data #### Post data using form-data
...@@ -391,7 +391,7 @@ Instead of using JSON or urlencode you can use multipart/form-data which ...@@ -391,7 +391,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 -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -F "title=ssh-key" -F "key=ssh-rsa AAAAB3NzaC1yc2EA..." https://gitlab.example.com/api/v3/users/25/keys curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "title=ssh-key" --form "key=ssh-rsa AAAAB3NzaC1yc2EA..." https://gitlab.example.com/api/v3/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
...@@ -405,7 +405,7 @@ contains spaces in its title. Observe how spaces are escaped using the `%20` ...@@ -405,7 +405,7 @@ contains spaces in its title. Observe how spaces are escaped using the `%20`
ASCII code. ASCII code.
```bash ```bash
curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/42/issues?title=Hello%20Dude" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/42/issues?title=Hello%20Dude"
``` ```
Use `%2F` for slashes (`/`). Use `%2F` for slashes (`/`).
...@@ -417,7 +417,7 @@ restrict the sign-up e-mail domains of a GitLab instance to `*.example.com` and ...@@ -417,7 +417,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 -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -d "domain_whitelist[]=*.example.com" -d "domain_whitelist[]=example.net" https://gitlab.example.com/api/v3/application/settings curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "domain_whitelist[]=*.example.com" --data "domain_whitelist[]=example.net" https://gitlab.example.com/api/v3/application/settings
``` ```
[cURL]: http://curl.haxx.se/ "cURL website" [cURL]: http://curl.haxx.se/ "cURL website"
......
...@@ -89,7 +89,7 @@ Is the system packaged Git too old? Remove it and compile from source. ...@@ -89,7 +89,7 @@ Is the system packaged Git too old? Remove it and compile from source.
# Download and compile from source # Download and compile from source
cd /tmp cd /tmp
curl -O --progress https://www.kernel.org/pub/software/scm/git/git-2.7.4.tar.gz curl --remote-name --progress https://www.kernel.org/pub/software/scm/git/git-2.7.4.tar.gz
echo '7104c4f5d948a75b499a954524cb281fe30c6649d8abe20982936f75ec1f275b git-2.7.4.tar.gz' | shasum -a256 -c - && tar -xzf git-2.7.4.tar.gz echo '7104c4f5d948a75b499a954524cb281fe30c6649d8abe20982936f75ec1f275b git-2.7.4.tar.gz' | shasum -a256 -c - && tar -xzf git-2.7.4.tar.gz
cd git-2.7.4/ cd git-2.7.4/
./configure ./configure
...@@ -124,7 +124,7 @@ Remove the old Ruby 1.8 if present: ...@@ -124,7 +124,7 @@ Remove the old Ruby 1.8 if present:
Download Ruby and compile it: Download Ruby and compile it:
mkdir /tmp/ruby && cd /tmp/ruby mkdir /tmp/ruby && cd /tmp/ruby
curl -O --progress https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.8.tar.gz curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.8.tar.gz
echo 'c7e50159357afd87b13dc5eaf4ac486a70011149 ruby-2.1.8.tar.gz' | shasum -c - && tar xzf ruby-2.1.8.tar.gz echo 'c7e50159357afd87b13dc5eaf4ac486a70011149 ruby-2.1.8.tar.gz' | shasum -c - && tar xzf ruby-2.1.8.tar.gz
cd ruby-2.1.8 cd ruby-2.1.8
./configure --disable-install-rdoc ./configure --disable-install-rdoc
...@@ -143,7 +143,7 @@ gitlab-workhorse we need a Go compiler. The instructions below assume you ...@@ -143,7 +143,7 @@ gitlab-workhorse we need a Go compiler. The instructions below assume you
use 64-bit Linux. You can find downloads for other platforms at the [Go download use 64-bit Linux. You can find downloads for other platforms at the [Go download
page](https://golang.org/dl). page](https://golang.org/dl).
curl -O --progress https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz curl --remote-name --progress https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz
echo '43afe0c5017e502630b1aea4d44b8a7f059bf60d7f29dfd58db454d4e4e0ae53 go1.5.3.linux-amd64.tar.gz' | shasum -a256 -c - && \ echo '43afe0c5017e502630b1aea4d44b8a7f059bf60d7f29dfd58db454d4e4e0ae53 go1.5.3.linux-amd64.tar.gz' | shasum -a256 -c - && \
sudo tar -C /usr/local -xzf go1.5.3.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.5.3.linux-amd64.tar.gz
sudo ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/local/bin/ sudo ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/local/bin/
......
...@@ -24,7 +24,7 @@ https://gitlab.example.com/health_check.json?token=ACCESS_TOKEN ...@@ -24,7 +24,7 @@ https://gitlab.example.com/health_check.json?token=ACCESS_TOKEN
or as an HTTP header: or as an HTTP header:
```bash ```bash
curl -H "TOKEN: ACCESS_TOKEN" https://gitlab.example.com/health_check.json curl --header "TOKEN: ACCESS_TOKEN" https://gitlab.example.com/health_check.json
``` ```
## Using the Endpoint ## Using the Endpoint
...@@ -45,7 +45,7 @@ You can also ask for the status of specific services: ...@@ -45,7 +45,7 @@ You can also ask for the status of specific services:
For example, the JSON output of the following health check: For example, the JSON output of the following health check:
```bash ```bash
curl -H "TOKEN: ACCESS_TOKEN" https://gitlab.example.com/health_check.json curl --header "TOKEN: ACCESS_TOKEN" https://gitlab.example.com/health_check.json
``` ```
would be like: would be like:
......
...@@ -42,7 +42,7 @@ sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production ...@@ -42,7 +42,7 @@ sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
sudo mv /etc/init.d/gitlab /etc/init.d/gitlab.old sudo mv /etc/init.d/gitlab /etc/init.d/gitlab.old
# get new one using sidekiq # get new one using sidekiq
sudo curl -L --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab sudo curl --location --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab sudo chmod +x /etc/init.d/gitlab
``` ```
......
...@@ -126,7 +126,7 @@ sudo chmod -R u+rwX /home/git/gitlab/tmp/pids ...@@ -126,7 +126,7 @@ sudo chmod -R u+rwX /home/git/gitlab/tmp/pids
```bash ```bash
# init.d # init.d
sudo rm /etc/init.d/gitlab sudo rm /etc/init.d/gitlab
sudo curl -L --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-0-stable/init.d/gitlab sudo curl --location --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-0-stable/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab sudo chmod +x /etc/init.d/gitlab
# unicorn # unicorn
......
...@@ -63,7 +63,7 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production ...@@ -63,7 +63,7 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```bash ```bash
# init.d # init.d
sudo rm /etc/init.d/gitlab sudo rm /etc/init.d/gitlab
sudo curl -L --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-1-stable/init.d/gitlab sudo curl --location --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-1-stable/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab sudo chmod +x /etc/init.d/gitlab
``` ```
......
...@@ -67,7 +67,7 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production ...@@ -67,7 +67,7 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```bash ```bash
sudo rm /etc/init.d/gitlab sudo rm /etc/init.d/gitlab
sudo curl -L --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5-3-stable/lib/support/init.d/gitlab sudo curl --location --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5-3-stable/lib/support/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab sudo chmod +x /etc/init.d/gitlab
``` ```
......
...@@ -71,7 +71,7 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production ...@@ -71,7 +71,7 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```bash ```bash
sudo rm /etc/init.d/gitlab sudo rm /etc/init.d/gitlab
sudo curl -L --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5-4-stable/lib/support/init.d/gitlab sudo curl --location --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5-4-stable/lib/support/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab sudo chmod +x /etc/init.d/gitlab
``` ```
......
...@@ -33,7 +33,7 @@ Download and compile Ruby: ...@@ -33,7 +33,7 @@ Download and compile Ruby:
```bash ```bash
mkdir /tmp/ruby && cd /tmp/ruby mkdir /tmp/ruby && cd /tmp/ruby
curl -L --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz curl --location --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz
cd ruby-2.1.2 cd ruby-2.1.2
./configure --disable-install-rdoc ./configure --disable-install-rdoc
make make
......
...@@ -33,7 +33,7 @@ Download and compile Ruby: ...@@ -33,7 +33,7 @@ Download and compile Ruby:
```bash ```bash
mkdir /tmp/ruby && cd /tmp/ruby mkdir /tmp/ruby && cd /tmp/ruby
curl -L --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz curl --location --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz
cd ruby-2.1.2 cd ruby-2.1.2
./configure --disable-install-rdoc ./configure --disable-install-rdoc
make make
......
...@@ -71,7 +71,7 @@ sudo -u git -H git checkout v2.6.5 ...@@ -71,7 +71,7 @@ sudo -u git -H git checkout v2.6.5
First we download Go 1.5 and install it into `/usr/local/go`: First we download Go 1.5 and install it into `/usr/local/go`:
```bash ```bash
curl -O --progress https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz curl --remote-name --progress https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz
echo '5817fa4b2252afdb02e11e8b9dc1d9173ef3bd5a go1.5.linux-amd64.tar.gz' | shasum -c - && \ echo '5817fa4b2252afdb02e11e8b9dc1d9173ef3bd5a go1.5.linux-amd64.tar.gz' | shasum -c - && \
sudo tar -C /usr/local -xzf go1.5.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.5.linux-amd64.tar.gz
sudo ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/local/bin/ sudo ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/local/bin/
......
#!/usr/bin/env bash
cd "$(dirname "$0")/.."
# Use long options (e.g. --header instead of -H) for curl examples in documentation.
grep --perl-regexp --recursive --color=auto 'curl (.+ )?-[^- ].*' doc/
if [ $? == 0 ]
then
echo '✖ ERROR: Short options should not be used in documentation!' >&2
exit 1
fi
echo "✔ Linting passed"
exit 0
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