api.vm.snapshot

/vm/define/snapshot

api.vm.snapshot.views.vm_define_snapshot_list_all(*args, **kwargs)

List (GET) all snapshot definitions for all VMs.

GET /vm/define/snapshot
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • data.full (boolean) – Return list of objects with all snapshot definition details (default: false)
  • data.extended (boolean) – Include total number of snapshots for each snapshot definition (default: false)
  • data.order_by (string) – Available fields for sorting: name, disk_id, hostname, created (default: hostname,-created)
Status Codes:

/vm/(hostname_or_uuid)/define/snapshot

api.vm.snapshot.views.vm_define_snapshot_list(*args, **kwargs)

List (GET) all VM snapshot definitions.

GET /vm/(hostname_or_uuid)/define/snapshot
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • data.full (boolean) – Return list of objects with all snapshot definition details (default: false)
  • data.disk_id (integer) – Filter by disk number/ID
  • data.extended (boolean) – Include total number of snapshots for each snapshot definition (default: false)
  • data.order_by (string) – Available fields for sorting: name, disk_id, created (default: -created)
Status Codes:

es example:

es get /vm/example.cust.erigones.com/define/snapshot
{
    "url": "https://my.erigones.com/api/vm/example.cust.erigones.com/define/snapshot/",
    "status": 200,
    "method": "GET",
    "text": {
        "status": "SUCCESS",
        "result": [
            {
                "name": "daily",
                "schedule": "30 5 * * *",
                "hostname": "example.cust.erigones.com",
                "disk_id": 1,
                "active": true,
                "retention": 30,
                "desc": ""
            }
        ],
        "task_id": "1e1-6f75849b-f77a-4356-a00e"
    }
}

/vm/(hostname_or_uuid)/define/snapshot/(snapdef)

api.vm.snapshot.views.vm_define_snapshot(*args, **kwargs)

Show (GET), create (POST), remove (DELETE) or update (PUT) a VM snapshot definition and schedule.

GET /vm/(hostname_or_uuid)/define/snapshot/(snapdef)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • snapdef (string) – required - Snapshot definition name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
  • data.extended (boolean) – Include total number of snapshots (default: false)
Status Codes:
POST /vm/(hostname_or_uuid)/define/snapshot/(snapdef)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • snapdef (string) – required - Snapshot definition name (predefined: hourly, daily, weekly, monthly)
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
  • data.schedule (string) – required - Schedule in UTC CRON format (e.g. 30 4 * * 6)
  • data.retention (integer) – required - Maximum number of snapshots to keep
  • data.active (boolean) – Enable or disable snapshot schedule (default: true)
  • data.desc (string) – Snapshot definition description
  • data.fsfreeze (boolean) – Whether to send filesystem freeze command to QEMU agent socket before creating snapshot (requires QEMU Guest Agent) (default: false)
Status Codes:
PUT /vm/(hostname_or_uuid)/define/snapshot/(snapdef)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • snapdef (string) – required - Snapshot definition name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
  • data.schedule (string) – Schedule in UTC CRON format (e.g. 30 4 * * 6)
  • data.retention (integer) – Maximum number of snapshots to keep
  • data.active (boolean) – Enable or disable snapshot schedule
  • data.desc (string) – Snapshot definition description
Status Codes:
DELETE /vm/(hostname_or_uuid)/define/snapshot/(snapdef)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • snapdef (string) – required - Snapshot definition name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
Status Codes:

es example:

es create /vm/example.cust.erigones.com/define/snapshot/daily -disk_id 1 -schedule "30 5 * * *" -retention 30
{
    "url": "https://my.erigones.com/api/vm/example.cust.erigones.com/define/snapshot/daily/",
    "status": 201,
    "method": "POST",
    "text": {
        "status": "SUCCESS",
        "result": {
            "name": "daily",
            "schedule": "30 5 * * *",
            "hostname": "example.cust.erigones.com",
            "disk_id": 1,
            "active": true,
            "retention": 30,
            "desc": ""
        },
        "task_id": "1e1-6f75849b-564b-4be3-bff0"
    }
}

