diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 00:09:08 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 00:09:08 +0000 |
commit | f54a50aa826d0eedcf2e56f51462613bc132f826 (patch) | |
tree | 7194aca23f9af822ea55966a6f477b3d8d68ee47 /doc/api/project_aliases.md | |
parent | c77fda905a8619b756163c10a75171dc9cfe7084 (diff) | |
download | gitlab-ce-f54a50aa826d0eedcf2e56f51462613bc132f826.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/project_aliases.md')
-rw-r--r-- | doc/api/project_aliases.md | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/api/project_aliases.md b/doc/api/project_aliases.md index da8d7600c7c..59c0ffee76d 100644 --- a/doc/api/project_aliases.md +++ b/doc/api/project_aliases.md @@ -8,11 +8,11 @@ All methods require administrator authorization. Get a list of all project aliases: -``` +```plaintext GET /project_aliases ``` -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" ``` @@ -37,7 +37,7 @@ Example response: Get details of a project alias: -``` +```plaintext GET /project_aliases/:name ``` @@ -45,7 +45,7 @@ GET /project_aliases/:name |-----------|--------|----------|-----------------------| | `name` | string | yes | The name of the alias | -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases/gitlab" ``` @@ -64,7 +64,7 @@ Example response: Add a new alias for a project. Responds with a 201 when successful, 400 when there are validation errors (e.g. alias already exists): -``` +```plaintext POST /project_aliases ``` @@ -73,13 +73,13 @@ POST /project_aliases | `project_id` | integer/string | yes | The ID or path of the project. | | `name` | string | yes | The name of the alias. Must be unique. | -``` +```shell curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=1" --form "name=gitlab" ``` or -``` +```shell curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=gitlab-org/gitlab" --form "name=gitlab" ``` @@ -98,7 +98,7 @@ Example response: Removes a project aliases. Responds with a 204 when project alias exists, 404 when it doesn't: -``` +```plaintext DELETE /project_aliases/:name ``` @@ -106,6 +106,6 @@ DELETE /project_aliases/:name |-----------|--------|----------|-----------------------| | `name` | string | yes | The name of the alias | -``` +```shell curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases/gitlab" ``` |