# Canonical Instances API

**Canonical:** https://apis.io/apis/canonical/canonical-instances-api/  
**Provider:** Canonical — https://apis.io/providers/canonical/  
**Base URL:** https://api.snapcraft.io  
**Documentation:** https://api.snapcraft.io/docs/

Canonical Instances API is one of 114 APIs that [Canonical](https://apis.io/providers/canonical/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Instances. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, and release notes.

The instances API from Canonical — 29 operation(s) for instances.

## Operations (58)

| Method | Path | Summary |
|---|---|---|
| GET | `/1.0/instances` | Get a list of instances |
| POST | `/1.0/instances` | Create a new instance |
| DELETE | `/1.0/instances` | Delete multiple instances |
| PUT | `/1.0/instances` | Bulk instance state update |
| GET | `/1.0/instances/{id_or_name}` | Get information about a specific instance instance |
| DELETE | `/1.0/instances/{id_or_name}` | Delete a specific instance |
| PATCH | `/1.0/instances/{id_or_name}` | Update the state of a specific instance instance |
| POST | `/1.0/instances/{id_or_name}/exec` | Execute a command in a instance |
| GET | `/1.0/instances/{id_or_name}/logs` | Get a list of collected log files for the instance |
| GET | `/1.0/instances/{id_or_name}/logs/{name}` | Retrieve a specific log file stored for the instance |
| GET | `/1.0/instances?recursion=1` | Get a list of instances |
| DELETE | `/1.0/instances/{name}` | Delete an instance |
| GET | `/1.0/instances/{name}` | Get the instance |
| PATCH | `/1.0/instances/{name}` | Partially update the instance |
| POST | `/1.0/instances/{name}` | Rename or move/migrate an instance |
| PUT | `/1.0/instances/{name}` | Update the instance |
| GET | `/1.0/instances/{name}/backups` | Get the backups |
| POST | `/1.0/instances/{name}/backups` | Create a backup |
| DELETE | `/1.0/instances/{name}/backups/{backup}` | Delete a backup |
| GET | `/1.0/instances/{name}/backups/{backup}` | Get the backup |
| POST | `/1.0/instances/{name}/backups/{backup}` | Rename a backup |
| GET | `/1.0/instances/{name}/backups/{backup}/export` | Get the raw backup file(s) |
| GET | `/1.0/instances/{name}/backups?recursion=1` | Get the backups |
| DELETE | `/1.0/instances/{name}/console` | Clear the console log |
| GET | `/1.0/instances/{name}/console` | Get console log |
| POST | `/1.0/instances/{name}/console` | Connect to console |
| POST | `/1.0/instances/{name}/exec` | Run a command |
| DELETE | `/1.0/instances/{name}/files` | Delete a file |
| GET | `/1.0/instances/{name}/files` | Get a file |
| HEAD | `/1.0/instances/{name}/files` | Get metadata for a file |
| POST | `/1.0/instances/{name}/files` | Create or replace a file |
| GET | `/1.0/instances/{name}/logs` | Get the log files |
| GET | `/1.0/instances/{name}/logs/{filename}` | Get the log file |
| GET | `/1.0/instances/{name}/logs/exec-output` | Get the exec record-output files |
| DELETE | `/1.0/instances/{name}/logs/exec-output/{filename}` | Delete the exec record-output file |
| GET | `/1.0/instances/{name}/logs/exec-output/{filename}` | Get the exec-output log file |
| GET | `/1.0/instances/{name}/metadata` | Get the instance image metadata |
| PATCH | `/1.0/instances/{name}/metadata` | Partially update the image metadata |
| PUT | `/1.0/instances/{name}/metadata` | Update the image metadata |
| DELETE | `/1.0/instances/{name}/metadata/templates` | Delete a template file |
| GET | `/1.0/instances/{name}/metadata/templates` | Get the template file names or a specific |
| POST | `/1.0/instances/{name}/metadata/templates` | Create or replace a template file |
| POST | `/1.0/instances/{name}/rebuild` | Rebuild an instance |
| GET | `/1.0/instances/{name}/sftp` | Get the instance SFTP connection |
| GET | `/1.0/instances/{name}/snapshots` | Get the snapshots |
| POST | `/1.0/instances/{name}/snapshots` | Create a snapshot |
| DELETE | `/1.0/instances/{name}/snapshots/{snapshot}` | Delete a snapshot |
| GET | `/1.0/instances/{name}/snapshots/{snapshot}` | Get the snapshot |
| PATCH | `/1.0/instances/{name}/snapshots/{snapshot}` | Partially update snapshot |
| POST | `/1.0/instances/{name}/snapshots/{snapshot}` | Rename or move/migrate a snapshot |
| PUT | `/1.0/instances/{name}/snapshots/{snapshot}` | Update snapshot |
| GET | `/1.0/instances/{name}/snapshots?recursion=1` | Get the snapshots |
| GET | `/1.0/instances/{name}/state` | Get the runtime state |
| PUT | `/1.0/instances/{name}/state` | Change the state |
| GET | `/1.0/instances/{name}/uefi-vars` | Get the instance's UEFI variables |
| PUT | `/1.0/instances/{name}/uefi-vars` | Set the instance's UEFI variables |
| GET | `/1.0/instances/{name}?recursion=1` | Get the instance |
| GET | `/1.0/instances?recursion=2` | Get the instances |

## Machine-readable artifacts (25)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/canonical/refs/heads/main/openapi/canonical-instances-api-openapi.yml
- **Documentation** — https://snapcraft.io/docs/reference/development/snapd-rest-api/
- **HowTo** — https://snapcraft.io/docs/how-to-guides/snap-development/use-the-rest-api/
- **Documentation** — https://ubuntu.com/landscape/docs
- **APIReference** — https://documentation.ubuntu.com/landscape/reference/api/
- **ReleaseNotes** — https://documentation.ubuntu.com/landscape/reference/release-notes/
- **Portal** — https://ubuntu.com/landscape
- **Documentation** — https://documentation.ubuntu.com/lxd/latest/rest-api/
- **APIReference** — https://documentation.ubuntu.com/lxd/latest/api-extensions/
- **SourceCode** — https://github.com/canonical/lxd
- **Portal** — https://canonical.com/lxd
- **Documentation** — https://ubuntu.com/security/api/docs
- **APIReference** — https://ubuntu.com/security/api/spec.json
- **Portal** — https://ubuntu.com/security
- **Documentation** — https://documentation.ubuntu.com/pebble/
- **SourceCode** — https://github.com/canonical/pebble
- **Documentation** — https://canonical-testflinger.readthedocs-hosted.com/en/latest/
- **SourceCode** — https://github.com/canonical/testflinger
- **SourceCode** — https://github.com/canonical/hardware-api
- **Portal** — https://ubuntu.com/certified
- **SourceCode** — https://github.com/canonical/identity-platform-api
- **SourceCode** — https://github.com/canonical/test_observer
- **Documentation** — https://documentation.ubuntu.com/anbox-cloud/
- **Portal** — https://canonical.com/anbox-cloud
- **SourceCode** — https://github.com/canonical/cos-registration-server

## Other Canonical APIs (12)

- [Snap Store API](https://apis.io/apis/canonical/snap-store-api/)
- [Charmhub API](https://apis.io/apis/canonical/charmhub-api/)
- [MAAS API](https://apis.io/apis/canonical/maas-api/)
- [Juju Client / Controller API](https://apis.io/apis/canonical/juju-api/)
- [Launchpad Web Services API](https://apis.io/apis/canonical/launchpad-api/)
- [Ubuntu Pro Client API](https://apis.io/apis/canonical/ubuntu-pro-api/)
- [Canonical Assertions API](https://apis.io/apis/canonical/canonical-assertions-api/)
- [Canonical Search API](https://apis.io/apis/canonical/canonical-search-api/)
- [Canonical Snaps API](https://apis.io/apis/canonical/canonical-snaps-api/)
- [MicroCeph REST API](https://apis.io/apis/canonical/microceph-api/)
- [Canonical App Authorization Service API](https://apis.io/apis/canonical/canonical-appauthorizationservice-api/)
- [Canonical Application API](https://apis.io/apis/canonical/canonical-application-api/)

## Tags

Instances

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/canonical/canonical-instances-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/canonical/.
