Storage API
Overview
Use the Storage API in order to manage storages that are used by IBS.
Create
Parameter | Type | Required | Comment |
---|---|---|---|
action | String | create see also API - General parameters | |
maxbytes | long | the number of available bytes | |
sourcepath | String | the path to the storage | |
customdata | JSON | possible values:
| |
description | String | the description of the storage | |
hrid | String | the hrid of the storage | |
readonly | boolean | if set to true, the storage can only be read | |
drain | boolean | if set to true, the storage will be drained and cannot be used for fetches, see also Default-Schedule-Worker - G) |
By default, a new storage is locked. You must set the locked-option to false via update!
Example call
/api/storage?action=create&sourcepath=C:/ikona/ibs/storage1&maxbytes=4TB&locked=false&description=Storage1
Answer
Success
{ "type": "Result:StorageApi:Create:Success" }
Error
different error states
Info
Parameter | Type | Required | Comment |
---|---|---|---|
action | String | info see also API - General parameters | |
uuid | uuid | see also API - General parameters | |
verbose | boolean | if true the result contains additional information |
Example call
/api/storage?action=info&uuid=20103fe0-19fa-4001-8045-a4c8b6ed382a POST /api/storage/20103fe0-19fa-4001-8045-a4c8b6ed382a action = info
Answer
Success
{ "creationdate": "2018-08-21 13:34:38", "description": "", "usedbytes": 5969, "type": "Success:StorageApi:Info", "modificationdate": "2018-08-21 14:27:56", "uuid": "20103fe0-19fa-4001-8045-a4c8b6ed382a", "sourcepath": "c:/ikona/storage4", "readonly": false, "hrid": "", "maxbytes": 31457280, "tobedrained": false, "customdata": { "performance": 100, "reliability": 100, "downloadurl": "http://localhost:8084/ikona-ibs-srv/api/entity/" }, "locked": false }
With verbose:
{ "creationdate": "2018-08-24 16:29:00", "disctype": "NTFS", "discname": "System", "description": "", "usedbytes": "5969", "discuseablespace": "293144326144", "discusedspace": "206370013184", "type": "Success:StorageApi:Info", "modificationdate": "2018-08-24 16:29:00", "uuid": "d7cc701d-27d7-4575-8580-6afffa09c928", "sourcepath": "c:/ikona/storage1", "filestotal": "3", "freebytespercent": "99,98", "readonly": false, "hrid": "", "maxbytes": "31457280", "tobedrained": false, "customdata": { "performance": "100", "storageminpercent": "0", "reliability": "100", "downloadurl": "http://localhost:8084/ikona-ibs-srv/api/v1/entities/" }, "locked": true, "disctotalspace": "499514339328", "filesnew": "0" }
Error
different error states
List all
Parameter | Type | Required | Comment |
---|---|---|---|
action | String | listall see also API - General parameters |
Example call
/api/storage?action=listall
Answer
Success
{ "storages": [ { "creationdate": "Wed Jul 25 15:17:52 CEST 2018", "uuid ": "bbb42a28-51dd-497c-85a9-16f318612c06", "readonly": false, "hrid": "", "maxbytes": 4398046511104, "description": "Storage1", "tobedrained": false, "locked": false, "sourcepath": { "path": "C:/ikona/ibs/storage1" } }, { "creationdate": "Thu Jul 26 10:35:26 CEST 2018", "uuid ": "549a04d4-0a6b-467b-b2f2-b13fc40f388e", "readonly": false, "hrid": "", "maxbytes": 2097152, "description": "storage2", "tobedrained": false, "locked": false, "sourcepath": { "path": "C:/ikona/ibs/storage2" } }, { "creationdate": "Wed Jul 25 15:18:45 CEST 2018", "uuid ": "86928881-c996-442e-83b0-34a430047036", "readonly": false, "hrid": "", "maxbytes": 3145728, "description": "storage3", "tobedrained": false, "locked": true, "sourcepath": { "path": "C:/ikona/ibs/storage3" } } ], "type": "Result:StorageApi:Listall:Success" }
Error
different error states
Update
Parameter | Type | Required | Comment |
---|---|---|---|
action | String | update see also API - General parameters | |
uuid | uuid | see also API - General parameters | |
maxbytes | long | the number of available bytes | |
description | String | ||
customdata | JSON | possible values:
| |
locked | boolean | set this to false to active the storage, see also Default-Schedule-Worker - Scoring | |
readonly | boolean | if set to true, the storage can only be read, see also Default-Schedule-Worker - Scoring | |
drain | boolean | if set to true, the storage will be drained and cannot be used for fetches, see also Default-Schedule-Worker - G) |
Example call
/api/storage?action=update&uuid=bbb42a28-51dd-497c-85a9-16f318612c06&locked=true&readonly=true
Answer
Success
{ "type": "Result:StorageApi:Update:Success" }
Error
different error states