summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/api/README.md1
-rw-r--r--doc/api/session.md22
2 files changed, 23 insertions, 0 deletions
diff --git a/doc/api/README.md b/doc/api/README.md
index 9741072c095..443ec7bf1ca 100644
--- a/doc/api/README.md
+++ b/doc/api/README.md
@@ -30,6 +30,7 @@ When listing resources you can pass the following parameters:
## Contents
+ [Users](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/users.md)
++ [Session](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/session.md)
+ [Projects](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/projects.md)
+ [Snippets](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/snippets.md)
+ [Issues](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/issues.md)
diff --git a/doc/api/session.md b/doc/api/session.md
new file mode 100644
index 00000000000..9fdbeb439a4
--- /dev/null
+++ b/doc/api/session.md
@@ -0,0 +1,22 @@
+Login to get private token
+
+```
+POST /session
+```
+
+Parameters:
+
++ `email` (required) - The email of user
++ `password` (required) - Valid password
+
+
+```json
+{
+ "id": 1,
+ "email": "john@example.com",
+ "name": "John Smith",
+ "private_token": "dd34asd13as",
+ "created_at": "2012-05-23T08:00:58Z",
+ "blocked": true
+}
+```