diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-30 00:10:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-30 00:10:10 +0300 |
commit | e4df6a7c53ab6e9dd6d63516ca9e0ad143cfa17a (patch) | |
tree | 7a4b5a3a99f19f8610df164e9e5cdd4a461d1465 /doc/api/namespaces.md | |
parent | 13592f8455bfd17acd7cb10ccea015e3b63c155d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/namespaces.md')
-rw-r--r-- | doc/api/namespaces.md | 49 |
1 files changed, 7 insertions, 42 deletions
diff --git a/doc/api/namespaces.md b/doc/api/namespaces.md index e6ad855f62f..03aefaf4380 100644 --- a/doc/api/namespaces.md +++ b/doc/api/namespaces.md @@ -21,8 +21,15 @@ administrator, a list of all namespaces in the GitLab instance is shown. ```plaintext GET /namespaces +GET /namespaces?search=foobar +GET /namespaces?owned_only=true ``` +| Attribute | Type | Required | Description | +| ------------ | ------- | -------- | ----------- | +| `search` | string | no | Returns a list of namespaces the user is authorized to view based on the search criteria | +| `owned_only` | boolean | no | In GitLab 14.2 and later, returns a list of owned namespaces only | + Example request: ```shell @@ -116,48 +123,6 @@ once a day. NOTE: Only group owners are presented with `members_count_with_descendants` and `plan`. -## Search for namespace - -Get all namespaces that match a string in their name or path. - -```plaintext -GET /namespaces?search=foobar -``` - -| Attribute | Type | Required | Description | -| --------- | ------ | -------- | ----------- | -| `search` | string | no | Returns a list of namespaces the user is authorized to see based on the search criteria | - -Example request: - -```shell -curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/namespaces?search=twitter" -``` - -Example response: - -```json -[ - { - "id": 4, - "name": "twitter", - "path": "twitter", - "kind": "group", - "full_path": "twitter", - "parent_id": null, - "avatar_url": null, - "web_url": "https://gitlab.example.com/groups/twitter", - "members_count_with_descendants": 2, - "billable_members_count": 2, - "max_seats_used": 0, - "seats_in_use": 0, - "plan": "default", - "trial_ends_on": null, - "trial": false - } -] -``` - ## Get namespace by ID Get a namespace by ID. |