Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2012-09-20 18:44:44 +0400
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2012-09-20 18:45:07 +0400
commit9aafe77e708174aac697a8dcafc99b90e96be36e (patch)
treecb22fddcf3feeefb381a3ded1407ef11767395b5 /doc/api
parent37817cc31d890f1e79b31ae3d625fbace672451e (diff)
I want be able to get token via api. Used for mobile applications
Diffstat (limited to 'doc/api')
-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
+}
+```