Storiq One API  v1.0
API for Storiq One

add Add Files to Archive

Add Files to Archive task creation

To create an add task, use POST method

path : /storiqone-backend/api/v1/archive/add/ 
Parameters
job: hash table
  • archive id (integer) : archive id
  • name [optional] (string) : add task name, default value : "add_" + archive name
  • host [optional] (string) : hostname to run the task, default value : hostname owned by current api
  • nextstart [optional] (string) : add task nextstart date, default value : now
  • options [optional] (hash table) : check archive options (quick_mode or thorough_mode), default value : thorough_mode
files: archive files array
  • files (string array) : files to be added
Returns
HTTP status codes :
  • 201 Job created successfully
    New job id is returned
    {
       "message":"Job created successfully",
       "job_id":6
    }
  • 400 Bad request - Either ; archive id is required or archive id must be an integer or archive not found or incorrect input
  • 401 Not logged in
  • 403 Permission denied
  • 409 Request conflict
  • 500 Query failure

check

Check archive task creation

To create a check archive task, use POST method

path : /storiqone-backend/api/v1/archive/check/ 
Parameters
job: hash table
  • archive id (integer) : archive id
  • name [optional] (string) : check archive task name, default value : "check_" + archive name
  • new_files_only [optional] (bool) : check only file which are not yet verified (default: false)
  • min_version [optional] (integer) : check files whose versions are at least equal to min_version (default: 1)
  • max_version [optional] (integer) : check files whose versions ara at most equal to max_version (default: lastest version of archive).
  • host [optional] (string) : hostname to run the task, default value : hostname owned by current api
  • nextstart [optional] (string) : check task nextstart date, default value : now
  • options [optional] (hash table) : check archive options (quick_mode or thorough_mode), default value : thorough_mode
Returns
HTTP status codes :
  • 201 Job created successfully
    New job id is returned
    {
       "message":"Job created successfully",
       "job_id":6
    }
  • 400 Bad request - Either ; archive id is required or archive id must be an integer or archive not found or incorrect input
  • 401 Not logged in
  • 403 Permission denied
  • 500 Query failure

copy

Copy archive task creation

To create a copy archive task, use POST method

path : /storiqone-backend/api/v1/archive/copy/ 
Parameters
job: hash table
  • archive id (integer) : archive id
  • pool id (integer) : pool id
  • name [optional] (string) : copy archive task name, default value : "copy_of_" + archive name + "_in_pool_" + pool name
  • host [optional] (string) : hostname to run the task, default value : hostname owned by current api
  • nextstart [optional] (string) : copy task nextstart date, default value : now
  • options [optional] (hash table) : copy archive options
    • (quick_mode or thorough_mode), default value : thorough_mode
    • "force direct copy", default value : false, make sure that copy job will use at least two drives to copy the archive
Returns
HTTP status codes :
  • 201 Job created successfully
    New job id is returned 
  • 400 Bad request - Either ; archive id is required or archive id must be an integer or archive not found or pool id is required or pool id must be an integer or pool id not found or incorrect input
  • 401 Not logged in
  • 403 Permission denied
  • 500 Query failure

import

Import archive task creation

To create an Import archive task, use POST method

path : /storiqone-backend/api/v1/archive/import/ 
Parameters
job: hash table
  • media id (integer) : media id
  • pool id (integer) : pool id
  • name [optional] (string) : import archive task name, default value : "importArchive_" + archive name
  • host [optional] (string) : hostname to run the task, default value : hostname owned by current api
  • nextstart [optional] (string) : import archive task nextstart date, default value : now
  • options [optional] (hash table) : check archive options
files: archive files array
Returns
HTTP status codes :
  • 201 Job created successfully
    New job id is returned
    {
       "message":"Job created successfully",
       "job_id":6
    }
  • 400 Bad request - Either ; archive id is required or archive id must be an integer or archive not found or incorrect input
  • 401 Not logged in
  • 403 Permission denied
  • 500 Query failure

Archive deletion

To mark archive as deleted, use DELETE method

path : /storiqone-backend/api/v1/archive/ 
Parameters
id: archive id
Returns
HTTP status codes :
  • 200 Query succeeded
    Archive information are returned
     {
       "message":"Archive deleted"
     }
  • 401 Not logged in
  • 403 Permission denied
  • 404 Archive not found
  • 410 Archive gone
  • 500 Query failure

Archive information

To get archive by its id, use GET method

path : /storiqone-backend/api/v1/archive/ 
Parameters
id: archive id
Returns
HTTP status codes :
  • 200 Query succeeded
    Archive information is returned
    
    {
       "message":"Query successful","archives":[2],"total_rows":1
    }
  • 401 Not logged in
  • 403 Permission denied
  • 500 Query failure

Archives ids (multiple list)

To get archives ids list, use GET method : without reference to specific id or ids

path : /storiqone-backend/api/v1/archive/ 

Optional parameters

Name Type Description Constraint
order_by enum order by column value in : 'id', 'uuid', 'name'
order_asc boolean TRUE will perform an ascending order and FALSE will perform an descending order.
order_asc is ignored if order_by is missing.
limit integer specifies the maximum number of rows to return. limit > 0
offset integer specifies the number of rows to skip before starting to return rows. offset >= 0
Warning
To get multiple archives ids list do not pass an id or ids as parameter
Returns
HTTP status codes :
  • 200 Query succeeded
Archives ids list is returned
{
   {
   "message":"Query successful","archives":[2],"total_rows":1
   }
}
  • 400 Incorrect input
  • 401 Not logged in
  • 500 Query failure

Archival task creation

To create an archival task, use POST method

path : /storiqone-backend/api/v1/archive/ 
Parameters
job: hash table
  • pool id (integer) : pool id
  • files (string array) : files to be archived
  • name (string) : archive name
  • host [optional] (string) : hostname to run the task, default value : hostname owned by current api
  • deleted (string) : indicator to show either no deleted archives, all deleted archives, or only deleted archives
  • metadata [optional] (object) : archive metadata, default value : empty object
  • nextstart [optional] (string) : archival task nextstart date, default value : now
  • options [optional] (hash table) : check archive options (quick_mode or thorough_mode), default value : thorough_mode
Returns
HTTP status codes :
  • 201 Job created successfully
    New job id is returned
    {
       'message': 'Job created successfully', 'job_id': 12
    }
  • 400 Bad request - Either ; pool id is required or pool id must be an integer or incorrect input
  • 401 Not logged in
  • 403 Permission denied
  • 500 Query failure
Note
Date time formats supported

Archive update

To update an archive, use PUT method

path : /storiqone-backend/api/v1/archive/ 
Parameters
archive: JSON encoded object
  • id (integer) : archive id
  • name [optional] (string) : archive name
  • owner [optional] (integer) : archive owner id
  • canappend [optional] (boolean) : archive extend rights
Returns
HTTP status codes :
  • 200 Archive updated successfully
    'message': 'Archive updated successfully' 
  • 400 Bad request - Either ; archive id is required or archive id must be an integer or archive not found or incorrect input
  • 401 Not logged in
  • 403 Permission denied
  • 500 Query failure

restore

Restoration task creation

To create a restoration task, use POST method

path : /storiqone-backend/api/v1/archive/restore/ 
Parameters
job: hash table
  • archive id (integer) : archive id
  • name [optional] (string) : restoration task name, default value : "restore_" + archive name
  • version [optional] (integer) : restore all files whose version is specified by version
  • min_version [optional] (integer) : restore all files whose version is at least equal to min_version
  • max_version [optional] (integer) : restore all files whose version is at most equal to max_version
  • host [optional] (string) : hostname to run the task, default value : hostname owned by current api
  • nextstart [optional] (string) : restoration task nextstart date, default value : now
files: archive files array
  • files (string array) : files to be restored
destination[optional] : restoration destination path
  • destination [optional] (string) : restoration destination path, default value : original path
Returns
HTTP status codes :
  • 201 Job created successfully
    New job id is returned 
  • 400 Bad request - Either ; archive id is required or archive id must be an integer or archive not found or incorrect input
  • 401 Not logged in
  • 403 Permission denied
  • 500 Query failure