Storage API

Overview

Use the Storage API in order to manage storages that are used by IBS.


Create

ParameterTypeRequiredComment
actionString(tick)

create

see also API - General parameters

maxbyteslong
the number of available bytes
sourcepathString

the path to the storage

customdataJSON

possible values:

  • drainduedate: if drain is true, then one can postpone start of draining with this value, see also Default-Schedule-Worker - G)
  • de.jenomics.ikona.binarystore.worker.schedule.StandardScheduleProcessor.reliability: int-value, i.e. the reliability in percent; default: 100, see also Default-Schedule-Worker - Scoring
  • de.jenomics.ikona.binarystore.worker.schedule.StandardScheduleProcessor.performance: int-value, i.e. the performance in percent - 100% means best performance; default: 100, see also Default-Schedule-Worker - Scoring

  • downloadurl: the first part of the download-url, e.g.

    "http://localhost:8084/ikona-ibs-srv/api/v1/entities/" => It is added with the uuid of the entity that should be downloaded and can be found in Entity API - Info

descriptionString
the description of the storage
hridString
the hrid of the storage
readonlyboolean
if set to true, the storage can only be read
drainboolean
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 (question)



Info

ParameterTypeRequired

Comment

actionString(tick)

info

see also API - General parameters

uuiduuid(tick)see also API - General parameters
verboseboolean
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 (question)



List all

ParameterTypeRequiredComment
actionString(tick)

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 (question)




Update

ParameterType

Required

Comment
actionString(tick)

update

see also API - General parameters

uuiduuid(tick)see also API - General parameters

maxbytes


long
the number of available bytes
descriptionString

customdataJSON

possible values:

  • drainduedate: if drain is true, then one can postpone start of draining with this value, see also Default-Schedule-Worker - G)
  • de.jenomics.ikona.binarystore.worker.schedule.StandardScheduleProcessor.reliability: int-value, i.e. the reliability in percent; default: 100, see also Default-Schedule-Worker - Scoring
  • de.jenomics.ikona.binarystore.worker.schedule.StandardScheduleProcessor.performance: int-value, i.e. the performance in percent - 100% means best performance; default: 100, see also Default-Schedule-Worker - Scoring
lockedboolean
set this to false to active the storage, see also Default-Schedule-Worker - Scoring
readonlyboolean
if set to true, the storage can only be read, see also Default-Schedule-Worker - Scoring
drainboolean
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 (question)