Storage

Resources related to storage.

Volume

The Volume resource represents ZFS pools and UFS volumes.

List resource

GET /api/v1.0/storage/volume/

Returns a list of all interfaces.

Example request:

GET /api/v1.0/storage/volume/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "status": "HEALTHY",
          "vol_guid": "8443409799014097611",
          "vol_fstype": "ZFS",
          "used": "192.0 KiB (0%)",
          "name": "tank",
          "used_pct": "0%",
          "used_si": "192.0 KiB",
          "id": 1,
          "vol_encryptkey": "",
          "vol_name": "tank",
          "is_decrypted": true,
          "avail_si": "4.9 GiB",
          "mountpoint": "/mnt/tank",
          "vol_encrypt": 0,
          "children": [],
          "total_si": "4.9 GiB"
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 30
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/storage/volume/

Creates a new volume and returns the new volume object.

Example request:

POST /api/v1.0/storage/volume/ HTTP/1.1
Content-Type: application/json

  {
          "volume_name": "tank",
          "layout": [
                  {
                          "vdevtype": "stripe",
                          "disks": ["ada1", "ada2"]
                  }
          ]
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "status": "HEALTHY",
          "vol_guid": "8443409799014097611",
          "vol_fstype": "ZFS",
          "used": "192.0 KiB (0%)",
          "name": "tank",
          "used_pct": "0%",
          "used_si": "192.0 KiB",
          "id": 1,
          "vol_encryptkey": "",
          "vol_name": "tank",
          "is_decrypted": true,
          "avail_si": "4.9 GiB",
          "mountpoint": "/mnt/tank",
          "vol_encrypt": 0,
          "children": [],
          "total_si": "4.9 GiB"
  }
Json Parameters:
 
  • volume_name (string) – name of the volume
  • layout (list) – list of vdevs composed of “vdevtype” (stripe, mirror, raidz, raidz2, raidz3) and disks (list of disk names)
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Delete resource

DELETE /api/v1.0/storage/volume/(int: id)/

Delete volume id.

Example request:

DELETE /api/v1.0/storage/volume/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

Scrub

POST /api/v1.0/storage/volume/(int:id|string:name)/scrub/

Start scrub for volume id.

Example request:

POST /api/v1.0/storage/volume/tank/scrub/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 202 Accepted
Vary: Accept
Content-Type: application/json

Volume scrub started.
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error
DELETE /api/v1.0/storage/volume/(int:id|string:name)/scrub/

Stop scrub for volume id.

Example request:

DELETE /api/v1.0/storage/volume/tank/scrub/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 202 Accepted
Vary: Accept
Content-Type: application/json

Volume scrub stopped.
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Replace disk

POST /api/v1.0/storage/volume/(int:id|string:name)/replace/

Replace a disk of volume id.

Example request:

POST /api/v1.0/storage/volume/tank/replace/ HTTP/1.1
Content-Type: application/json

  {
          "label": "gptid/7c4dd4f1-1a1f-11e3-9786-080027c5e4f4",
          "replace_disk": "ada4"
  }

Example response:

HTTP/1.1 202 Accepted
Vary: Accept
Content-Type: application/json

Disk replacement started.
Json Parameters:
 
  • label (string) – zfs label of the device
  • replace_disk (string) – name of the new disk
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Detach disk

POST /api/v1.0/storage/volume/(int:id|string:name)/detach/

Detach a disk of volume id.

Example request:

POST /api/v1.0/storage/volume/tank/detach/ HTTP/1.1
Content-Type: application/json

  {
          "label": "gptid/7c4dd4f1-1a1f-11e3-9786-080027c5e4f4",
  }

Example response:

HTTP/1.1 202 Accepted
Vary: Accept
Content-Type: application/json

Disk detached.
Json Parameters:
 
  • label (string) – zfs label of the device
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Unlock

POST /api/v1.0/storage/volume/(int:id|string:name)/unlock/

Unluck encrypted volume id.

Example request:

POST /api/v1.0/storage/volume/tank/unlock/ HTTP/1.1
Content-Type: application/json

  {
          "passphrase": "mypassphrase",
  }

Example response:

HTTP/1.1 202 Accepted
Vary: Accept
Content-Type: application/json

