Frequently Asked Question

Proxmox API - Snapshots for a guest
Last Updated 1 days ago

Prerequisites

  • The hostname for any node in the cluster
  • An API Token and it's secret
  • A guest ID

CURL

Construct a curl command like this; we are sending the token in a header, and encoding the node, guest and function in the URL, and we use jq to format the output which is JSON. 

curl -s --insecure -H 'Authorization: PVEAPIToken=gensupport@pve!DEMO=3342645-8e88-4677-aa74-35635623456' 'https://pve91-lab1.dc.gen:8006/api2/json/nodes/pve91-lab1/qemu/100/snapshot'|jq

Example output


{
  "data": [
    {
      "parent": "installed",
      "snaptime": 1776024657,
      "description": "",
      "name": "Alma-test-snap",
      "vmstate": 0
    },
    {
      "description": "",
      "snaptime": 1775229343,
      "vmstate": 0,
      "name": "installed"
    },
    {
      "vmstate": 0,
      "name": "rikesh",
      "description": "",
      "snaptime": 1775675697,
      "parent": "installed"
    },
    {
      "parent": "Alma-test-snap",
      "description": "You are here!",
      "digest": "27560eb12a52e9931363b842919af8fd69c8f75d",
      "running": 0,
      "name": "current"
    }
  ]
}
This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...