connections

Download Spec

post /ssh-mitm/api/v1/connections/{connection_id}/file

File-operation endpoint for the connection

cmd

string

required

Enum
  • LS
  • RM
  • MV
  • MKDIR
  • RMDIR
  • GET
  • PUT
  • HOME

path

string

required

Absolute path handle for the target of the command. Paths returned for earlier file requests must be passed in this property.

new_path

string

Absolute path for the target of the command. Paths that are built based on user input must be passed in this property.

display_path

string

Absolute new path for MV, MKDIR and PUT. New path is always based on user input.

Request

{
  "cmd": "LS",
  "path": "string",
  "new_path": "string",
  "display_path": "string"
}

Response

ExamplesSchema

Operation succesful, response

{
  "status": {
    "status_code": 0,
    "status_message": "string"
  },
  "path": "string",
  "display_path": "string",
  "files": [
    {
      "is_dir": true,
      "is_link": true,
      "filename": "string",
      "path": "string",
      "filesize": 123,
      "owner": "string",
      "group": "string",
      "permissions": "string",
      "createtime": "2023-06-07T17:32:28Z",
      "atime": "2023-06-07T17:32:28Z",
      "ctime": "2023-06-07T17:32:28Z",
      "mtime": "2023-06-07T17:32:28Z",
      "attributes": 123
    }
  ],
  "download_id": "string",
  "upload_id": "string"
}

post /ssh-mitm/api/v1/connections/{connection_id}/file/upload/{upload_id}

File-upload endpoint to a connection. Latter part of two-step process. Request must contain all cookies set by the first step.

connection_id

string

required

Connection ID

upload_id

string

required

Upload id received from PUT operation at /ssh-mitm/api/v1/connections/{connection_id}/file/

Response

ExamplesSchema

File uploaded

Empty response

get /ssh-mitm/api/v1/connections/{connection_id}/file/download/{download_id}

File-download endpoint for connection - multipart download and resume support. Latter part of two-step process. Request must contain all cookies set by the first step.

connection_id

string

required

Connection ID

download_id

string

required

Download ID received from GET operation at /ssh-mitm/api/v1/connections/{connection_id}/file/

Response

ExamplesSchema

File uploaded

Empty response

Was this page helpful?