Requests - TPeterW/Terrigenesis GitHub Wiki

Connection

/estabcon

  • Method: POST
  • Authentication: Basic Auth
  • Establish connection
  • Body Parameters (x-www-form-encoded): []
  • Response: {Status: int, Token: string}

/closecon

  • Method: GET
  • Authentication: Basic Auth
  • Close connection
  • Query Parameters: [token: string]
  • Response: {Status: int, Message: string}

Directory

/pwd

  • Method: GET
  • Authentication: Basic Auth
  • Print working directory
  • Query Parameters: [Token: string]
  • Response: {Status: int, CWD: string]

/dir

  • Method: GET
  • Authentication: Basic Auth
  • List files in current working directory of the session
  • Query Parameters: [Token: string]
  • Response: {Status: int, DirFiles: []string]

/chdir

  • Method: POST
  • Authentication: Basic Auth
  • Change to a specific directory
  • Body Parameters(multipartform): [Token: string, dirname: string]
  • Response: {Status: int, CWD: string]

/rmdir

  • Method: POST
  • Authentication: Basic Auth
  • Remove a specific directory
  • Body Parameters(multipartform ): [Token: string, dirname: string]
  • Response: {Status: int, Message: string]

/mkdir

  • Method: POST
  • Authentication: Basic Auth
  • Remove a specific directory
  • Body Parameters(multipartform ): [Token: string, dirname: string]
  • Response: {Status: int, Message: string]

File

/downfile

  • Method: GET
  • Authentication: Basic Auth
  • Download a specific file
  • Query Parameters: [Token: string, filename: string]
  • Response: {Status: int, DirFiles: []string, Message: string]

/upfile

  • Method: POST
  • Authentication: Basic Auth
  • Upload a specific file
  • Body Parameters(multipartform ): [Token: string, file: file]
  • Response: {Status: int, Message: string]

/rmfile

  • Method: POST
  • Authentication: Basic Auth
  • Remove a specific file
  • Body Parameters(multipartform ): [Token: string, filename: string]
  • Response: {Status: int, Message: string]

/mvfiledir

  • Method: POST
  • Authentication: Basic Auth
  • Moves a specific file or directory
  • Body Parameters(multipartform ): [Token: string, origin: string, destination: string]
  • Response: {Status: int, Message: string]