WS-API APIs
This section provides descriptions for the APIs included with WS-API.
Prerequisites
- A password is required to run the WS-API web services. The password is stored in the /usr/adic/.snapipassword file on the server, and the file must contain only one word, for instance, the password without a prefix or suffix. For example:
password123
The doCancel API
Given a requestID (which can be retrieved by running The getSMQueue API), running the doCancel
API aborts an operation in progress. Running this API is equivalent to running the fscancel
command.
Parameters
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
Example: |
|
Required |
1 |
The request identifier of the request to be cancelled. Operations in progress can be retrieved by running the Example: |
|
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1 = only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3.
Example
http://host:81/axis2/services/stornext/doCancel ?password=stornext &requestID=12345 &format=json |
The doMediaMove API
Use the doMediaMove
API to move media from one archive to another. Running this API is equivalent to running the vsmove
command.
Parameters
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
Example: |
|
Required |
N |
Specifies one or more media to be moved. A valid medium identifier may contain up to 16 alphanumeric characters, including spaces. Leading and trailing spaces are not permitted. The number of media that can be specified is restricted by the CLI software. Currently, the maximum allowed number is 64. Example: |
|
Required |
1 |
Specifies the name of the archive to which the specified media are to be moved. Valid archive names may contain up to 16 alphanumeric characters, including spaces. Leading and trailing spaces are not permitted. Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Example
http://host:81/axis2/services/stornext/doMediaMove ?password=stornext &mediaIDs=1234 &mediaIDs=5678 &archiveName=lto &format=json |
The doRetrieve API
Use the doRetrieve
API to retrieve or recover a file from media and place it on disk. By default, the primary copy of a file is retrieved. Running this API is equivalent to running the fsretrieve
command.
Parameters
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
Example: |
|
Optional |
N |
The path and file name of the file(s) to retrieve. The full path name starting from the root directory is required as input to the command. Each file path must specify a file in a migration directory. Example: |
|
Optional |
1 |
Updates the access time of the requested files. Example: |
copy |
Optional |
1 |
Used to retrieve a specific copy of filename if one exists. A number from 1 to N. Example: |
newFileName |
Optional |
1 |
The new path and file name into which to retrieve the file. The location specified for the new file must be a local file system. Retrieval to an NFS-mounted file system is not permitted. Example: |
startByte |
Optional |
1 |
The startByte must be less than endByte, and both must be within the byte range of the file. The byte range is inclusive. To retrieve a single byte, the startByte is equal to the endByte. If the startByte and endByte are specified, the newFileName must be specified. Otherwise, the command is rejected. The byte range is zero relative; therefore a specified byte range must be zero to the end byte minus 1. Example: |
|
Optional |
1 |
See the description for Example: |
directory |
Optional |
1 |
The directory from which to start the recursive retrieve. All files from the specified directory and any subdirectories will be retrieved. Depending upon the number of files in the directory and subdirectories, running this option may use extensive Tertiary Manager resources. Example: |
topPriority |
Optional |
1 |
Specifies top priority and will cause all files for the retrieve request to be placed at the top of the retrieve queue. Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Exceptions
Parameter |
Exception |
Description |
|
|
If you specify a |
|
|
If you specify a |
|
|
If you specify a |
|
|
If you specify a |
|
|
If you specify a |
Examples
Restore a file and give it a new file name.
http://host:81/axis2/services/stornext/doRetrieve ?password=stornext &files=/stornext/managed/a &newFileName=/stornext/managed/b &format=json |
Restore the second (2nd) copy of a file and give it a new file name.
http://host:81/axis2/services/stornext/doRetrieve ?password=stornext &files=/stornext/managed/a ©=2 &newFileName=/stornext/managed/a2 &format=xml |
Restore a portion of a file and give it a new file name.
http://host:81/axis2/services/stornext/doRetrieve ?password=stornext &files=/stornext/managed/a &newFileName=/stornext/managed/a-123-456 &startByte=123 &endByte=456 &format=xml |
The doStore API
Use the doStore
API to store files as specified by its respective policy. Running this API is equivalent to running the fsstore
command.
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
Example: |
|
Required |
N |
The names of the file(s) on disk to store to media. The full path name starting from the root directory is required as input to the command. Multiple filenames must be separated by commas. Example: |
|
Optional |
1 |
Defines the type of medium to be used for storage. Depending on the type of platform used, the following media types are supported by Tertiary Manager software: AIT, AITW, LTO, LTOW, SDISK, 3590, 3592, 9840, 9940, T10K, DLT4, DLT2 (SDLT600 media) Example: |
|
Optional |
1 |
Number of copies of the file(s) to be stored. The value is the total number of copies, including the primary copy of the file. This number cannot exceed the number of copies defined in the policy class Example: |
|
Optional |
1 |
The file retention policy for the filename specified. The files can be truncated immediately (i) or at policy application time (p) once all file copies are stored on a medium. If the Example: |
|
Optional |
1 |
Media Manager drive pool group used to store the file specified. The drive pool must be defined in Media Manager software. If the Example: |
|
Optional |
1 |
Minimum file size in bytes to be stored. Files larger than or equal to the specified Example: |
|
Optional |
1 |
Maximum allowable time in hours for the command to finish. This command normally runs until it completes. This option can be used to limit how long it should remain active. If the store has not completed in the specified amount of time, then any outstanding activity will be cancelled. Example: |
|
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Examples
http://host:81/axis2/services/stornext/doStore ?password=stornext &files=/stornext/managed/a &format=json |
The doTruncate API
The doTruncate
API allows a user to remove the copy/copies of the specified file(s) from disk after the file is copied to media. The cleanup policy is the system administration method of routinely freeing disk space by removing files after being stored on media.
The doTruncate
API is used by users to maintain a desired level of disk space by truncating individual files. Files specified for removal from disk with the doTruncate API command must have an exact copy on media.
Suggested uses for the fsrmdiskcopy
command include the following:
After viewing a migrated file. Viewing the file caused it to be retrieved to disk. If the file is not modified, the disk copy can be removed.
After storing the file to medium with the fsstore
command without using the option to immediately truncate the file from disk.
Between the application of the storage and truncation policies by the system administrator.
Running this API is equivalent to running the fsrmdiskcopy
command.
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
Example: |
files |
Required |
N |
The names of the file(s) on disk to store to media. The file path(s) must also be in a migration directory. The full path name starting from the root directory is required as input to the command. Multiple filenames must be separated by commas. Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Example
http://host:81/axis2/services/stornext/doTruncate ?password=stornext &files=/stornext/managed/a &format=json |
The getDriveReport API
The getDriveReport
API is a user command that can be executed when Tertiary Manager software is active or nonactive. The getDriveReport API reports the state of the Tertiary Manager software and/or all storage subsystems and drive components configured in the Quantum storage subsystem.
Submitting the getDriveReport API with the componentAlias
option generates a report for a single Quantum component, i.e. drive(s), drive identifier(s), and Media Manager system(s).
Running this API is equivalent to running the fsstate
command.
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
Example: |
componentAlias |
Optional |
1 |
The alias for storage subsystem and drives. The system administrator configures the possible values for component aliases during system configuration or by using the Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Examples
Status of the 'sdisk' component.
http://host:81/axis2/services/stornext/getDriveReport ?password=stornext &componentAlias=sdisk &format=xml |
The getFileLocation API
The getFileLocation
API reports the current location(s) of files, whether on disk, on a particular medium, or not in the SNMS system. It also displays file attribute information.
Running this API is equivalent to running the fsfileinfo
command.
Important Information About the getFileLocation API
The getFileLocation
API hangs when there are 150 or more calls being processed by the MDC. The queue is usually due to lengthy tape processing calls such as doRetrieve
, doStore
, or fsmedcopy
. The process might take up to an hour until the retrieves complete.
The number of incoming call services is restricted by the Tomcat maxThreads
parameter in the file, /usr/adic/gui/config/server.xml; there are 2 lines in the server.xml file where the maxThreads
parameter exists.
Quantum recommends you increase the maxThreads
value to cover the maximum expected number of lengthy commands, and then restart the Web Services. The default setting is 150.
For example, in the server.xml file, locate the 2 lines that contain the following parameter:
Update the maxThreads
value accordingly. For example:
- Tomcat settings are found in /usr/adic/tomcat/conf/server.xml.
- The maxThreads value specifies “The maximum number of request processing threads to be created which therefore determines the maximum number of simultaneous requests that can be handled.”
- The default maxThreads setting for StorNext is 150, which is conservative and can be increased if a higher number of simultaneous requests are expected or required.
- The value should be set to the maximum number of simultaneous requests that the customer wants to be able to service.
- A high number of threads utilizes more memory. If the selected value is too high for your system, then it might cause system resource constraints and should be reduced and/or the Tomcat memory increased.
- If you are seeing slow performance and/or frequent memory errors in the GUI and in the GUI logs, then increase the available memory for Tomcat to use.
- On MDCs with multiple cores, setting this value between 150 and 1000 should not cause a problem. If you detect performance or memory issues, then you should allocate more Tomcat memory by altering the -Xmx value in /etc/init.d/stornext_web from the default 512m. To increase the Tomcat memory, edit /etc/init.d/stornext_web and change the -Xmx value to a larger value. For example, -Xmx1024m or -Xmx2048m for 1 GB and 2 GB, respectively:
- After making changes, run service stornext_web restart to restart Tomcat. Repeat all steps on the second node, for an HA configuration.
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
Example: |
files |
Required |
N |
The path name of at least one file is required. The full path name starting from the root directory is required. Example: |
checksum |
Optional |
1 |
If checksum was turned on for the file when stored and this option is specified, the checksum value generated for the file will be displayed. Example: |
showIds |
Optional |
1 |
Show whether the file has any objects stored to the Wide Area Storage. Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Examples
Basic file information.
http://host:81/axis2/services/stornext/getFileLocation ?password=stornext &files=/stornext/managed/a &format=xml |
Information about two files, with checksum and object IDs.
http://host:81/axis2/services/stornext/getFileLocation ?password=stornext &files=/stornext/managed/a &files=/stornext/managed/b &checksum=1 &showIds=1 &format=xml |
The getFileTapeLocation API
The getFileTapeLocation
API reports the location information of the file's on-tape copies. The report will list all the segments belonging to the specified file copy.
Running this API is equivalent to running the fsfiletapeloc
command.
Parameter |
Req / Opt |
Num |
Description |
password |
Required |
1 |
Example: |
file |
Required |
N |
The full path name starting from the root directory is required. Example: |
copy |
Optional |
1 |
The copy id to generate report for. If not specified, the information for the primary copy will be reported. Example: |
format |
Optional |
1 |
Output format: json, text, or xml. The default output format is Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Examples
Basic file information.
http://host:81/axis2/services/stornext/getFileTapeLocation ?password=stornext &file=/stornext/managed/a &format=xml |
The getMediaInfo API
The getMediaInfo
API produces a list of media. The organization of the media list is defined by the use of options. If no options are used, the getMediaInfo
API generates a short report that lists the total quantity of media in each policy class, including the general scratch pool.
Running this API is equivalent to running the fsmedlist
command.
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
Example: |
scratchPool |
Required |
1 |
Used to report on the blank media in the general scratch pool. Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Examples
Media report, no scratch pool.
http://host:81/axis2/services/stornext/getMediaInfo ?password=stornext &scratchPoolOnly=0 &format=xml |
Media report, general scratch pool.
http://host:81/axis2/services/stornext/getMediaInfo ?password=stornext &scratchPoolOnly=1 &format=xml |
The getMediaReport API
The getMediaReport
API produces either a short report or a long report on the specified media, based on the options entered. One or more media identifiers must be entered.
Running this API is equivalent to running the fsmedinfo
command.
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
Example: |
mediaIDs |
Required |
N |
One or more media identifiers on which to report. Example: |
longReport |
Optional |
1 |
Produce the long form of the report that contains the same information as the short form, plus a list of the file segments on the medium. The Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Examples
Media report, short form.
http://host:81/axis2/services/stornext/getMediaReport ?password=stornext &mediaIDs=sdisk &format=xml |
Media report, long form.
|
The getSMQueue API
The getSMQueue
API checks the request queue for the specified request identifier(s), filename(s), or media. Requests awaiting resources (drives and media) are displayed.
Issuing the getSMQueue
API without any options will report all resource requests associated with storage subsystems, for example, drive-media mount requests.
Running this API is equivalent to running the fsqueue
command.
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
Example: |
report |
Optional |
1 |
The report type. Valid names are: Example: |
requestID |
Optional |
1 |
The request identifier of the request to be reported. Valid when the Example: |
file |
Optional |
N |
The file option reports the current status and request identifier associated with a specified file or files. This method gets the active request identifier associated with a store or retrieve if a filename is known. However, because of potential dependencies, the original request identifier for The doStore API or The doRetrieve API issued by a particular user may not be discernible. Valid when the report type is file. Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Examples
Check request queue for a few file.
|
Check request queue for a specific request ID.
|
The getSNAPIVersion API
The getSNAPIVersion
API returns the Web Service version and the output from the cvversions
command.
Running this API is equivalent to running the cvversions
command.
Parameter |
Req / Opt |
Num |
Description |
|
Required |
1 |
The parameter |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Examples
Get the file system server, client, and host OS versions.
|
The getSystemStatus API
The getSystemStatus
API returns the software version and the status of DSM, TSM, MSM, MySQL and SRVCLOG.
Running this API is equivalent to running the cvversions
, cvadmin
, TSM_control
, vsping
, mysql_control
, and SRVCLOG_control
commands.
Parameter |
Req / Opt |
Num |
Description |
password |
Required |
1 |
Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Get the file system server and client versions.
|
The getWasConfiguration API
The getWasConfiguration
API reports configuration settings for Wide Area Storage components in the storage system. Wide Area Storage components are: Appliances, Controllers, I/O Paths and Namespaces. These components and their attributes, provide the addressing information required to form the URL to store and retrieve objects from the Wide Area Storage.
Running this API is equivalent to running the fswascfg
command.
Parameter |
Req / Opt |
Num |
Description |
password |
Required |
1 |
Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Example
|
The relocateFiles API
Use the relocateFiles
API to relocate a managed file from one disk affinity to another, or change the affinity association of a truncated file.
Running this API is equivalent to running the fsrelocate
command.
Parameter |
Req / Opt |
Num |
Description |
password |
Required |
1 |
Example: |
affinity |
Required |
1 |
The destination affinity. This affinity must be defined for the file system in which the file resides. The file will be relocated to this affinity if it has not been truncated. If the file has been truncated, only the file's affinity association will change. Example: |
file |
Required |
N |
One or more files to be relocated. The files must reside in a managed directory. Example: |
format |
Optional |
1 |
Output format: Example: |
Num is the number of arguments: 1
= only one allowed, N = multiple allowed, the parameter name is repeated for multiple entries, for example, x=1&x=2&x=3
.
Examples
Relocate a single file.
|
Relocate multiple files.
|