diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
commit | 9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch) | |
tree | 70467ae3692a0e35e5ea56bcb803eb512a10bedb /doc/api/namespaces.md | |
parent | 4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff) |
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'doc/api/namespaces.md')
-rw-r--r-- | doc/api/namespaces.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/api/namespaces.md b/doc/api/namespaces.md index a89e91f82e5..c3e88532430 100644 --- a/doc/api/namespaces.md +++ b/doc/api/namespaces.md @@ -225,3 +225,33 @@ Example response: "trial": false } ``` + +## Get existence of a namespace + +Get existence of a namespace by path. Suggests a new namespace path that does not already exist. + +```plaintext +GET /namespaces/:namespace/exists +``` + +| Attribute | Type | Required | Description | +| ----------- | ------- | -------- | ----------- | +| `namespace` | string | yes | Namespace's path. | +| `parent_id` | integer | no | The ID of the parent namespace. If no ID is specified, only top-level namespaces are considered. | + +Example request: + +```shell +curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/namespaces/my-group/exists?parent_id=1" +``` + +Example response: + +```json +{ + "exists": true, + "suggests": [ + "my-group1" + ] +} +``` |