Volume has been unlocked.
Json Parameters:
 
  • passphrase (string) – passphrase to unlock the volume
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Recovery Key

POST /api/v1.0/storage/volume/(int:id|string:name)/recoverykey/

Add a recovery key for volume id.

Example request:

POST /api/v1.0/storage/volume/tank/recoverykey/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 202 Accepted
Vary: Accept
Content-Type: application/json

  {
          "message": "New recovery key has been added.",
          "content": "YWRhc2RzYWRhc2RzYWQ="
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 202 – no error
DELETE /api/v1.0/storage/volume/(int:id|string:name)/recoverykey/

Remove a recovery key for volume id.

Example request:

DELETE /api/v1.0/storage/volume/tank/recoverykey/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 204 – no error

Status

GET /api/v1.0/storage/volume/(int:id|string:name)/status/

Get status of volume id.

Example request:

GET /api/v1.0/storage/volume/tank/status/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "status": "ONLINE",
          "name": "tank",
          "read": "0",
          "id": 1,
          "write": "0",
          "cksum": "0",
          "pk": "tank",
          "type": "root",
          "children": [{
                  "status": "ONLINE",
                  "name": "raidz1-0",
                  "read": "0",
                  "id": 100,
                  "write": "0",
                  "cksum": "0",
                  "type": "vdev",
                  "children": [{
                          "status": "ONLINE",
                          "name": "ada3p2",
                          "read": "0",
                          "label": "gptid/7cc54b3a-1a1f-11e3-9786-080027c5e4f4",
                          "write": "0",
                          "cksum": "0",
                          "id": 101,
                          "type": "dev",
                  },
                  {
                          "status": "ONLINE",
                          "name": "ada2p2",
                          "read": "0",
                          "label": "gptid/7c8bb013-1a1f-11e3-9786-080027c5e4f4",
                          "write": "0",
                          "cksum": "0",
                          "id": 102,
                          "type": "dev",
                  },
                  {
                          "status": "ONLINE",
                          "name": "ada1p2",
                          "read": "0",
                          "label": "gptid/7c4dd4f1-1a1f-11e3-9786-080027c5e4f4",
                          "write": "0",
                          "cksum": "0",
                          "id": 103,
                          "type": "dev",
                  }]
          }]
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Snapshot

The Snapshot resource represents ZFS snapshots.

List resource

GET /api/v1.0/storage/snapshot/

Returns a list of all snapshots.

Example request:

GET /api/v1.0/storage/snapshot/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
  "filesystem": "tank/jails/.warden-template-pluginjail-9.2-RELEASE-x64",
  "fullname": "tank/jails/.warden-template-pluginjail-9.2-RELEASE-x64@clean",
  "id": "tank/jails/.warden-template-pluginjail-9.2-RELEASE-x64",
  "mostrecent": true,
  "name": "clean",
  "parent_type": "filesystem",
  "refer": "482M",
  "used": "107K"
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 30
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/storage/snapshot/

Creates a new snapshot and returns the new snapshot object.

Example request:

POST /api/v1.0/storage/snapshot/ HTTP/1.1
Content-Type: application/json

  {
          "dataset": "tank",
          "name": "test"
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "filesystem": "tank",
          "fullname": "tank@test",
          "id": "tank",
          "mostrecent": true,
          "name": "test",
          "parent_type": "filesystem",
          "refer": "298K",
          "used": "0"
  }
Json Parameters:
 
  • dataset (string) – name of dataset to snapshot
  • name (string) – name of the snapshot
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Delete resource

DELETE /api/v1.0/storage/snapshot/(string: id)/

Delete snapshot id.

Example request:

DELETE /api/v1.0/storage/snapshot/tank@test/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

Task

The Task resource represents Periodic Snapshot Tasks for ZFS Volumes.

List resource

GET /api/v1.0/storage/task/

Returns a list of all periodic snapshot tasks.

Example request:

GET /api/v1.0/storage/task/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "task_ret_count": 2,
          "task_repeat_unit": "weekly",
          "task_enabled": true,
          "task_recursive": false,
          "task_end": "18:00:00",
          "task_interval": 60,
          "task_byweekday": "1,2,3,4,5",
          "task_begin": "09:00:00",
          "task_filesystem": "tank",
          "id": 1,
          "task_ret_unit": "week"
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 30
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/storage/task/

Creates a new Task and returns the new Task object.

Example request:

POST /api/v1.0/storage/task/ HTTP/1.1
Content-Type: application/json

  {
          "task_filesystem": "tank",
          "task_recursive": false,
          "task_ret_unit": "week",
          "task_interval": 60,
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "task_ret_count": 2,
          "task_repeat_unit": "weekly",
          "task_enabled": true,
          "task_recursive": false,
          "task_end": "18:00:00",
          "task_interval": 60,
          "task_byweekday": "1,2,3,4,5",
          "task_begin": "09:00:00",
          "task_filesystem": "tank",
          "id": 1,
          "task_ret_unit": "week"
  }
Json Parameters:
 
  • task_repeat_unit (string) – daily, weekly
  • task_begin (string) – do not snapshot before
  • task_end (string) – do not snapshot after
  • task_filesystem (string) – name of the ZFS filesystem
  • task_ret_unit (string) – hour, day, week, month, year
  • task_byweekday (string) – days of week to snapshot, [1..7]
  • task_interval (integer) – how much time has been passed between two snapshot attempts [5, 10, 15, 30, 60, 120, 180, 240, 360, 720, 1440, 10080]
  • task_ret_count (integer) – snapshot lifetime value
  • task_enabled (boolean) – enabled task
  • task_recursive (boolean) – snapshot all children datasets recursively
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Update resource

PUT /api/v1.0/storage/task/(int: id)/

Update Task id.

Example request:

PUT /api/v1.0/storage/task/1/ HTTP/1.1
Content-Type: application/json

  {
          "task_interval": 30
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "task_ret_count": 2,
          "task_repeat_unit": "weekly",
          "task_enabled": true,
          "task_recursive": false,
          "task_end": "18:00:00",
          "task_interval": 30,
          "task_byweekday": "1,2,3,4,5",
          "task_begin": "09:00:00",
          "task_filesystem": "tank",
          "id": 1,
          "task_ret_unit": "week"
  }
Json Parameters:
 
  • task_repeat_unit (string) – daily, weekly
  • task_begin (string) – do not snapshot before
  • task_end (string) – do not snapshot after
  • task_filesystem (string) – name of the ZFS filesystem
  • task_ret_unit (string) – hour, day, week, month, year
  • task_byweekday (string) – days of week to snapshot, [1..7]
  • task_interval (integer) – how much time has been passed between two snapshot attempts [5, 10, 15, 30, 60, 120, 180, 240, 360, 720, 1440, 10080]
  • task_ret_count (integer) – snapshot lifetime value
  • task_enabled (boolean) – enabled task
  • task_recursive (boolean) – snapshot all children datasets recursively
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

Delete resource

DELETE /api/v1.0/storage/task/(int: id)/

Delete Task id.

Example request:

DELETE /api/v1.0/storage/task/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

Replication

The Replication resource represents ZFS Replication tasks.

List resource

GET /api/v1.0/storage/replication/

Returns a list of all replications.

Example request:

GET /api/v1.0/storage/replication/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "repl_end": "23:59:00",
          "repl_remote_dedicateduser": null,
          "repl_userepl": false,
          "repl_limit": 0,
          "repl_remote_port": 22,
          "repl_remote_dedicateduser_enabled": false,
          "repl_begin": "00:00:00",
          "repl_filesystem": "tank",
          "repl_remote_fast_cipher": false,
          "repl_remote_hostkey": "AAAA",
          "repl_enabled": true,
          "repl_resetonce": false,
          "repl_compression": "lz4",
          "repl_remote_hostname": "testhost",
          "repl_lastsnapshot": "",
          "id": 1,
          "repl_zfs": "tank"
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 30
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/storage/replication/

Creates a new Replication and returns the new Replication object.

Example request:

POST /api/v1.0/storage/replication/ HTTP/1.1
Content-Type: application/json

  {
          "repl_filesystem": "tank",
          "repl_zfs": "tank",
          "repl_remote_hostname": "testhost",
          "repl_remote_hostkey": "AAAA"
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "repl_end": "23:59:00",
          "repl_remote_dedicateduser": null,
          "repl_userepl": false,
          "repl_limit": 0,
          "repl_remote_port": 22,
          "repl_remote_dedicateduser_enabled": false,
          "repl_begin": "00:00:00",
          "repl_filesystem": "tank",
          "repl_remote_fast_cipher": false,
          "repl_remote_hostkey": "AAAA",
          "repl_enabled": true,
          "repl_resetonce": false,
          "repl_compression": "lz4",
          "repl_remote_hostname": "testhost",
          "repl_lastsnapshot": "",
          "id": 1,
          "repl_zfs": "tank"
  }
Json Parameters:
 
  • repl_enabled (boolean) – enable replication
  • repl_filesystem (string) – filesystem to replicate
  • repl_lastsnapshot (string) – last snapshot sent to remote side
  • repl_remote_hostname (string) – remote hostname
  • repl_remote_port (integer) – remote ssh port
  • repl_remote_hostkey (string) – remote ssh publick key
  • repl_remote_fast_cipher (boolean) – use fast cipher
  • repl_remote_dedicateduser_enabled (boolean) – use dedicated user to replicate
  • repl_remote_dedicateduser (string) – dedicated user to replicate
  • repl_userepl (boolean) – recursively replicate and remove stale snapshot on remote side
  • repl_resetonce (boolean) – initialize remote side for once
  • repl_compression (string) – replication stream compression
  • repl_limit (integer) – limit the replication speed in KB/s
  • repl_begin (string) – do not start replication before
  • repl_end (string) – do not start replication after
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Update resource

PUT /api/v1.0/storage/replication/(int: id)/

Update Replication id.

Example request:

PUT /api/v1.0/storage/replication/1/ HTTP/1.1
Content-Type: application/json

  {
          "repl_enabled": false
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "repl_end": "23:59:00",
          "repl_remote_dedicateduser": null,
          "repl_userepl": false,
          "repl_limit": 0,
          "repl_remote_port": 22,
          "repl_remote_dedicateduser_enabled": false,
          "repl_begin": "00:00:00",
          "repl_filesystem": "tank",
          "repl_remote_fast_cipher": false,
          "repl_remote_hostkey": "AAAA",
          "repl_enabled": false,
          "repl_resetonce": false,
          "repl_compression": "lz4",
          "repl_remote_hostname": "testhost",
          "repl_lastsnapshot": "",
          "id": 1,
          "repl_zfs": "tank"
  }
Json Parameters:
 
  • repl_enabled (boolean) – enable replication
  • repl_filesystem (string) – filesystem to replicate
  • repl_lastsnapshot (string) – last snapshot sent to remote side
  • repl_remote_hostname (string) – remote hostname
  • repl_remote_port (integer) – remote ssh port
  • repl_remote_hostkey (string) – remote ssh publick key
  • repl_remote_fast_cipher (boolean) – use fast cipher
  • repl_remote_dedicateduser_enabled (boolean) – use dedicated user to replicate
  • repl_remote_dedicateduser (string) – dedicated user to replicate
  • repl_userepl (boolean) – recursively replicate and remove stale snapshot on remote side
  • repl_resetonce (boolean) – initialize remote side for once
  • repl_compression (string) – replication stream compression
  • repl_limit (integer) – limit the replication speed in KB/s
  • repl_begin (string) – do not start replication before
  • repl_end (string) – do not start replication after
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

Delete resource

DELETE /api/v1.0/storage/replication/(int: id)/

Delete Replication id.

Example request:

DELETE /api/v1.0/storage/replication/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

Scrub

The Scrub resource represents Periodic Snapshot Scrubs for ZFS Volumes.

List resource

GET /api/v1.0/storage/scrub/

Returns a list of all scrubs.

Example request:

GET /api/v1.0/storage/scrub/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "scrub_threshold": 35,
          "scrub_dayweek": "7",
          "scrub_enabled": true,
          "scrub_minute": "00",
          "scrub_hour": "00",
          "scrub_month": "*",
          "scrub_daymonth": "*",
          "scrub_description": "",
          "id": 1,
          "scrub_volume": "tank"
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 30
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/storage/scrub/

Creates a new Scrub and returns the new Scrub object.

Example request:

POST /api/v1.0/storage/scrub/ HTTP/1.1
Content-Type: application/json

  {
          "scrub_volume": 1,
          "scrub_dayweek": "7",
          "scrub_minute": "00",
          "scrub_hour": "00",
          "scrub_month": "*",
          "scrub_daymonth": "*"
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "scrub_threshold": 35,
          "scrub_dayweek": "7",
          "scrub_enabled": true,
          "scrub_minute": "00",
          "scrub_hour": "00",
          "scrub_month": "*",
          "scrub_daymonth": "*",
          "scrub_description": "",
          "id": 1,
          "scrub_volume": "tank"
  }
Json Parameters:
 
  • scrub_volume (integer) – id to volume object
  • scrub_threshold (integer) – determine how many days shall be between scrubs
  • scrub_description (string) – user description
  • scrub_minute (string) – values 0-59 allowed
  • scrub_hour (string) – values 0-23 allowed
  • scrub_daymonth (string) – day of month, values 1-31 allowed
  • scrub_month (string) – month
  • scrub_dayweek (string) – day of week
  • scrub_enabled (boolean) – scrub enabled
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Update resource

PUT /api/v1.0/storage/scrub/(int: id)/

Update Scrub id.

Example request:

PUT /api/v1.0/storage/scrub/1/ HTTP/1.1
Content-Type: application/json

  {
          "scrub_dayweek": "6"
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "scrub_threshold": 35,
          "scrub_dayweek": "6",
          "scrub_enabled": true,
          "scrub_minute": "00",
          "scrub_hour": "00",
          "scrub_month": "*",
          "scrub_daymonth": "*",
          "scrub_description": "",
          "id": 1,
          "scrub_volume": "tank"
  }
Json Parameters:
 
  • scrub_volume (integer) – id to volume object
  • scrub_threshold (integer) – determine how many days shall be between scrubs
  • scrub_description (string) – user description
  • scrub_minute (string) – values 0-59 allowed
  • scrub_hour (string) – values 0-23 allowed
  • scrub_daymonth (string) – day of month, values 1-31 allowed
  • scrub_month (string) – month
  • scrub_dayweek (string) – day of week
  • scrub_enabled (boolean) – scrub enabled
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

Delete resource

DELETE /api/v1.0/storage/scrub/(int: id)/

Delete Scrub id.

Example request:

DELETE /api/v1.0/storage/scrub/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

Disk

The Disk resource represents available disks in the system.

List resource

GET /api/v1.0/storage/disk/

Returns a list of all disks.

Example request:

GET /api/v1.0/storage/disk/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "disk_acousticlevel": "Disabled",
          "disk_advpowermgmt": "Disabled",
          "disk_serial": "VBad9d9bb7-3d1d3bce",
          "disk_size": "4294967296",
          "disk_multipath_name": "",
          "disk_identifier": "{serial}VBad9d9bb7-3d1d3bce",
          "disk_togglesmart": true,
          "id": 8,
          "disk_hddstandby": "Always On",
          "disk_transfermode": "Auto",
          "disk_multipath_member": "",
          "disk_description": "",
          "disk_smartoptions": "",
          "disk_enabled": true,
          "disk_name": "ada7"
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 30
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/storage/disk/(int: id)/

Update Disk id.

Example request:

PUT /api/v1.0/storage/disk/1/ HTTP/1.1
Content-Type: application/json

  {
          "disk_togglesmart": false
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "disk_acousticlevel": "Disabled",
          "disk_advpowermgmt": "Disabled",
          "disk_serial": "VBad9d9bb7-3d1d3bce",
          "disk_size": "4294967296",
          "disk_multipath_name": "",
          "disk_identifier": "{serial}VBad9d9bb7-3d1d3bce",
          "disk_togglesmart": false,
          "id": 8,
          "disk_hddstandby": "Always On",
          "disk_transfermode": "Auto",
          "disk_multipath_member": "",
          "disk_description": "",
          "disk_smartoptions": "",
          "disk_enabled": true,
          "disk_name": "ada7"
  }
Json Parameters:
 
  • disk_description (string) – user description
  • disk_hddstandby (string) – Always On, 5, 10, 20, 30, 60, 120, 180, 240, 300, 330
  • disk_advpowermgmt (string) – Disabled, 1, 64, 127, 128. 192, 254
  • disk_acousticlevel (string) – Disabled, Minimum, Medium, Maximum
  • disk_togglesmart (boolean) – Enable S.M.A.R.T.
  • disk_smartoptions (string) – S.M.A.R.T. extra options
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error