JSS API Reference

CompleteFTP is highly customizable allowing users to extend its inbuilt functionality using JSS, as well as .NET assemblies, batch scripts, Powershell scripts and executables.

JSS (Javascript Server-Side) is the name given to CompleteFTP's scripting environment. It includes a Javascript language interpreter and an API for integrating with CompleteFTP as well as performing common tasks.

Applications of JSS

JSS may be used to implement:

JSS API

The JSS API is the set of functions, globals and objects available for integrating with CompleteFTP and for performing common operations, such as HTTP requests, sending e-mails and access databases.

JSS API Globals

JSS API globals in CompleteFTP are global objects containing properties and functions. Their names start with a lower-case letter, e.g. console, http, mail. Since they are global objects, they may be used without first instantiating an object. For example, the statement, console.log("Hello"), logs a message to the CompleteFTP logs. The globals are listed in the left side-bar.

JSS API Objects

JSS API objects provide features such as FTP/SFTP clients, virtual file-system access and database access. The names of JSS API objects begin with an upper-case letter.
The objects are listed in the left side-bar.

JSS API Functions

The JSS API provides two global functions: include and publish. These allow the developer to reuse code between script files and control which functions are exposed via RPC.

Integrating with .NET

JSS offers two methods of integrating with .NET:

ECMAScript compliance

JSS's Javascript interpreter is compliant with ECMAScript 3 (ES3), but includes some ES5 features such as inbuilt JSON support, and extra methods on Array, Date and String objects.

JSS API

Globals

Objects

Global Functions

JSS ConfigAPI v2

ConfigAPI v2 provides access to every aspect of CompleteFTP's configuration. These objects are accessed via system.getConfig2() and correspond to the REST API v2 (/Admin/API/v2/).

Objects

JSS ConfigAPI v1 (Legacy)

ConfigAPI v1 is the original configuration API, providing access to core configuration objects for users, groups, folders, and sites. These objects are accessed via system.getConfig() and correspond to the REST API v1 (/Admin/API/v1/ or /Admin/API/config/). For new development, consider using ConfigAPI v2 instead.

Objects