REST-API: Storage
Erzeugt aus dem OpenAPI-Dokument des Daemons. Konventionen, Anmeldung, der CSRF-Header und der WebSocket stehen unter API.
GET /api/storage/alerts
Abschnitt betitelt „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.
Antworten
- 200:
application/json: StorageHealth
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
POST /api/storage/alerts/{key}/mute
Abschnitt betitelt „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.
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
key |
path | string | ja |
Antworten
- 200:
application/json: StorageHealth
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
DELETE /api/storage/alerts/{key}/mute
Abschnitt betitelt „DELETE /api/storage/alerts/{key}/mute“Administrators only. Shows a muted alert again.
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
key |
path | string | ja |
Antworten
- 200:
application/json: StorageHealth
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
GET /api/storage/disks
Abschnitt betitelt „GET /api/storage/disks“Administrators only. Every disk with the disk guard’s verdict: whether a new pool may use it, and why not.
Antworten
- 200:
application/json: StorageDiskList
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
POST /api/storage/import/scan
Abschnitt betitelt „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.
Antworten
- 200:
application/json: ImportScan
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
POST /api/storage/plans
Abschnitt betitelt „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.
Anfrage-Body: application/json: StoragePlanRequest
Antworten
- 200:
application/json: StoragePlanPreview
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
POST /api/storage/plans/{planId}/run
Abschnitt betitelt „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.
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
planId |
path | string | ja |
Antworten
- 202:
application/json: Job
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
GET /api/storage/pools
Abschnitt betitelt „GET /api/storage/pools“Administrators only. Pools with their vdevs, and datasets, as last read; live through the storage/pools topic.
Antworten
- 200:
application/json: PoolList
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
POST /api/storage/pools/{pool}/scrub
Abschnitt betitelt „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.
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
pool |
path | string | ja |
Antworten
- 204
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
DELETE /api/storage/pools/{pool}/scrub
Abschnitt betitelt „DELETE /api/storage/pools/{pool}/scrub“Administrators only. Stops the running scrub; the next one starts from the beginning.
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
pool |
path | string | ja |
Antworten
- 204
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
POST /api/storage/pools/{pool}/scrub/pause
Abschnitt betitelt „POST /api/storage/pools/{pool}/scrub/pause“Administrators only. Pauses the running scrub; starting it again resumes where it stopped.
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
pool |
path | string | ja |
Antworten
- 204
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
GET /api/storage/schedules
Abschnitt betitelt „GET /api/storage/schedules“Administrators only. Scrub schedules per pool and the SMART self-test schedules, with their last and next runs.
Antworten
- 200:
application/json: StorageScheduleList
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
PUT /api/storage/schedules
Abschnitt betitelt „PUT /api/storage/schedules“Administrators only. Sets how often a pool is scrubbed or the disks run a self-test: off, weekly or monthly.
Anfrage-Body: application/json: StorageScheduleUpdate
Antworten
- 200:
application/json: StorageScheduleList
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
GET /api/storage/snapshots
Abschnitt betitelt „GET /api/storage/snapshots“Administrators only. The snapshots of a dataset as last read, oldest first. pithyxKind is set for snapshots Pithyx took.
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
dataset |
query | string | ja |
Antworten
- 200:
application/json: SnapshotList
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
POST /api/storage/snapshots
Abschnitt betitelt „POST /api/storage/snapshots“Administrators only. Takes pithyx-manual-
Anfrage-Body: application/json: SnapshotCreateRequest
Antworten
- 201:
application/json: Snapshot
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
POST /api/storage/snapshots/hold
Abschnitt betitelt „POST /api/storage/snapshots/hold“Administrators only. Places the hold “pithyx” on the snapshot, so neither a schedule nor anyone else can destroy it.
Anfrage-Body: application/json: SnapshotRequest
Antworten
- 204
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
POST /api/storage/snapshots/release
Abschnitt betitelt „POST /api/storage/snapshots/release“Administrators only. Releases the hold “pithyx” of the snapshot. Holds of other tools stay.
Anfrage-Body: application/json: SnapshotRequest
Antworten
- 204
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
GET /api/storage/snapshots/schedules
Abschnitt betitelt „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.
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
dataset |
query | string | ja |
Antworten
- 200:
application/json: SnapshotScheduleList
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
PUT /api/storage/snapshots/schedules
Abschnitt betitelt „PUT /api/storage/snapshots/schedules“Administrators only. Saves the given schedules of a dataset. A schedule takes pithyx-
Anfrage-Body: application/json: SnapshotScheduleList
Antworten
- 200:
application/json: SnapshotScheduleList
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.