FileCloud Developer Guide

FileCloud HTTP API

FileCloud HTTP API allows clients such as web browsers and mobile devices to programmatically connect and access FileCloud instances running on your personal computer or any other device.

  • FileCloud runs on Apache server on both Windows and Linux Platforms. 
  • This server handles incoming HTTP calls, transforms them into internal System Messages and sends them to the appropriate internal services.

HTTP Basics

HTTP is the fundamental protocol of the World Wide Web. HTTP is a connectionless request response protocol, meaning there is no concept of a persistent connection between a series of requests.

REQUEST AND RESPONSE


An HTTP request is a message sent from the client to the server. The server sends back a response. The request and response might contain content called the body. In addition, the response always contains a numeric response code, which lets us know if the request was successful. It gives more detailed information about what exactly happened (e.g. the cause of failure).

METHODS

HTTP supports several request methods, which help the server know how to handle the request. The HTTP methods for our purposes are:
GET: Used to retrieve a resource (such as a web page or image) from a URL
POST: Used to send data to a server (such as the content of a form) based on a URL

HEADERS

Finally, in addition to the main content of the request and response, HTTP allows additional data to be sent in the form of headers. They can be sent with the request to the server and the response from the server, and they can contain arbitrary text data. There are many standard headers, and the connection API contains methods for easily accessing some of the most common ones.

How API authentication works

FileCloud records all API calls in the audit log, therefore, authentication cannot be done with an API token.

When you log in with loginguest or adminlogin and provide the correct password, the server creates a new session, and returns the authentication parameters in cookies which are included in all subsequent calls. The cookies allow the server to link your API call to the existing session.


More details about cookies can be seen in these examples:
Curl/Bash Sample: File Upload and Download - cookie is stored in the file ${USER}_cookie.txt
PowerShell Sample for FileCloud API - cookie is stored in the variable $LoginResponse.Headers['Set-Cookie']

Tips for using the API

Tips for using the API


To view full API documentation:

FileCloud Admin API:  

FileCloud User API: 

Note: Although the API documentation allows you to view API command formats for previous versions of FileCloud, only the API formats shown for the latest released version of FileCloud are supported.

To see which API call and parameters were executed:

  1. Execute the action in the FileCloud admin portal or user portal.
  2. In the browser, open the Developer Tools using CTRL-Shift-i.
  3. Check the Developer Tools to see the API call and parameters.
    For example:

In this section: