Skip to content

Commit 2b3e64a

Browse files
committed
Clean up namespaces API documentation
[ci skip]
1 parent ddc8b91 commit 2b3e64a

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

doc/api/namespaces.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
# Namespaces
22

3-
Namespaces account for usernames and groupnames.
3+
Usernames and groupnames fall under a special category called namespaces.
4+
5+
For users and groups supported API calls see the [users](users.md) and
6+
[groups](groups.md) documentation respectively.
47

58
[Pagination](README.md#pagination) is used.
69

710
## List namespaces
811

9-
Get a list of namespaces. As a user, your namespaces are listed whereas if you
10-
are an administrator you get a list of all namespaces in the GitLab instance.
12+
Get a list of the namespaces of the authenticated user. If the user is an
13+
administrator, a list of all namespaces in the GitLab instance is shown.
1114

1215
```
1316
GET /namespaces
1417
```
1518

19+
Example request:
20+
1621
```bash
1722
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/namespaces
1823
```
1924

25+
Example response:
26+
2027
```json
2128
[
2229
{
@@ -44,10 +51,14 @@ GET /namespaces?search=foobar
4451
| --------- | ---- | -------- | ----------- |
4552
| `search` | string | no | Returns a list of namespaces the user is authorized to see based on the search criteria |
4653

54+
Example request:
55+
4756
```bash
4857
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/namespaces?search=twitter
4958
```
5059

60+
Example response:
61+
5162
```json
5263
[
5364
{

0 commit comments

Comments
 (0)