GET Remote File

GET /remotes/(sid)/file(path)

Uses an existing remote session to retrieve a remote file. The remote session must have been created using POST /remotes. Use POST /remotes/(sid)/browse(path) to lookup remote file paths. The returned file may be optionally cached on the server and retrieved using GET /projects/(pid)/cache/(key).

  • sid (string) – Unique session identifier returned from POST /remotes.
  • path (string) – Remote filesystem path (must be absolute).
Query Parameters:
  • cache – Optional cache identifier. Set to project to store the retrieved file in a project cache.
  • project – Project identifier. Required when cache is set to project.
  • key – Cached object key. Must be specified when cache is set to project.
Status Codes:
  • 200 OK – The requested file is returned in the body of the response.
  • 404 Not Found – The session doesn’t exist or has timed-out.
  • 400 Bad Request – “Can’t read directory” The remote path is a directory instead of a file.
  • 400 Bad Request – “File not found” The remote path doesn’t exist.
  • 400 Bad Request – “Access denied” The session user doesn’t have permissions to access the file.
Response Headers:
  • Content-Type – The MIME type of the response is automatically determined using the requested filename.
  • X-Slycat-Message – For errors, contains a human-readable description of the problem.
  • X-Slycat-Hint – For errors, contains an optional description of how to fix the problem.

Sample Request

GET /remotes/505d0e463d5ed4a32bb6b0fe9a000d36/file/home/fred/checklist.txt