summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-13 18:02:42 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-13 18:02:42 +0300
commita7345e368a92396c04e9cd8d1a9c1ed2ed50d15e (patch)
treefae0d629d239c1ca860ef95de12a15b23343ee60 /doc/api
parentae564c97d48bf728745c57720734cb40378fd90f (diff)
downloadgitlab-ce-a7345e368a92396c04e9cd8d1a9c1ed2ed50d15e.tar.gz
Fix gravatar size and update docs for new users API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/users.md53
1 files changed, 53 insertions, 0 deletions
diff --git a/doc/api/users.md b/doc/api/users.md
index 94af37629ff..4ddbf739774 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -6,6 +6,34 @@ Get a list of users.
This function takes pagination parameters `page` and `per_page` to restrict the list of users.
+### For normal users:
+
+```
+GET /users
+```
+
+```json
+[
+ {
+ "id": 1,
+ "username": "john_smith",
+ "name": "John Smith",
+ "state": "active",
+ "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
+ },
+ {
+ "id": 2,
+ "username": "jack_smith",
+ "name": "Jack Smith",
+ "state": "blocked",
+ "avatar_url": "http://gravatar.com/../e32131cd8.jpeg",
+ }
+]
+```
+
+
+### For admins:
+
```
GET /users
```
@@ -29,6 +57,7 @@ GET /users
"theme_id": 1,
"color_scheme_id": 2,
"is_admin": false,
+ "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
"can_create_group": true
},
{
@@ -48,6 +77,7 @@ GET /users
"theme_id": 1,
"color_scheme_id": 3,
"is_admin": false,
+ "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
"can_create_group": true,
"can_create_project": true
}
@@ -62,6 +92,29 @@ Also see `def search query` in `app/models/user.rb`.
Get a single user.
+#### For user:
+
+```
+GET /users/:id
+```
+
+Parameters:
+
+- `id` (required) - The ID of a user
+
+```json
+{
+ "id": 1,
+ "username": "john_smith",
+ "name": "John Smith",
+ "state": "active",
+ "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
+}
+```
+
+
+#### For admin:
+
```
GET /users/:id
```