Commit b31cebed authored by Marcia Ramos's avatar Marcia Ramos

Merge branch '3264-update-project-aliases-api-docs' into 'master'

Update Project Aliases API documentation

See merge request gitlab-org/gitlab-ce!30288
parents 2ca9bda4 96f9f86c
...@@ -68,13 +68,19 @@ Add a new alias for a project. Responds with a 201 when successful, ...@@ -68,13 +68,19 @@ Add a new alias for a project. Responds with a 201 when successful,
POST /project_aliases POST /project_aliases
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|--------------|--------|----------|-----------------------------------------------| |--------------|----------------|----------|----------------------------------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. | | `project_id` | integer/string | yes | The ID or path of the project. |
| `name` | string | yes | The name of the alias. Must be unique. | | `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: Example response:
......
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