Skip to content

Latest commit

 

History

History
110 lines (101 loc) · 2.3 KB

ssh.md

File metadata and controls

110 lines (101 loc) · 2.3 KB

SSH

  • Type = sshes

Data

Adding ssh to scenario. There is just one sub type yet.

  • Data request to create:

    {
        "parentId": null,
        "name": "hamintori",
        "type": "sshes",
        "subType": "",
        "position": {
            "x": 100,
            "y": 100
        },
        "data": {
          "host" :"37.152.181.64",
          "username":"reza",
          "password":"sko192j3h",
          "commands":["ls","echo hello world"]
        }
    }
  • Data response

    {
        "message": "node is created successfully.",
        "node": {
            "id": 9,
            "parentId": null,
            "name": "hamintori",
            "type": "sshes",
            "subType": "",
            "position": {
                "x": 100,
                "y": 100
            },
            "data": {
                "commands": [
                    "ls",
                    "echo hello world"
                ],
                "host": "37.152.181.64",
                "password": "sko192j3h",
                "username": "reza"
            }
        }
    }

/api/users/:username/services/sshes GET

To get the all connections of a user as list .

  • Header

    • Authorization = access_token
  • Response

    {
        "Sshes": [
           {
               "id": 1,
               "username": "reza",
               "host": "37.152.181.64",
               "password": "aaaaa",
               "sshkey": "",
               "connectionid": 25
           },
           {
               "id": 2,
               "username": "reza",
               "host": "37.152.181.64",
               "password": "aaaaaaa",
               "sshkey": "",
               "connectionid": 24
           },
           {
               "id": 3,
               "username": "reza",
               "host": "37.152.181.64",
               "password": "aaaaaaa",
               "sshkey": "",
               "connectionid": 0
           }
       ]
    }

/api/check/ssh/:type POST

  • Header
    • Authorization = access_token
  • Data request to create:
    {
        "host":"37.152.181.64",
        "username":"reza",
        "password":"password"
    }
  • Response
    {
      "massage": "OK"
    }