Resources related to storage.
The Volume resource represents ZFS pools and UFS volumes.
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: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: |
|
---|
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: | |
---|---|
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Status Codes: |
|
The Snapshot resource represents ZFS snapshots.
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: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: |
|
---|
The Task resource represents Periodic Snapshot Tasks for ZFS Volumes.
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: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The Replication resource represents ZFS Replication tasks.
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: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: |
|
---|
The Scrub resource represents Periodic Snapshot Scrubs for ZFS Volumes.
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: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The Disk resource represents available disks in the system.
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: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
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: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|