This section includes the definitions for the arguments and parameters which make up the Opcodes and Commands of the REST API.
General SoftNAS Cloud API Parameters
Parameter
|
Description
|
Note/Data Type
|
username
|
username (e.g., softnas)
Linux user name that will be used to log into SoftNAS Cloud® via the API
|
Alphanumeric String
|
password
|
The user's password for the username used to log into SoftNAS Cloud® via the API.
|
Alphanumeric String
|
-s (number)
|
Session ID for the client session with SoftNAS Cloud®.
Every new login to SoftNAS Cloud® via the API will receive a unique session ID. The Session ID is returned from the SoftNAS Cloud® server and indicates the session ID which will be used for subsequent requests, and for storing information (eg. cookies).
It is also possible to specify the session ID for a request using this parameter. If session ID is left unspecified, SoftNAS Cloud® will use the PPID (Parent Process ID) as Session ID.
|
Integer
|
--session_id (number)
|
Session ID for the client session with SoftNAS Cloud®.
Every new login to SoftNAS Cloud® via the API will receive a unique session ID. The Session ID is returned from the SoftNAS Cloud® server and indicates the session ID which will be used for subsequent requests, and for storing information (eg. cookies).
It is also possible to specify the session ID for a request using this parameter. If session ID is left unspecified, SoftNAS Cloud® will use the PPID (Parent Process ID) as Session ID.
|
Integer
|
-b (url)
|
Base URL:
Same as the location of the SoftNAS StorageCenter administrative user interface.
-b https://nas01.mydomain.com/softnas
By default, base url is https://localhost/softnas
|
URL String
|
--base_url (url)
|
Base URL:
Same as the location of the SoftNAS StorageCenter administrative user interface.
-b https://nas01.mydomain.com/softnas
By default base url is “https://localhost/softnas”
|
URL String
|
-t
|
Pretty Print:
Causes the JSON return string from the API to be formatted with newlines so that it word wraps nicely on a display.
|
CLI Command Line Switch.
|
--pretty_print
|
Pretty Print:
Causes the JSON return string from the API to be formatted with newlines so that it word wraps nicely on a display.
|
CLI Command Line Switch
|
success
|
Returns true or false depending on success or failure of the API request for issued command.
|
Boolean
|
start
|
Start position for the query results. This property can be used when results must be returned using multiple pages. The start position instructs the server to begin returning additional results from a specific item number. Default: 0
|
Integer
|
limit
|
For paged query results, this parameter is used to limit request results to a specific number of items. For example, when obtaining list of storage pools, it is possible to limit the amount of results that are returned. Default:999
|
Integer
|
returnGlobals
|
-obtain definition
|
|