FORMAT: 1A
认证授权
- Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": { "roles": { "suadmin": "超级管理员" }, "perms": { "/qrlogin/*": "/qrlogin/*" } }, "errors": null, "code": 0 }
-
-
Request (application/json)
-
Body
{ "username": "demo", "password": "testpw" }
-
-
Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjEwODo4MDc3L2FwaS9sb2dpbiIsImlhdCI6MTQ4OTU2MzEyOCwiZXhwIjoxNDg5NTY2NzI4LCJuYmYiOjE0ODk1NjMxMjgsImp0aSI6IlBwR3VyY2hqT2cyb3RhV3YiLCJzdWIiOjEsInVzZXIiOnsiaWQiOjF9fQ.8BdtuyTS9oOiEOIJNnwKvbLIDpJ2Rr8aWqp8FPYvl04", "user": { "name": "测试姓名", "username": "demo" } }, "errors": null, "code": 0 }
-
- Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": { "expires": "60", "nonce": "HVaCH2KVNQrgvY5AxegKIcMPknCf6Qcs", "url": "http://xxx.xxx/xx.x/" }, "errors": null, "code": 0 }
-
-
Request (application/json)
-
Body
{ "nonce": "HVaCH2KVNQrgvY5AxegKIcMPknCf6Qcs" }
-
-
Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": null, "errors": { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjEwODo4MDc3L2FwaS9sb2dpbiIsImlhdCI6MTQ4OTU2MzEyOCwiZXhwIjoxNDg5NTY2NzI4LCJuYmYiOjE0ODk1NjMxMjgsImp0aSI6IlBwR3VyY2hqT2cyb3RhV3YiLCJzdWIiOjEsInVzZXIiOnsiaWQiOjF9fQ.8BdtuyTS9oOiEOIJNnwKvbLIDpJ2Rr8aWqp8FPYvl04", "user": { "name": "测试姓名", "username": "demo" } }, "code": 0 }
-
-
Request (application/json)
-
Body
{ "code": "fafdcfac7e502ed2d008c52bf46abc67" }
-
-
Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": { "total": 150, "per_page": 15, "current_page": 1, "last_page": 10, "next_page_url": "http:\/\/...", "prev_page_url": null, "from": 1, "to": 15, "data": { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjEwODo4MDc3L2FwaS9sb2dpbiIsImlhdCI6MTQ4OTU2MzEyOCwiZXhwIjoxNDg5NTY2NzI4LCJuYmYiOjE0ODk1NjMxMjgsImp0aSI6IlBwR3VyY2hqT2cyb3RhV3YiLCJzdWIiOjEsInVzZXIiOnsiaWQiOjF9fQ.8BdtuyTS9oOiEOIJNnwKvbLIDpJ2Rr8aWqp8FPYvl04", "user": { "name": "测试姓名", "username": "demo" } } }, "errors": null, "code": 0 }
-
-
Request (application/json)
-
Body
{ "nonce": "HVaCH2KVNQrgvY5AxegKIcMPknCf6Qcs", "login": true }
-
-
Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjEwODo4MDc3L2FwaS9sb2dpbiIsImlhdCI6MTQ4OTU2MzEyOCwiZXhwIjoxNDg5NTY2NzI4LCJuYmYiOjE0ODk1NjMxMjgsImp0aSI6IlBwR3VyY2hqT2cyb3RhV3YiLCJzdWIiOjEsInVzZXIiOnsiaWQiOjF9fQ.8BdtuyTS9oOiEOIJNnwKvbLIDpJ2Rr8aWqp8FPYvl04", "user": { "name": "测试姓名", "username": "demo" } }, "errors": null, "code": 0 }
-
文件上传下载
- Response 200 (application/json)
-
Request (application/json)
-
Body
{ "file": "file....", "tag": "tag", "title": "title", "comment": "comment" }
-
-
Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": { "id": "58d1dea704f80a5250007ab3", "tag": "hhhtag", "title": "kkktitle", "comment": "kkkcomment", "name": "TIM截图20170317154115.png", "mime": "image/png", "size": 35640 }, "errors": null, "code": 0 }
-
用户
- Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": null, "errors": null, "code": 0 }
-
search 参数可以搜索 name,username,mobile,email [GET /api/users{?page=1&search=管理员}]
- Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": { "total": 150, "per_page": 15, "current_page": 1, "last_page": 10, "next_page_url": "http:\/\/...", "prev_page_url": null, "from": 1, "to": 15, "data": [ { "created_at": "2017-03-14 20:42:26", "departments": "{}", "email": null, "id": 1, "info": "{}", "mobile": "", "name": "超级管理员", "status": 0, "updated_at": "2017-03-14 20:42:49", "username": "suadmin" } ] }, "errors": null, "code": 0 }
-
-
Request (application/json)
-
Body
{ "message": "测试消息" }
-
-
Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": null, "errors": null, "code": 0 }
-
RBAC
- Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": [ { "id": 1, "name": "suadmin", "display_name": "超级管理员", "description": "suadmin", "created_at": "2017-03-16 11:14:14", "updated_at": "2017-03-16 11:14:14" } ], "errors": null, "code": 0 }
-
-
Request (application/json)
-
Body
{ "name": "角色名", "display": "显示名字", "description": "描述" }
-
-
Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": null, "errors": null, "code": 0 }
-
- Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": null, "errors": null, "code": 0 }
-
-
Request (application/json)
-
Body
{ "username": "admin", "rolenames": [ "admin", "user" ] }
-
-
Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": null, "errors": null, "code": 0 }
-
- Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": [ { "id": 1, "name": "suadmin", "display_name": "超级管理员", "description": "suadmin", "created_at": "2017-03-16 11:14:14", "updated_at": "2017-03-16 11:14:14", "pivot": { "user_id": 1, "role_id": 1 } } ], "errors": null, "code": 0 }
-
- Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": { "total": 150, "per_page": 15, "current_page": 1, "last_page": 10, "next_page_url": "http:\/\/...", "prev_page_url": null, "from": 1, "to": 15, "data": [ { "created_at": "2017-03-14 20:42:26", "departments": "{}", "email": null, "id": 1, "info": "{}", "mobile": "", "name": "超级管理员", "status": 0, "updated_at": "2017-03-14 20:42:49", "username": "suadmin" } ] }, "errors": null, "code": 0 }
-
部门管理
- Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "..." }
-
- Response 200 (application/json)
-
Body
{ "status": "ok|error", "message": "...", "data": { "total": 150, "per_page": 15, "current_page": 1, "last_page": 10, "next_page_url": "http:\/\/...", "prev_page_url": null, "from": 1, "to": 15, "data": [ { "created_at": "2017-03-14 20:42:26", "departments": "{}", "email": null, "id": 1, "info": "{}", "mobile": "", "name": "超级管理员", "status": 0, "updated_at": "2017-03-14 20:42:49", "username": "suadmin" } ] }, "errors": null, "code": 0 }
-