/vm/(hostname_or_uuid)/snapshot

api.vm.snapshot.views.vm_snapshot_list(*args, **kwargs)

List (GET) all VM snapshots or synchronize (PUT) snapshots of VM’s disk on compute node with snapshots saved in database. Delete (DELETE) VM snapshots specified by the list (data.snapnames).

GET /vm/(hostname_or_uuid)/snapshot
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • data.full (boolean) – Return list of objects with all snapshot details (default: false)
  • data.disk_id (integer) – Filter by disk number/ID
  • data.type (integer) – Filter by snapshot type (1 - Automatic, 2 - Manual)
  • data.define (string) – Filter by snapshot definition name
  • data.order_by (string) – Available fields for sorting: name, disk_id, size, created (default: -created)
Status Codes:
PUT /vm/(hostname_or_uuid)/snapshot
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
Status Codes:
DELETE /vm/(hostname_or_uuid)/snapshot
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • data.snapnames (array) – required - List of snapshot names to be deleted
Status Codes:

es example:

es get /vm/example.cust.erigones.com/snapshot
{
    "url": "https://my.erigones.com/api/vm/example.cust.erigones.com/snapshot/",
    "status": 200,
    "method": "GET",
    "text": {
        "status": "SUCCESS",
        "result": [
            {
                "status": 1,
                "name": "backup1",
                "created": "2012-01-22T23:23:23.465Z",
                "hostname": "example.cust.erigones.com",
                "disk_id": 1,
                "note": "",
                "type": 2,
                "define": null
            }
        ],
        "task_id": "0-6f75849b-e62b-4d45-81f9"
    }
}

/vm/(hostname_or_uuid)/snapshot/(snapname)

api.vm.snapshot.views.vm_snapshot(*args, **kwargs)

Show (GET), create (POST), destroy (DELETE) or rollback (PUT) a snapshot of VM’s disk.

GET /vm/(hostname_or_uuid)/snapshot/(snapname)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • snapname (string) – required - Snapshot name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
Status Codes:
POST /vm/(hostname_or_uuid)/snapshot/(snapname)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • snapname (string) – required - Snapshot name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
  • data.note (string) – Snapshot comment
  • data.fsfreeze (boolean) – Whether to send filesystem freeze command to QEMU agent socket before creating snapshot (requires QEMU Guest Agent) (default: false)
Status Codes:
PUT /vm/(hostname_or_uuid)/snapshot/(snapname)

Warning

A snapshot rollback will restore disk data from the snapshot; All data created after the snapshot will be lost (including all newer snapshots)!

Warning

When restoring a snapshot into another server’s disk all existing snapshots on the target server will be lost!

DC-bound?:
Permissions:
Asynchronous?:
  • - Rollback snapshot
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • snapname (string) – required - Snapshot name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
  • data.force (boolean) – Force recursive rollback (default: true)
  • data.target_hostname_or_uuid (string) – Target server hostname or uuid (default: source and destination server are the same)
  • data.target_disk_id (integer) – Target disk number/ID; Makes sense (and required) only when target_hostname_or_uuid is specified (default: not used, because the snapshot is restored on the same disk ID)
Status Codes:
PUT /vm/(hostname_or_uuid)/snapshot/(snapname)
DC-bound?:
Permissions:
Asynchronous?:
  • - Update snapshot note
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • snapname (string) – required - Snapshot name
  • data.note (string) – required - Snapshot comment
Status Codes:
DELETE /vm/(hostname_or_uuid)/snapshot/(snapname)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • snapname (string) – required - Snapshot name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
Status Codes:

es example:

es create /vm/example.cust.erigones.com/snapshot/backup1 -disk 1
{
    "url": "https://my.erigones.com/api/vm/example.cust.erigones.com/snapshot/backup1/",
    "status": 200,
    "method": "POST",
    "text": {
        "status": "SUCCESS",
        "result": {
            "message": "Snapshot successfully created",
            "returncode": 0,
            "detail": "name=backup1, disk_id=1, type=2"
        },
        "task_id": "0-7b37f603-4930-41d6-8da6"
    }
}