Table of Contents

Back to Users API

Download file(s) from User's Storage Area


Use the GET /files{/path/to/a/file} transaction to download a file from the user's storage area.

Synopsis

File Contents

A successful GET /files/path/to/a/file transaction returns the contents of the file in its raw form, which be read (if text) or saved.

If the specified path points to a folder instead of a file, the folder structure will be returned, as described in the Get Directory transaction.

Example using curl://

Send the /user command using curl:

curl -b cookies https://api.ensims.com/users/api/test/today/test123.txt

On success, the contents of the file are returned. If the existing JWT is invalid, an HTTP 401 Unauthorized code will be returned.

Example using Python Requests

Make sure Requests is correctly installed in your Python environment, and run the following lines:

import requests

# Existing cookies are expected to be stored in the variable 'cookies'
r = requests.get('https://api.ensims.com/users/api/files/test/today/test123.txt', cookies=cookies)

# Show the returned contents
print(r.text)