Storiq One API  v1.0
API for Storiq One

erase Media Erase

Erase media task creation

remove a media from a pool and erase it. use POST method

path : /storiqone-backend/api/v1/media/erase/ 
Parameters
job: hash table
  • media id (integer) : media id
  • name [optional] (string) : Erase media task name, default value : "eraseMedia_" + media name
  • host [optional] (string) : hostname to run the task, default value : hostname owned by current api
  • nextstart [optional] (string) : Erase media task nextstart date, default value : now
  • options [optional] (hash table) : Available option: 'quick mode' (boolean)
Returns
HTTP status codes :
  • 201 Job created successfully
    New job id is returned
    {
       "message":"Job created successfully",
       "job_id":6
    }
  • 400 Bad request - Either ; media id is required and must be an integer; media must exist and must be writable.
  • 401 Not logged in
  • 403 Permission denied
  • 500 Query failure

format Media Format

Format media task creation

Format a media and insert it into a pool. use POST method

path : /storiqone-backend/api/v1/media/format/ 
Parameters
job: hash table
  • media (integer) : media id
  • pool (integer) : pool id
  • name [optional] (string) : format media task name, default value : "formatMedia_" + media name
  • host [optional] (string) : hostname to run the task, default value : hostname owned by current api
  • nextstart [optional] (string) : format media task nextstart date, default value : now
  • options [optional] (hash table) : formatting options. Available options: 'block size'.
files: media 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 ; media id is required and must be an integer; pool id is required and must be an integer. Media and pool must both exist and be of the same format.
  • 401 Not logged in
  • 403 Permission denied
  • 500 Query failure

fragmentation Media Fragmentation

Fragmentation

reports media fragmentation. Fragmentation occurs when deleting archives that aren't positionned at end of data. use GET method

path : /storiqone-backend/api/v1/media/fragmentation/ 
Parameters
id: media id (integer)
Returns
HTTP status codes :
  • 200 Querry Succeeded
    Fragmentation is returned
     {
    "message":"
       'media_size' => 300,
       'volume_used' => 50,
       'volume_wasted' => 0,
       'volume_free' => 250
    "}
  • 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

Media information

To get media by its id use GET method

path : /storiqone-backend/api/v1/media/ 
Parameters
id: media id
Returns
HTTP status codes :
  • 200 Query succeeded
    Media information is returned 
  • 400 Media id must be an integer
  • 401 Not logged in
  • 404 Media not found
  • 500 Query failure

Medias by pool (multiple list)

To get medias ids list by pool, use GET method

path : /storiqone-backend/api/v1/media/ 
Parameters
pool: pool id

Optional parameters

Name Type Description Constraint
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
Returns
HTTP status codes :
  • 200 Query succeeded
    Medias ids list by pool is returned 
  • 400 Incorrect input
  • 401 Not logged in
  • 403 Permission denied
  • 500 Query failure

Medias by poolgroup (multiple list)

To get medias ids list by poolgroup, use GET method

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

Optional parameters

Name Type Description Constraint
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
Returns
HTTP status codes :
  • 200 Query succeeded
    Medias ids list by poolgroup is returned 
  • 400 Incorrect input
  • 401 Not logged in
  • 500 Query failure

Medias without pool (multiple list)

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

path : /storiqone-backend/api/v1/media/ 
Parameters
mediaformat: filter by mediaformat id [optional]

Optional parameters

Name Type Description Constraint
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 medias ids list without pool do not pass an id or pool as parameter. If mediaformat id is defined, filter will be enable.
Returns
HTTP status codes :
  • 200 Query succeeded
    Medias ids list without pool is returned 
  • 400 Incorrect input
  • 401 Not logged in
  • 500 Query failure