Skip to content

REST API: Storage

View as Markdown

Generated from the daemon’s OpenAPI document. Conventions, sign-in, the CSRF header and the WebSocket are on API.

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

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

Administrators only. Shows a muted alert again.

Parameters

Name In Type Required Description
key path string yes

Responses

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

Administrators only. Every disk with the disk guard’s verdict: whether a new pool may use it, and why not.

Responses

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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.

Administrators only. Pools with their vdevs, and datasets, as last read; live through the storage/pools topic.

Responses

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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.

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.

Administrators only. Scrub schedules per pool and the SMART self-test schedules, with their last and next runs.

Responses

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

Administrators only. Takes pithyx-manual- of the dataset now. Manual snapshots are never pruned by a schedule.

Request body: application/json: SnapshotCreateRequest

Responses

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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.

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.

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

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

Administrators only. Saves the given schedules of a dataset. A schedule takes pithyx-- once per UTC hour, day, week (from Monday) or month and keeps its newest keep snapshots; it never deletes other snapshots, held ones or ones dated after the current time.

Request body: application/json: SnapshotScheduleList

Responses

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.