Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorMarcia Ramos <marcia@gitlab.com>2019-07-03 13:32:02 +0300
committerMarcia Ramos <marcia@gitlab.com>2019-07-03 13:32:02 +0300
commitb31cebed2ed555b90552032b50de1f854e4b0b08 (patch)
tree36cb4a2233de5529123fb0efe9906f84bbc2c418 /doc/api
parent2ca9bda400c0ed647c3ef342dcc0aa56c558cebe (diff)
parent96f9f86c92d6e6db9f51762fa09efa1159610bd8 (diff)
Merge branch '3264-update-project-aliases-api-docs' into 'master'
Update Project Aliases API documentation See merge request gitlab-org/gitlab-ce!30288
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/project_aliases.md16
1 files changed, 11 insertions, 5 deletions
diff --git a/doc/api/project_aliases.md b/doc/api/project_aliases.md
index 65845579409..76343b4cd82 100644
--- a/doc/api/project_aliases.md
+++ b/doc/api/project_aliases.md
@@ -68,13 +68,19 @@ Add a new alias for a project. Responds with a 201 when successful,
POST /project_aliases
```
-| Attribute | Type | Required | Description |
-|--------------|--------|----------|-----------------------------------------------|
-| `project_id` | string | yes | The ID or URL-encoded path of the project. |
-| `name` | string | yes | The name of the alias. Must be unique. |
+| Attribute | Type | Required | Description |
+|--------------|----------------|----------|----------------------------------------|
+| `project_id` | integer/string | yes | The ID or path of the project. |
+| `name` | string | yes | The name of the alias. Must be unique. |
```
-curl --request POST "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=gitlab-org%2Fgitlab-ee" --form "name=gitlab-ee"
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=1" --form "name=gitlab-ee"
+```
+
+or
+
+```
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=gitlab-org/gitlab-ee" --form "name=gitlab-ee"
```
Example response: