跳板机管理平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

169 lines
1.9 KiB

5 years ago
  1. # 跳板机web管理协议
  2. #### 登录 post@/login
  3. Param:
  4. - username
  5. - password
  6. Resp:
  7. ```
  8. {msg: "", code: 200, user: "", sessionkey:""}
  9. ```
  10. #### 用户列表 get/post @ /jump/users
  11. Resp:
  12. ```json
  13. [[1, "cinder", 0, 0, "fuck you", "2020-04-01 15:00:22"], [2, "chenguang", 0, 0, "fuck you", "2020-04-01 15:28:17"]]
  14. ```
  15. #### 添加用户 get/post @ /jump/user/add
  16. Param:
  17. - name
  18. - desc
  19. Resp:
  20. ​ string message
  21. #### 删除用户 get/post @ /jump/user/del
  22. Param:
  23. * name
  24. Resp:
  25. ​ string message
  26. #### 修改用户 get/post @ /jump/user/modify
  27. Param:
  28. - username
  29. - sudo
  30. - desc
  31. Resp:
  32. ​ string message
  33. #### 主机列表 get/post @ /jump/hosts
  34. Resp:
  35. ```json
  36. [[1, "ckqas129", "192.168.1.129", 22, 0, "php develop server", "2020-04-01 15:00:29"]]
  37. ```
  38. #### 添加主机 get/post @ /jump/host/add
  39. Param:
  40. - name
  41. - host
  42. - port
  43. - desc
  44. Resp:
  45. ​ string message
  46. #### 删除主机 get/post @ /jump/host/del
  47. Param:
  48. - name
  49. - host
  50. Resp:
  51. ​ string message
  52. #### 添加主机用户 get/post @ /jump/host/adduser
  53. Param:
  54. - hostname
  55. - username
  56. Resp:
  57. ​ string message
  58. #### 删除主机用户 get/post @ /jump/host/deluser
  59. Param:
  60. - hostname
  61. - username
  62. Resp:
  63. ​ string message
  64. #### 修改主机用户 get/post @ /jump/host/modifyuser
  65. Param:
  66. - hostname
  67. - username
  68. - sudo
  69. - desc
  70. Resp:
  71. ​ string message
  72. #### 获取主机上的用户列表 get/post @ /jump/host/users
  73. Param:
  74. - hostname
  75. Resp:
  76. ```json
  77. [{"id": 1, "username": "daniel", "sudo": 1, "ctime": "2020-04-01 15:00:29"}, {"id": 2, "username": "cinder", "sudo": 0, "ctime": "2020-04-01 15:00:37"}]
  78. ```
  79. #### 获取所有主机上的用户列表 get/post @ /jump/hostuser
  80. Resp:
  81. ```json
  82. [{"id": 1, "hostname": "ckqas129", "username": "daniel", "sudo": 1, "ctime": "2020-04-01 15:00:29"}, {"id": 2, "hostname": "ckqas129", "username": "cinder", "sudo": 0, "ctime": "2020-04-01 15:00:37"}]
  83. ```