跳板机管理平台
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.

171 lines
1.9 KiB

5 years ago
5 years ago
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. - password(可选)
  30. - sudo
  31. - desc
  32. Resp:
  33. ​ string message
  34. #### 主机列表 get/post @ /jump/hosts
  35. Resp:
  36. ```json
  37. [[1, "ckqas129", "192.168.1.129", 22, 0, "php develop server", "2020-04-01 15:00:29"]]
  38. ```
  39. #### 添加主机 get/post @ /jump/host/add
  40. Param:
  41. - name
  42. - host
  43. - port
  44. - desc
  45. Resp:
  46. ​ string message
  47. #### 删除主机 get/post @ /jump/host/del
  48. Param:
  49. - name
  50. - host
  51. Resp:
  52. ​ string message
  53. #### 添加主机用户 get/post @ /jump/host/adduser
  54. Param:
  55. - hostname
  56. - username
  57. Resp:
  58. ​ string message
  59. #### 删除主机用户 get/post @ /jump/host/deluser
  60. Param:
  61. - hostname
  62. - username
  63. Resp:
  64. ​ string message
  65. #### 修改主机用户 get/post @ /jump/host/modifyuser
  66. Param:
  67. - hostname
  68. - username
  69. - password(可选)
  70. - sudo
  71. - desc
  72. Resp:
  73. ​ string message
  74. #### 获取主机上的用户列表 get/post @ /jump/host/users
  75. Param:
  76. - hostname
  77. Resp:
  78. ```json
  79. [{"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"}]
  80. ```
  81. #### 获取所有主机上的用户列表 get/post @ /jump/hostuser
  82. Resp:
  83. ```json
  84. [{"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"}]
  85. ```