forked from TruthHun/BookStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate_api.html
More file actions
73 lines (50 loc) · 1.22 KB
/
template_api.html
File metadata and controls
73 lines (50 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
[TOC]
## 简要描述
- 用户登录接口
## 接口版本
|版本号|制定人|制定日期|修订日期|
|:---- |:---|:----- |----- |
|2.1.0 |秦亮 |2017-03-20 | xxxx-xx-xx |
## 请求URL:
- http://xx.com/api/login
## 请求方式:
- GET
- POST
## 请求头:
|参数名|是否必须|类型|说明|
|:---- |:---|:----- |----- |
|Content-Type |是 |string |请求类型: application/json |
|Content-MD5 |是 |string | 请求内容签名 |
## 请求参数:
|参数名|是否必须|类型|说明|
|:---- |:---|:----- |----- |
|username |是 |string |用户名 |
|password |是 |string | 密码 |
## 返回示例:
**正确时返回:**
```
{
"errcode": 0,
"data": {
"uid": "1",
"account": "admin",
"nickname": "Minho",
"group_level": 0 ,
"create_time": "1436864169",
"last_login_time": "0",
}
}
```
**错误时返回:**
```
{
"errcode": 500,
"errmsg": "invalid appid"
}
```
## 返回参数说明:
|参数名|类型|说明|
|:----- |:-----|----- |
|group_level |int |用户组id,1:超级管理员;2:普通用户 |
## 备注:
- 更多返回错误代码请看首页的错误代码描述