SoftNAS API Guide
Menu
Index
  • 1. Overview

1. Overview

 
This manual describes a web services programming interface to the SoftNAS server.
 
The interface includes the following:
·     Licensing
·     Storage Pools
·     Volumes
·     Disk Devices
·     Snapshot Management
·     Performance Monitoring
 
1.1.     Introduction to the API
 
The SoftNAS Rest API provides access to the PHP-based SoftNAS admin server.  This provides access to SSD and disk device management on the ESXi, EC2 and Hyper-V hosts.  The SoftNAS 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 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 admin server.  The SoftNAS admin server returns its responses as JSON-formatted strings via the HTTP response.  The SoftNAS 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 admin server, which manages the SoftNAS run-time environment.
 
In addition, the "softnas-cmd," 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.
 
 
 
1.1.1.     List of API Operations
 
See section Methods for a complete list of API Operations.
 
1.2.     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.
 
Made with help of Dr.Explain