Introduction to the SoftNAS Cloud® Rest API
This manual describes a web services programming interface to the SoftNAS Cloud® server.
The interface includes the following:
Introduction to the API
The SoftNAS Cloud® Rest API provides access to the PHP-based SoftNAS Cloud® admin server. This provides access to SSD and disk device management on the ESXi, and EC2 hosts. The SoftNAS Cloud® API can be programmed in any language that supports HTTPS requests and responses, including Javascript with Ajax, PHP, cURL, PERL, .NET, Java, etc.
The SoftNAS Cloud® Rest API uses GET, POST, PUT and DELETE requests sent over HTTPS connections to the Apache web server running on Linux, which in turn are processed by the PHP-based SoftNAS Cloud® admin server. The SoftNAS Cloud® admin server returns its responses as JSON-formatted strings via the HTTP response. The SoftNAS Cloud® Rest API offers a way for third party systems to access the same API that is used by the SoftNAS StorageCenter administration GUI. This provides access to the SoftNAS Cloud® admin server, which manages the SoftNAS Cloud® run-time environment.
In addition,softnas-cmd is a command-line utility written in cURL, provides access to the same API calls from the Linux command line. The command line operations are defined in the
Command Reference section.
List of API Operations
See section
Methods for a complete list of API Operations.
REST API Structure
Each REST API call is structured as an opcode, followed by one or more operands. This is conceptually similar to how the von Neumann CPU architecture organizes CPU instructions and operands.
REST Verb: all commands are sent over HTTPS using a REST verb: GET, POST, PUT, DELETE.
Opcode: this is a string value specifying the API operation code, which determines which admin processor is called to process the request
Command: this (optional) string specifies an additional command to be performed by the admin processor
Operands: these additional string arguments (e.g., GET arguments, POST parameters) vary based upon the particular Opcode and Command passed and provide additional parameters to the admin processor.
JSON Response – the admin processor returns the result of the operation, along with any parameters in a JSON formatted response string.
For a definition of the REST API arguments and parameters, see section
Properties.