File tree 1 file changed +14
-3
lines changed
1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Namespaces
2
2
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.
4
7
5
8
[ Pagination] ( README.md#pagination ) is used.
6
9
7
10
## List namespaces
8
11
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 .
11
14
12
15
```
13
16
GET /namespaces
14
17
```
15
18
19
+ Example request:
20
+
16
21
``` bash
17
22
curl -H " PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/namespaces
18
23
```
19
24
25
+ Example response:
26
+
20
27
``` json
21
28
[
22
29
{
@@ -44,10 +51,14 @@ GET /namespaces?search=foobar
44
51
| --------- | ---- | -------- | ----------- |
45
52
| ` search ` | string | no | Returns a list of namespaces the user is authorized to see based on the search criteria |
46
53
54
+ Example request:
55
+
47
56
``` bash
48
57
curl -H " PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/namespaces? search=twitter
49
58
```
50
59
60
+ Example response:
61
+
51
62
``` json
52
63
[
53
64
{
You can’t perform that action at this time.
0 commit comments