Commit bf2e8d0c authored by Marcel Amirault's avatar Marcel Amirault

Merge branch '276200-docs-api-ci-devolpment-curl-double-quote' into 'master'

Docs: double quote cURL URLs in /doc/api/, /doc/ci/, and /doc/development/

See merge request gitlab-org/gitlab!49504
parents 17df19e5 2acae099
...@@ -138,7 +138,7 @@ Example request: ...@@ -138,7 +138,7 @@ Example request:
```shell ```shell
curl --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: <your_access_token>" \ curl --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: <your_access_token>" \
--data '{ "freeze_end": "0 8 * * 1" }' \ --data '{ "freeze_end": "0 8 * * 1" }' \
--request PUT https://gitlab.example.com/api/v4/projects/19/freeze_periods/1 --request PUT "https://gitlab.example.com/api/v4/projects/19/freeze_periods/1"
``` ```
Example response: Example response:
......
...@@ -26,7 +26,7 @@ Parameters: ...@@ -26,7 +26,7 @@ Parameters:
| `dashboard_path` | string | yes | URL-encoded path to file defining the dashboard which should be marked as favorite. | | `dashboard_path` | string | yes | URL-encoded path to file defining the dashboard which should be marked as favorite. |
```shell ```shell
curl --header 'Private-Token: <your_access_token>' https://gitlab.example.com/api/v4/projects/20/metrics/user_starred_dashboards \ curl --header 'Private-Token: <your_access_token>' "https://gitlab.example.com/api/v4/projects/20/metrics/user_starred_dashboards" \
--data-urlencode "dashboard_path=config/prometheus/dashboards/common_metrics.yml" --data-urlencode "dashboard_path=config/prometheus/dashboards/common_metrics.yml"
``` ```
...@@ -57,7 +57,7 @@ Parameters: ...@@ -57,7 +57,7 @@ Parameters:
| `dashboard_path` | string | no | URL-encoded path to file defining the dashboard which should no longer be marked as favorite. When not supplied, all dashboards within given projects are removed from favorites. | | `dashboard_path` | string | no | URL-encoded path to file defining the dashboard which should no longer be marked as favorite. When not supplied, all dashboards within given projects are removed from favorites. |
```shell ```shell
curl --request DELETE --header 'Private-Token: <your_access_token>' https://gitlab.example.com/api/v4/projects/20/metrics/user_starred_dashboards \ curl --request DELETE --header 'Private-Token: <your_access_token>' "https://gitlab.example.com/api/v4/projects/20/metrics/user_starred_dashboards" \
--data-urlencode "dashboard_path=config/prometheus/dashboards/common_metrics.yml" --data-urlencode "dashboard_path=config/prometheus/dashboards/common_metrics.yml"
``` ```
......
...@@ -110,7 +110,7 @@ To use GitLab CI/CD with a Bitbucket Cloud repository: ...@@ -110,7 +110,7 @@ To use GitLab CI/CD with a Bitbucket Cloud repository:
esac esac
echo "Pushing status to $BITBUCKET_STATUS_API..." echo "Pushing status to $BITBUCKET_STATUS_API..."
curl --request POST $BITBUCKET_STATUS_API \ curl --request POST "$BITBUCKET_STATUS_API" \
--user $BITBUCKET_USERNAME:$BITBUCKET_ACCESS_TOKEN \ --user $BITBUCKET_USERNAME:$BITBUCKET_ACCESS_TOKEN \
--header "Content-Type:application/json" \ --header "Content-Type:application/json" \
--silent \ --silent \
......
...@@ -417,7 +417,7 @@ RUN apt-get clean ...@@ -417,7 +417,7 @@ RUN apt-get clean
RUN docker-php-ext-install mcrypt pdo_mysql zip RUN docker-php-ext-install mcrypt pdo_mysql zip
# Install Composer # Install Composer
RUN curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN curl --silent --show-error "https://getcomposer.org/installer" | php -- --install-dir=/usr/local/bin --filename=composer
# Install Laravel Envoy # Install Laravel Envoy
RUN composer global require "laravel/envoy=~1.0" RUN composer global require "laravel/envoy=~1.0"
......
...@@ -56,7 +56,7 @@ apt-get update -yqq ...@@ -56,7 +56,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 --location --output /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
......
...@@ -56,7 +56,7 @@ and it creates a dependent pipeline relation visible on the ...@@ -56,7 +56,7 @@ and it creates a dependent pipeline relation visible on the
build_docs: build_docs:
stage: deploy stage: deploy
script: script:
- curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master https://gitlab.example.com/api/v4/projects/9/trigger/pipeline - curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master "https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"
only: only:
- tags - tags
``` ```
...@@ -143,7 +143,7 @@ By using cURL you can trigger a pipeline rerun with minimal effort, for example: ...@@ -143,7 +143,7 @@ By using cURL you can trigger a pipeline rerun with minimal effort, for example:
curl --request POST \ curl --request POST \
--form token=TOKEN \ --form token=TOKEN \
--form ref=master \ --form ref=master \
https://gitlab.example.com/api/v4/projects/9/trigger/pipeline "https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"
``` ```
In this case, the project with ID `9` gets rebuilt on `master` branch. In this case, the project with ID `9` gets rebuilt on `master` branch.
...@@ -244,7 +244,7 @@ curl --request POST \ ...@@ -244,7 +244,7 @@ curl --request POST \
--form token=TOKEN \ --form token=TOKEN \
--form ref=master \ --form ref=master \
--form "variables[UPLOAD_TO_S3]=true" \ --form "variables[UPLOAD_TO_S3]=true" \
https://gitlab.example.com/api/v4/projects/9/trigger/pipeline "https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"
``` ```
Trigger variables have the [highest priority](../variables/README.md#priority-of-environment-variables) Trigger variables have the [highest priority](../variables/README.md#priority-of-environment-variables)
...@@ -257,7 +257,7 @@ in conjunction with cron. The example below triggers a job on the `master` ...@@ -257,7 +257,7 @@ in conjunction with cron. The example below triggers a job 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`:
```shell ```shell
30 0 * * * curl --request POST --form token=TOKEN --form ref=master https://gitlab.example.com/api/v4/projects/9/trigger/pipeline 30 0 * * * curl --request POST --form token=TOKEN --form ref=master "https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"
``` ```
This behavior can also be achieved through GitLab's UI with This behavior can also be achieved through GitLab's UI with
......
...@@ -66,8 +66,8 @@ GET /-/chaos/leakmem?memory_mb=1024&duration_s=50&async=true ...@@ -66,8 +66,8 @@ GET /-/chaos/leakmem?memory_mb=1024&duration_s=50&async=true
| `async` | boolean | no | Set to true to leak memory in a Sidekiq background worker process | | `async` | boolean | no | Set to true to leak memory in a Sidekiq background worker process |
```shell ```shell
curl http://localhost:3000/-/chaos/leakmem?memory_mb=1024&duration_s=10 --header 'X-Chaos-Secret: secret' curl "http://localhost:3000/-/chaos/leakmem?memory_mb=1024&duration_s=10" --header 'X-Chaos-Secret: secret'
curl http://localhost:3000/-/chaos/leakmem?memory_mb=1024&duration_s=10&token=secret curl "http://localhost:3000/-/chaos/leakmem?memory_mb=1024&duration_s=10&token=secret"
``` ```
## CPU spin ## CPU spin
...@@ -89,8 +89,8 @@ GET /-/chaos/cpu_spin?duration_s=50&async=true ...@@ -89,8 +89,8 @@ GET /-/chaos/cpu_spin?duration_s=50&async=true
| `async` | boolean | no | Set to true to consume CPU in a Sidekiq background worker process | | `async` | boolean | no | Set to true to consume CPU in a Sidekiq background worker process |
```shell ```shell
curl http://localhost:3000/-/chaos/cpu_spin?duration_s=60 --header 'X-Chaos-Secret: secret' curl "http://localhost:3000/-/chaos/cpu_spin?duration_s=60" --header 'X-Chaos-Secret: secret'
curl http://localhost:3000/-/chaos/cpu_spin?duration_s=60&token=secret curl "http://localhost:3000/-/chaos/cpu_spin?duration_s=60&token=secret"
``` ```
## DB spin ## DB spin
...@@ -114,8 +114,8 @@ GET /-/chaos/db_spin?duration_s=50&async=true ...@@ -114,8 +114,8 @@ GET /-/chaos/db_spin?duration_s=50&async=true
| `async` | boolean | no | Set to true to perform the operation in a Sidekiq background worker process | | `async` | boolean | no | Set to true to perform the operation in a Sidekiq background worker process |
```shell ```shell
curl http://localhost:3000/-/chaos/db_spin?interval_s=1&duration_s=60 --header 'X-Chaos-Secret: secret' curl "http://localhost:3000/-/chaos/db_spin?interval_s=1&duration_s=60" --header 'X-Chaos-Secret: secret'
curl http://localhost:3000/-/chaos/db_spin?interval_s=1&duration_s=60&token=secret curl "http://localhost:3000/-/chaos/db_spin?interval_s=1&duration_s=60&token=secret"
``` ```
## Sleep ## Sleep
...@@ -136,8 +136,8 @@ GET /-/chaos/sleep?duration_s=50&async=true ...@@ -136,8 +136,8 @@ GET /-/chaos/sleep?duration_s=50&async=true
| `async` | boolean | no | Set to true to sleep in a Sidekiq background worker process | | `async` | boolean | no | Set to true to sleep in a Sidekiq background worker process |
```shell ```shell
curl http://localhost:3000/-/chaos/sleep?duration_s=60 --header 'X-Chaos-Secret: secret' curl "http://localhost:3000/-/chaos/sleep?duration_s=60" --header 'X-Chaos-Secret: secret'
curl http://localhost:3000/-/chaos/sleep?duration_s=60&token=secret curl "http://localhost:3000/-/chaos/sleep?duration_s=60&token=secret"
``` ```
## Kill ## Kill
...@@ -157,6 +157,6 @@ GET /-/chaos/kill?async=true ...@@ -157,6 +157,6 @@ GET /-/chaos/kill?async=true
| `async` | boolean | no | Set to true to kill a Sidekiq background worker process | | `async` | boolean | no | Set to true to kill a Sidekiq background worker process |
```shell ```shell
curl http://localhost:3000/-/chaos/kill --header 'X-Chaos-Secret: secret' curl "http://localhost:3000/-/chaos/kill" --header 'X-Chaos-Secret: secret'
curl http://localhost:3000/-/chaos/kill?token=secret curl "http://localhost:3000/-/chaos/kill?token=secret"
``` ```
...@@ -345,7 +345,7 @@ the integration by using GDK: ...@@ -345,7 +345,7 @@ the integration by using GDK:
1. Check that the list of current metrics has the new counter for the feature flag: 1. Check that the list of current metrics has the new counter for the feature flag:
```shell ```shell
curl --silent http://localhost:9236/metrics | grep go_find_all_tags curl --silent "http://localhost:9236/metrics" | grep go_find_all_tags
``` ```
1. Once you observe the metrics for the new feature flag and it increments, you 1. Once you observe the metrics for the new feature flag and it increments, you
...@@ -375,5 +375,5 @@ the integration by using GDK: ...@@ -375,5 +375,5 @@ the integration by using GDK:
1. Verify the feature is on by observing the metrics for it: 1. Verify the feature is on by observing the metrics for it:
```shell ```shell
curl --silent http://localhost:9236/metrics | grep go_find_all_tags curl --silent "http://localhost:9236/metrics" | grep go_find_all_tags
``` ```
...@@ -60,7 +60,7 @@ POST /internal/allowed ...@@ -60,7 +60,7 @@ POST /internal/allowed
Example request: Example request:
```shell ```shell
curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded token>" --data "key_id=11&project=gnuwget/wget2&action=git-upload-pack&protocol=ssh" http://localhost:3001/api/v4/internal/allowed curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded token>" --data "key_id=11&project=gnuwget/wget2&action=git-upload-pack&protocol=ssh" "http://localhost:3001/api/v4/internal/allowed"
``` ```
Example response: Example response:
...@@ -108,7 +108,7 @@ information for LFS clients when the repository is accessed over SSH. ...@@ -108,7 +108,7 @@ information for LFS clients when the repository is accessed over SSH.
Example request: Example request:
```shell ```shell
curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded token>" --data "key_id=11&project=gnuwget/wget2" http://localhost:3001/api/v4/internal/lfs_authenticate curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded token>" --data "key_id=11&project=gnuwget/wget2" "http://localhost:3001/api/v4/internal/lfs_authenticate"
``` ```
```json ```json
...@@ -141,7 +141,7 @@ GET /internal/authorized_keys ...@@ -141,7 +141,7 @@ GET /internal/authorized_keys
Example request: Example request:
```shell ```shell
curl --request GET --header "Gitlab-Shared-Secret: <Base64 encoded secret>""http://localhost:3001/api/v4/internal/authorized_keys?key=<key as passed by OpenSSH>" curl --request GET --header "Gitlab-Shared-Secret: <Base64 encoded secret>" "http://localhost:3001/api/v4/internal/authorized_keys?key=<key as passed by OpenSSH>"
``` ```
Example response: Example response:
...@@ -242,7 +242,7 @@ GET /internal/two_factor_recovery_codes ...@@ -242,7 +242,7 @@ GET /internal/two_factor_recovery_codes
Example request: Example request:
```shell ```shell
curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --data "key_id=7" http://localhost:3001/api/v4/internal/two_factor_recovery_codes curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --data "key_id=7" "http://localhost:3001/api/v4/internal/two_factor_recovery_codes"
``` ```
Example response: Example response:
...@@ -289,7 +289,7 @@ POST /internal/personal_access_token ...@@ -289,7 +289,7 @@ POST /internal/personal_access_token
Example request: Example request:
```shell ```shell
curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --data "user_id=29&name=mytokenname&scopes[]=read_user&scopes[]=read_repository&expires_at=2020-07-24" http://localhost:3001/api/v4/internal/personal_access_token curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --data "user_id=29&name=mytokenname&scopes[]=read_user&scopes[]=read_repository&expires_at=2020-07-24" "http://localhost:3001/api/v4/internal/personal_access_token"
``` ```
Example response: Example response:
...@@ -323,7 +323,7 @@ POST /internal/pre_receive ...@@ -323,7 +323,7 @@ POST /internal/pre_receive
Example request: Example request:
```shell ```shell
curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --data "gl_repository=project-7" http://localhost:3001/api/v4/internal/pre_receive curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --data "gl_repository=project-7" "http://localhost:3001/api/v4/internal/pre_receive"
``` ```
Example response: Example response:
...@@ -355,7 +355,7 @@ POST /internal/post_receive ...@@ -355,7 +355,7 @@ POST /internal/post_receive
Example Request: Example Request:
```shell ```shell
curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --data "gl_repository=project-7" --data "identifier=user-1" --data "changes=0000000000000000000000000000000000000000 fd9e76b9136bdd9fe217061b497745792fe5a5ee gh-pages\n" http://localhost:3001/api/v4/internal/post_receive curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --data "gl_repository=project-7" --data "identifier=user-1" --data "changes=0000000000000000000000000000000000000000 fd9e76b9136bdd9fe217061b497745792fe5a5ee gh-pages\n" "http://localhost:3001/api/v4/internal/post_receive"
``` ```
Example response: Example response:
......
...@@ -30,7 +30,7 @@ brew install pyenv ...@@ -30,7 +30,7 @@ brew install pyenv
To install `pyenv` on Linux, you can run the command below: To install `pyenv` on Linux, you can run the command below:
```shell ```shell
curl https://pyenv.run | bash curl "https://pyenv.run" | bash
``` ```
Alternatively, you may find `pyenv` available as a system package via your distro package manager. Alternatively, you may find `pyenv` available as a system package via your distro package manager.
......
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