diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-09-20 17:44:44 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-09-20 17:45:07 +0300 |
commit | 9aafe77e708174aac697a8dcafc99b90e96be36e (patch) | |
tree | cb22fddcf3feeefb381a3ded1407ef11767395b5 /doc/api | |
parent | 37817cc31d890f1e79b31ae3d625fbace672451e (diff) | |
download | gitlab-ce-9aafe77e708174aac697a8dcafc99b90e96be36e.tar.gz |
I want be able to get token via api. Used for mobile applications
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/README.md | 1 | ||||
-rw-r--r-- | doc/api/session.md | 22 |
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 +} +``` |