REST API: Storage
Generated from the daemon’s OpenAPI document. Conventions, sign-in, the CSRF header and the WebSocket are on API.
GET /api/storage/alerts
Section titled “GET /api/storage/alerts”Administrators only. Current storage alerts with the caller’s mute flags, and the SMART state of every disk; live through the storage/alerts topic.
Responses
- 200:
application/json: StorageHealth
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/storage/alerts/{key}/mute
Section titled “POST /api/storage/alerts/{key}/mute”Administrators only. Hides a current alert for the caller until it goes away or becomes more severe. Alerts cannot be deleted.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key |
path | string | yes |
Responses
- 200:
application/json: StorageHealth
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
DELETE /api/storage/alerts/{key}/mute
Section titled “DELETE /api/storage/alerts/{key}/mute”Administrators only. Shows a muted alert again.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key |
path | string | yes |
Responses
- 200:
application/json: StorageHealth
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/storage/disks
Section titled “GET /api/storage/disks”Administrators only. Every disk with the disk guard’s verdict: whether a new pool may use it, and why not.
Responses
- 200:
application/json: StorageDiskList
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/storage/import/scan
Section titled “POST /api/storage/import/scan”Administrators only. Looks for pools on the disks that are not imported (zpool import, which reads every disk’s labels and may wake a sleeping disk) and returns each with its layout and the disk guard’s import verdict. Imports nothing; importing is the plan pool.import.readonly, then pool.import.
Responses
- 200:
application/json: ImportScan
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/storage/plans
Section titled “POST /api/storage/plans”Administrators only. Probes the chosen disks, asks the disk guard and returns the exact commands of a destructive storage action, with a plan id to run them. Runs nothing.
Request body: application/json: StoragePlanRequest
Responses
- 200:
application/json: StoragePlanPreview
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/storage/plans/{planId}/run
Section titled “POST /api/storage/plans/{planId}/run”Administrators only. Runs a plan exactly as it was shown, as a job; the disk guard checks every disk again right before each command. A plan runs once and expires after 10 minutes.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
planId |
path | string | yes |
Responses
- 202:
application/json: Job
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/storage/pools
Section titled “GET /api/storage/pools”Administrators only. Pools with their vdevs, and datasets, as last read; live through the storage/pools topic.
Responses
- 200:
application/json: PoolList
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/storage/pools/{pool}/scrub
Section titled “POST /api/storage/pools/{pool}/scrub”Administrators only. Starts a scrub of the pool, or resumes a paused one, and returns at once; progress arrives on storage/pools.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
pool |
path | string | yes |
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
DELETE /api/storage/pools/{pool}/scrub
Section titled “DELETE /api/storage/pools/{pool}/scrub”Administrators only. Stops the running scrub; the next one starts from the beginning.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
pool |
path | string | yes |
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/storage/pools/{pool}/scrub/pause
Section titled “POST /api/storage/pools/{pool}/scrub/pause”Administrators only. Pauses the running scrub; starting it again resumes where it stopped.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
pool |
path | string | yes |
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/storage/schedules
Section titled “GET /api/storage/schedules”Administrators only. Scrub schedules per pool and the SMART self-test schedules, with their last and next runs.
Responses
- 200:
application/json: StorageScheduleList
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
PUT /api/storage/schedules
Section titled “PUT /api/storage/schedules”Administrators only. Sets how often a pool is scrubbed or the disks run a self-test: off, weekly or monthly.
Request body: application/json: StorageScheduleUpdate
Responses
- 200:
application/json: StorageScheduleList
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/storage/snapshots
Section titled “GET /api/storage/snapshots”Administrators only. The snapshots of a dataset as last read, oldest first. pithyxKind is set for snapshots Pithyx took.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dataset |
query | string | yes |
Responses
- 200:
application/json: SnapshotList
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/storage/snapshots
Section titled “POST /api/storage/snapshots”Administrators only. Takes pithyx-manual-
Request body: application/json: SnapshotCreateRequest
Responses
- 201:
application/json: Snapshot
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/storage/snapshots/hold
Section titled “POST /api/storage/snapshots/hold”Administrators only. Places the hold “pithyx” on the snapshot, so neither a schedule nor anyone else can destroy it.
Request body: application/json: SnapshotRequest
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/storage/snapshots/release
Section titled “POST /api/storage/snapshots/release”Administrators only. Releases the hold “pithyx” of the snapshot. Holds of other tools stay.
Request body: application/json: SnapshotRequest
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/storage/snapshots/schedules
Section titled “GET /api/storage/snapshots/schedules”Administrators only. The hourly, daily, weekly and monthly schedules of a dataset; off with the default counts (24, 7, 4, 6) until saved.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dataset |
query | string | yes |
Responses
- 200:
application/json: SnapshotScheduleList
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
PUT /api/storage/snapshots/schedules
Section titled “PUT /api/storage/snapshots/schedules”Administrators only. Saves the given schedules of a dataset. A schedule takes pithyx-
Request body: application/json: SnapshotScheduleList
Responses
- 200:
application/json: SnapshotScheduleList
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.