diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-19 21:09:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-19 21:09:09 +0300 |
commit | 6463521e08b00e62d3c877aefd8517f5387d54ab (patch) | |
tree | 1e9c49e6a7cd0e926d32f81c92604cd03ee57fac /doc/api/namespaces.md | |
parent | 6a3c4476fa8f1c686eadbed05262bce95504ffa7 (diff) |
Add latest changes from gitlab-org/gitlab@master
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" + ] +} +``` |