From 9aafe77e708174aac697a8dcafc99b90e96be36e Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 20 Sep 2012 17:44:44 +0300 Subject: I want be able to get token via api. Used for mobile applications --- doc/api/README.md | 1 + doc/api/session.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 doc/api/session.md (limited to 'doc/api') 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 +} +``` -- cgit v1.2.1