diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-07-05 06:57:45 -0700 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-07-05 06:57:45 -0700 |
commit | f086676b7c02dc9958fa9c7f6135142523f65bfc (patch) | |
tree | c737221ea51a911aef40ce93e57c1fe0efa22ef5 /doc/api/users.md | |
parent | 5f38f67247786988c8fa1d86fe0afdd411360b27 (diff) | |
download | gitlab-ce-f086676b7c02dc9958fa9c7f6135142523f65bfc.tar.gz |
add docs for existing API
Diffstat (limited to 'doc/api/users.md')
-rw-r--r-- | doc/api/users.md | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/doc/api/users.md b/doc/api/users.md new file mode 100644 index 00000000000..b9b04dc5399 --- /dev/null +++ b/doc/api/users.md @@ -0,0 +1,90 @@ +## List users + +Get a list of users. + +``` +GET /users +``` + +```json +[ + { + "id": 1, + "email": "john@example.com", + "name": "John Smith", + "blocked": false, + "created_at": "2012-05-23T08:00:58Z", + "bio": null, + "skype": "", + "linkedin": "", + "twitter": "", + "dark_scheme": false, + "theme_id": 1 + }, + { + "id": 2, + "email": "jack@example.com", + "name": "Jack Smith", + "blocked": false, + "created_at": "2012-05-23T08:01:01Z", + "bio": null, + "skype": "", + "linkedin": "", + "twitter": "", + "dark_scheme": true, + "theme_id": 1 + } +] +``` + +## Single user + +Get a single user. + +``` +GET /users/:id +``` + +Parameters: + ++ `id` (required) - The ID of a user + +```json +{ + "id": 1, + "email": "john@example.com", + "name": "John Smith", + "blocked": false, + "created_at": "2012-05-23T08:00:58Z", + "bio": null, + "skype": "", + "linkedin": "", + "twitter": "", + "dark_scheme": false, + "theme_id": 1 +} +``` + +## Current user + +Get currently authenticated user. + +``` +GET /user +``` + +```json +{ + "id": 1, + "email": "john@example.com", + "name": "John Smith", + "blocked": false, + "created_at": "2012-05-23T08:00:58Z", + "bio": null, + "skype": "", + "linkedin": "", + "twitter": "", + "dark_scheme": false, + "theme_id": 1 +} +``` |