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

1.9 KiB

跳板机web管理协议

登录 post@/login

Param:

  • username
  • password

Resp:

 {msg: "", code: 200, user: "", sessionkey:""}

用户列表 get/post @ /jump/users

Resp:

[[1, "cinder", 0, 0, "fuck you", "2020-04-01 15:00:22"], [2, "chenguang", 0, 0, "fuck you", "2020-04-01 15:28:17"]]

添加用户 get/post @ /jump/user/add

Param:

  • name
  • desc

Resp:

​ string message

删除用户 get/post @ /jump/user/del

Param:

  • name

Resp:

​ string message

修改用户 get/post @ /jump/user/modify

Param:

  • username
  • password(可选)
  • sudo
  • desc

Resp:

​ string message

主机列表 get/post @ /jump/hosts

Resp:

[[1, "ckqas129", "192.168.1.129", 22, 0, "php develop server", "2020-04-01 15:00:29"]]

添加主机 get/post @ /jump/host/add

Param:

  • name
  • host
  • port
  • desc

Resp:

​ string message

删除主机 get/post @ /jump/host/del

Param:

  • name
  • host

Resp:

​ string message

添加主机用户 get/post @ /jump/host/adduser

Param:

  • hostname
  • username

Resp:

​ string message

删除主机用户 get/post @ /jump/host/deluser

Param:

  • hostname
  • username

Resp:

​ string message

修改主机用户 get/post @ /jump/host/modifyuser

Param:

  • hostname
  • username
  • password(可选)
  • sudo
  • desc

Resp:

​ string message

获取主机上的用户列表 get/post @ /jump/host/users

Param:

  • hostname

Resp:

[{"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"}]

获取所有主机上的用户列表 get/post @ /jump/hostuser

Resp:

[{"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"}]