Longhorn
Longhorn is a CNCF incubating lightweight, reliable, and easy-to-use distributed block storage system for Kubernetes. It creates a dedicated storage controller for each volume and replicates data across multiple nodes for high availability. Longhorn supports snapshots, backups to S3-compatible storage, disaster recovery, and recurring backup schedules.
1 APIs
0 Features
BackupBlock StorageCloud NativeIncubatingKubernetesPersistent Volumes
APIs
Longhorn Manager API
The Longhorn Manager exposes a REST API for volume lifecycle management including creating, attaching, detaching, and deleting volumes. It also provides endpoints for snapshot m...
Collections
Longhorn Manager API
OPENPricing Plans
Rate Limits
FinOps
Longhorn Finops
FINOPSSemantic Vocabularies
Resources
🔗
JSONLD
JSONLD
🔗
JSONSchema
JSONSchema
🔗
Website
Website
🔗
Documentation
Documentation
🚀
GettingStarted
GettingStarted
📰
Blog
Blog
📄
ChangeLog
ChangeLog
👥
GitHubOrganization
GitHubOrganization
👥
GitHubRepository
GitHubRepository
🔗
Community
Community
Sources
opencollection: 1.0.0
info:
name: Longhorn Manager API
version: '1.11'
request:
auth:
type: bearer
token: '{{bearerToken}}'
items:
- info:
name: Volumes
type: folder
items:
- info:
name: Longhorn List volumes
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes
docs: Returns a list of all Longhorn volumes in the cluster. Each volume entry includes its name, size, replication configuration,
state, access mode, attached node, snapshot count, and associated recurring jobs.
- info:
name: Longhorn Create a volume
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes
body:
type: json
data: '{}'
docs: Creates a new Longhorn volume with the specified configuration. The volume will be created in a detached state.
It must be attached to a node before data can be written. Longhorn creates the specified number of replicas distributed
across available nodes.
- info:
name: Longhorn Get a volume
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes/:volumeName
params:
- name: volumeName
value: ''
type: path
description: Name of the Longhorn volume.
docs: Returns detailed information about a specific volume including its state, replicas, engine, size, access mode, recurring
jobs, and current operation status.
- info:
name: Longhorn Delete a volume
type: http
http:
method: DELETE
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes/:volumeName
params:
- name: volumeName
value: ''
type: path
description: Name of the Longhorn volume.
docs: Deletes a Longhorn volume and all of its replicas. The volume must be in a detached state before it can be deleted.
All snapshots and backups associated with the volume will also be deleted.
- info:
name: Longhorn Attach a volume to a node
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes/:volumeName?action=attach
params:
- name: volumeName
value: ''
type: path
description: Name of the Longhorn volume.
body:
type: json
data: '{}'
docs: Attaches a Longhorn volume to the specified node, making it available as a block device. The volume must be detached
before it can be attached to a different node.
- info:
name: Longhorn Detach a volume from its node
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes/:volumeName?action=detach
params:
- name: volumeName
value: ''
type: path
description: Name of the Longhorn volume.
body:
type: json
data: '{}'
docs: Detaches a Longhorn volume from the node it is currently attached to. The volume's data is preserved and it can
be reattached to the same or a different node afterward.
- info:
name: Longhorn Expand a volume
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes/:volumeName?action=expand
params:
- name: volumeName
value: ''
type: path
description: Name of the Longhorn volume.
body:
type: json
data: '{}'
docs: Expands a Longhorn volume to a new, larger size. The size must be greater than the current volume size. Online expansion
is supported for volumes attached to nodes; the file system may need to be resized separately after the volume is expanded.
- info:
name: Snapshots
type: folder
items:
- info:
name: Longhorn Create a snapshot
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes/:volumeName?action=snapshotCreate
params:
- name: volumeName
value: ''
type: path
description: Name of the Longhorn volume.
body:
type: json
data: '{}'
docs: Creates a point-in-time snapshot of a Longhorn volume. The volume must be attached when the snapshot is created.
Snapshots are stored in the volume's replica data directories and consume incremental space for changed blocks.
- info:
name: Longhorn List snapshots for a volume
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes/:volumeName?action=snapshotList
params:
- name: volumeName
value: ''
type: path
description: Name of the Longhorn volume.
docs: Returns a list of all snapshots for the specified volume. Each entry includes the snapshot name, creation time,
size, parent, labels, and whether it has been removed or backed up.
- info:
name: Longhorn Delete a snapshot
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes/:volumeName?action=snapshotDelete
params:
- name: volumeName
value: ''
type: path
description: Name of the Longhorn volume.
body:
type: json
data: '{}'
docs: Marks a snapshot for deletion. The snapshot data is reclaimed asynchronously. Deleting a snapshot merges its changed
blocks with the next snapshot in the chain. The volume must be attached.
- info:
name: Longhorn Revert a volume to a snapshot
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes/:volumeName?action=snapshotRevert
params:
- name: volumeName
value: ''
type: path
description: Name of the Longhorn volume.
body:
type: json
data: '{}'
docs: Reverts the contents of a volume to the state captured in a specific snapshot. The volume must be detached before
a revert operation. All data written after the snapshot was created will be lost.
- info:
name: Backups
type: folder
items:
- info:
name: Longhorn Back up a snapshot
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/volumes/:volumeName?action=snapshotBackup
params:
- name: volumeName
value: ''
type: path
description: Name of the Longhorn volume.
body:
type: json
data: '{}'
docs: Triggers a backup of a specific snapshot to the configured external backup target (S3 or NFS). The backup is asynchronous;
monitor the backup resource to track progress.
- info:
name: Longhorn List backup volumes
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/backupvolumes
docs: Returns a list of all backup volumes in the configured backup target. A backup volume contains one or more backups
of a Longhorn volume. This endpoint queries the external backup store.
- info:
name: Longhorn Get a backup volume
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/backupvolumes/:backupVolumeName
params:
- name: backupVolumeName
value: ''
type: path
description: Name of the backup volume in the backup store.
docs: Returns details of a specific backup volume from the backup store including the list of available backups and their
metadata.
- info:
name: Longhorn List backups for a backup volume
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/backupvolumes/:backupVolumeName/backups
params:
- name: backupVolumeName
value: ''
type: path
description: Name of the backup volume in the backup store.
docs: Returns a list of all backups stored for a specific backup volume. Each backup corresponds to a snapshot of the
source Longhorn volume at the time the backup was created.
- info:
name: Nodes
type: folder
items:
- info:
name: Longhorn List nodes
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/nodes
docs: Returns a list of all nodes in the Longhorn storage cluster. Each node entry includes its scheduling eligibility,
disk configurations, conditions, tags, and current state.
- info:
name: Longhorn Get a node
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/nodes/:nodeId
params:
- name: nodeId
value: ''
type: path
description: Identifier of the Longhorn node (typically the Kubernetes node name).
docs: Returns detailed information about a specific node including all configured disks, their storage capacity, scheduling
status, tags, and health conditions.
- info:
name: Longhorn Update a node
type: http
http:
method: PUT
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/nodes/:nodeId
params:
- name: nodeId
value: ''
type: path
description: Identifier of the Longhorn node (typically the Kubernetes node name).
body:
type: json
data: '{}'
docs: Updates a node's configuration including scheduling eligibility, disk configurations, eviction status, and node
tags for workload placement affinity.
- info:
name: EngineImages
type: folder
items:
- info:
name: Longhorn List engine images
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/engineimages
docs: Returns a list of all Longhorn engine images installed in the cluster. Engine images contain the Longhorn storage
engine binary and are used to manage volume upgrade and compatibility.
- info:
name: Longhorn Create an engine image
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/engineimages
body:
type: json
data: '{}'
docs: Deploys a new Longhorn engine image to the cluster by specifying an OCI image reference. Longhorn deploys the engine
binary from this image to all nodes via a DaemonSet.
- info:
name: Longhorn Get an engine image
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/engineimages/:engineImageName
params:
- name: engineImageName
value: ''
type: path
description: Name of the engine image resource.
docs: Returns details of a specific engine image including its deployment state, CLI API version, controller API version,
and which nodes have the image deployed.
- info:
name: Longhorn Delete an engine image
type: http
http:
method: DELETE
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/engineimages/:engineImageName
params:
- name: engineImageName
value: ''
type: path
description: Name of the engine image resource.
docs: Removes an engine image from the cluster. The default engine image and images currently in use by volumes cannot
be deleted.
- info:
name: RecurringJobs
type: folder
items:
- info:
name: Longhorn List recurring jobs
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/recurringjobs
docs: Returns a list of all recurring snapshot and backup jobs configured in Longhorn. Recurring jobs can be assigned
to individual volumes or to groups that apply to multiple volumes.
- info:
name: Longhorn Create a recurring job
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/recurringjobs
body:
type: json
data: '{}'
docs: Creates a new recurring job for automated snapshot or backup operations. The job runs on the specified cron schedule
and applies to all volumes that have this job in their recurring job list or that belong to the job's group.
- info:
name: Longhorn Get a recurring job
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/recurringjobs/:recurringJobName
params:
- name: recurringJobName
value: ''
type: path
description: Name of the recurring job.
docs: Returns details of a specific recurring job including its schedule, task type, retention policy, labels, and group
assignments.
- info:
name: Longhorn Update a recurring job
type: http
http:
method: PUT
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/recurringjobs/:recurringJobName
params:
- name: recurringJobName
value: ''
type: path
description: Name of the recurring job.
body:
type: json
data: '{}'
docs: Updates a recurring job's configuration including schedule, retention count, concurrency, and group assignments.
- info:
name: Longhorn Delete a recurring job
type: http
http:
method: DELETE
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/recurringjobs/:recurringJobName
params:
- name: recurringJobName
value: ''
type: path
description: Name of the recurring job.
docs: Deletes a recurring job. Volumes assigned to this job will no longer have automated snapshots or backups created
by this schedule.
- info:
name: Settings
type: folder
items:
- info:
name: Longhorn List all settings
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/settings
docs: Returns a list of all Longhorn system settings including backup target, default replica count, data locality, storage
over-provisioning percentage, and all other configurable system parameters.
- info:
name: Longhorn Get a setting
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/settings/:settingName
params:
- name: settingName
value: ''
type: path
description: Key name of the Longhorn setting.
docs: Returns the current value and metadata for a specific Longhorn setting. Settings include backup targets, replica
counts, CPU and memory limits, node scheduling policies, and many other system parameters.
- info:
name: Longhorn Update a setting
type: http
http:
method: PUT
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/settings/:settingName
params:
- name: settingName
value: ''
type: path
description: Key name of the Longhorn setting.
body:
type: json
data: '{}'
docs: Updates the value of a specific Longhorn system setting. Changes take effect immediately without requiring a restart.
- info:
name: BackingImages
type: folder
items:
- info:
name: Longhorn List backing images
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/backingimages
docs: Returns a list of all backing images available in the cluster. Backing images are pre-populated disk images used
as the base for new volumes.
- info:
name: Longhorn Create a backing image
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/backingimages
body:
type: json
data: '{}'
docs: Creates a new backing image by uploading or downloading an image file. The backing image is distributed to all nodes
that need it for volume creation.
- info:
name: SystemBackups
type: folder
items:
- info:
name: Longhorn List system backups
type: http
http:
method: GET
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/systembackups
docs: Returns a list of all system-level backups. System backups capture the entire Longhorn configuration including all
CRDs, settings, and metadata to enable full cluster restoration.
- info:
name: Longhorn Create a system backup
type: http
http:
method: POST
url: http://{longhornManagerHost}:{longhornManagerPort}/v1/systembackups
body:
type: json
data: '{}'
docs: Creates a new system-level backup of the Longhorn configuration. The backup is stored in the configured backup target
and can be used to restore the entire Longhorn installation.
bundled: true