403Webshell
Server IP : 103.161.17.216  /  Your IP : 216.73.216.1
Web Server : nginx/1.18.0
System : Linux tipsysaigoncharming 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /snap/lxd/37560/share/lxd-documentation/rest-api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/lxd/37560/share/lxd-documentation/rest-api/index.html
<!doctype html>
<html class="no-js" lang="en" data-content_root="../">
  <head><meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="REST API" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://documentation.ubuntu.com/lxd/latest/rest-api/" />
<meta property="og:site_name" content="LXD documentation" />
<meta property="og:description" content="All communication between LXD and its clients happens using a RESTful API over HTTP. This API is encapsulated over either TLS (for remote operations) or a Unix socket (for local operations). See Re..." />
<meta property="og:image" content="https://documentation.ubuntu.com/lxd/latest/_static/tag.png" />
<meta property="og:image:alt" content="LXD documentation" />
<meta name="description" content="All communication between LXD and its clients happens using a RESTful API over HTTP. This API is encapsulated over either TLS (for remote operations) or a Unix socket (for local operations). See Re..." />
<link rel="index" title="Index" href="../genindex/"><link rel="search" title="Search" href="../search/"><link rel="next" title="Main API specification" href="../api/"><link rel="prev" title="REST API" href="../restapi_landing/">
        <link rel="canonical" href="https://documentation.ubuntu.com/lxd/rest-api/">

    <link rel="shortcut icon" href="../_static/favicon.ico"><!-- Generated with Sphinx 8.2.3 and Furo 2025.12.19 -->
        <title>REST API</title>
      <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
    <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
    <link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
    <link rel="stylesheet" type="text/css" href="../_static/youtube.css" />
    <link rel="stylesheet" type="text/css" href="../_static/related-links.css" />
    <link rel="stylesheet" type="text/css" href="../_static/terminal-output.css" />
    <link rel="stylesheet" type="text/css" href="../_static/config-options.css" />
    <link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
    <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
    <link rel="stylesheet" type="text/css" href="../_static/custom.css?v=66d86e9d" />
    <link rel="stylesheet" type="text/css" href="../_static/header.css?v=84f70f09" />
    <link rel="stylesheet" type="text/css" href="../_static/github_issue_links.css?v=af88fb93" />
    <link rel="stylesheet" type="text/css" href="../_static/furo_colors.css?v=c4ccdb8a" />
    <link rel="stylesheet" type="text/css" href="../_static/footer.css?v=bd05fc90" />
    <link rel="stylesheet" type="text/css" href="../_static/cookie-banner.css?v=b74831ab" />
    
</head>
  <body>
    <header id="header" class="p-navigation">
  <script type="module" src="../_static/js/bundle.js">
  </script>

  <!-- Google Tag Manager -->
  <script>
    (function(w, d, s, l, i) {
      w[l] = w[l] || [];
      w[l].push({
        'gtm.start': new Date().getTime(),
        event: 'gtm.js'
      });
      var f = d.getElementsByTagName(s)[0];
      var j = d.createElement(s);
      var dl = '';
      if (l != 'dataLayer') {
          dl = '&l=' + l;
      }
      j.async = true;
      j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
      f.parentNode.insertBefore(j, f);
    })(window, document, 'script', 'dataLayer', 'GTM-KNX3CJC');
  </script>
  
  <div class="p-navigation__nav" role="menubar">

    <ul class="p-navigation__links" role="menu">

      <li>
        <a class="p-logo" href="https://canonical.com/lxd" aria-current="page">
          <img src="../_static/tag.png" alt="Logo" class="p-logo-image">
          <div class="p-logo-text p-heading--4">LXD
          </div>
        </a>
      </li>

      <li class="nav-ubuntu-com">
        <a href="https://canonical.com/lxd" class="p-navigation__link">canonical.com/lxd</a>
      </li>

      <li>
        <a href="#" class="p-navigation__link nav-more-links">More resources</a>
        <ul class="more-links-dropdown">

          <li>
            <a href="https://ubuntu.com/lxd/install/" class="p-navigation__sub-link p-dropdown__link">Install LXD</a>
          </li>

          <li>
            <a href="https://ubuntu.com/lxd/manage/" class="p-navigation__sub-link p-dropdown__link">Manage LXD</a>
          </li>

          <li>
            <a href="https://discourse.ubuntu.com/c/lxd/" class="p-navigation__sub-link p-dropdown__link">Forum</a>
          </li>

          <li>
            <a href="https://github.com/canonical/lxd" class="p-navigation__sub-link p-dropdown__link">GitHub</a>
          </li>

        </ul>
      </li>

    </ul>
  </div>
</header>
   
    <script>
      document.body.dataset.theme = localStorage.getItem("theme") || "auto";
    </script>
    

<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
  <symbol id="svg-toc" viewBox="0 0 24 24">
    <title>Contents</title>
    <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
      <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
    </svg>
  </symbol>
  <symbol id="svg-menu" viewBox="0 0 24 24">
    <title>Menu</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
      <line x1="3" y1="12" x2="21" y2="12"></line>
      <line x1="3" y1="6" x2="21" y2="6"></line>
      <line x1="3" y1="18" x2="21" y2="18"></line>
    </svg>
  </symbol>
  <symbol id="svg-arrow-right" viewBox="0 0 24 24">
    <title>Expand</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
      <polyline points="9 18 15 12 9 6"></polyline>
    </svg>
  </symbol>
  <symbol id="svg-sun" viewBox="0 0 24 24">
    <title>Light mode</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
      <circle cx="12" cy="12" r="5"></circle>
      <line x1="12" y1="1" x2="12" y2="3"></line>
      <line x1="12" y1="21" x2="12" y2="23"></line>
      <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
      <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
      <line x1="1" y1="12" x2="3" y2="12"></line>
      <line x1="21" y1="12" x2="23" y2="12"></line>
      <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
      <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
    </svg>
  </symbol>
  <symbol id="svg-moon" viewBox="0 0 24 24">
    <title>Dark mode</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
      <path stroke="none" d="M0 0h24v24H0z" fill="none" />
      <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
    </svg>
  </symbol>
  <symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
    <title>Auto light/dark, in light mode</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
      class="icon-custom-derived-from-feather-sun-and-tabler-moon">
      <path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
      <line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
      <line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
      <line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
      <line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
      <line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
      <line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
      <line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
      <line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
      <circle cx="14.5" cy="9.55" r="3.6"/>
    </svg>
  </symbol>
  <symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
    <title>Auto light/dark, in dark mode</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
      class="icon-custom-derived-from-feather-sun-and-tabler-moon">
      <path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
      <line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
      <line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
      <line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
      <line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
      <line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
      <line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
      <line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
      <line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
      <circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
    </svg>
  </symbol>
  <symbol id="svg-pencil" viewBox="0 0 24 24">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
      <path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
      <path d="M13.5 6.5l4 4" />
      <path d="M20 21l2 -2l-2 -2" />
      <path d="M17 17l-2 2l2 2" />
    </svg>
  </symbol>
  <symbol id="svg-eye" viewBox="0 0 24 24">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
      <path stroke="none" d="M0 0h24v24H0z" fill="none" />
      <path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
      <path
        d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
      <path d="M20 21l2 -2l-2 -2" />
      <path d="M17 17l-2 2l2 2" />
    </svg>
  </symbol>
</svg>

<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
<label class="overlay sidebar-overlay" for="__navigation"></label>
<label class="overlay toc-overlay" for="__toc"></label>

<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>



<div class="page">
  <header class="mobile-header">
    <div class="header-left">
      <label class="nav-overlay-icon" for="__navigation">
        <span class="icon"><svg><use href="#svg-menu"></use></svg></span>
      </label>
    </div>
    <div class="header-center">
      <a href="../"><div class="brand">LXD</div></a>
    </div>
    <div class="header-right">
      <div class="theme-toggle-container theme-toggle-header">
        <button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
          <svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
          <svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
          <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
          <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
        </button>
      </div>
      <label class="toc-overlay-icon toc-header-icon" for="__toc">
        <span class="icon"><svg><use href="#svg-toc"></use></svg></span>
      </label>
    </div>
  </header>
  <aside class="sidebar-drawer">
    <div class="sidebar-container">
      
      <div class="sidebar-sticky"><a class="sidebar-brand" href="../">
  
  
</a><form class="sidebar-search-container" method="get" action="../search/" role="search">
    <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
    <input type="submit" value="Go">
    <input type="hidden" name="check_keywords" value="yes">
    <input type="hidden" name="area" value="default">
  </form>
  <div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
  <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../">LXD</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/first_steps/">Tutorial</a></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../howto/">How-to guides</a><input aria-label="Toggle navigation of How-to guides" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l2 has-children"><a class="reference internal" href="../getting_started/">Getting started</a><input aria-label="Toggle navigation of Getting started" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../installing/">Install LXD</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/initialize/">Initialize LXD</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/access_ui/">Access the UI</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/access_documentation/">Access documentation locally</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../operation/">LXD server and client</a><input aria-label="Toggle navigation of LXD server and client" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/server_expose/">Expose LXD to the network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/server_configure/">Configure the LXD server</a></li>
<li class="toctree-l3 has-children"><a class="reference internal" href="../howto/oidc/">Configure single sign-on with OIDC</a><input aria-label="Toggle navigation of Configure single sign-on with OIDC" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l4"><a class="reference internal" href="../howto/oidc_auth0/">How to configure Auth0</a></li>
<li class="toctree-l4"><a class="reference internal" href="../howto/oidc_ory/">How to configure Ory Hydra</a></li>
<li class="toctree-l4"><a class="reference internal" href="../howto/oidc_keycloak/">How to configure Keycloak</a></li>
<li class="toctree-l4"><a class="reference internal" href="../howto/oidc_entra_id/">How to configure Entra ID</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../remotes/">Add remote servers</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/lxc_alias/">Add command aliases</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../instances/">Instances</a><input aria-label="Toggle navigation of Instances" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_create/">Create instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_configure/">Configure instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_manage/">Manage instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../profiles/">Use profiles</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_troubleshoot/">Troubleshoot errors</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_ubuntu_pro_attach/">Auto attach Ubuntu Pro</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_access_files/">Access files</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_console/">Access the console</a></li>
<li class="toctree-l3"><a class="reference internal" href="../instance-exec/">Run commands</a></li>
<li class="toctree-l3"><a class="reference internal" href="../cloud-init/">Use cloud-init</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_routed_nic_vm/">Add a routed NIC to a VM</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_backup/">Back up instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_migrate/">Migrate instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/import_machines_to_instances/">Import existing machines</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/container_gpu_passthrough_with_docker/">Pass NVIDIA GPUs</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../images/">Images</a><input aria-label="Toggle navigation of Images" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/images_remote/">Use remote images</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/images_manage/">Manage images</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/images_profiles/">Associate profiles</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/images_copy/">Copy and import images</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/images_create/">Create images</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../projects/">Projects</a><input aria-label="Toggle navigation of Projects" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/projects_create/">Create and configure</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/projects_work/">Work with projects</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/projects_confine/">Confine users to projects</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../storage/">Storage</a><input aria-label="Toggle navigation of Storage" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/storage_pools/">Manage pools</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/storage_volumes/">Manage volumes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/storage_buckets/">Manage buckets</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/storage_create_instance/">Create an instance in a pool</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/storage_backup_volume/">Back up a volume</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/storage_move_volume/">Move or copy a volume</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/storage_csi/">Use the LXD CSI driver with Kubernetes</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../networks/">Networking</a><input aria-label="Toggle navigation of Networking" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_create/">Create a network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_configure/">Configure a network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_bgp/">Configure as BGP server</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_acls/">Configure network ACLs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_forwards/">Configure forwards</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_zones/">Configure network zones</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_bridge_firewalld/">Configure your firewall</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_bridge_resolved/">Integrate with resolved</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_ovn_setup/">Set up OVN</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_load_balancers/">Configure load balancers</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_ovn_peers/">Configure peer routing</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_ipam/">Display IPAM information</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../clustering/">Clustering</a><input aria-label="Toggle navigation of Clustering" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster_form/">Form a cluster</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster_manage/">Manage a cluster</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster_config_networks/">Configure networks</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster_config_storage/">Configure storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster_manage_instance/">Manage instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster_groups/">Set up cluster groups</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster_placement_groups/">Use placement groups</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster_recover/">Recover a cluster</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/cluster_vip/">Set up a highly available virtual IP</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../production-setup/">Production setup</a><input aria-label="Toggle navigation of Production setup" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/benchmark_performance/">Benchmark performance</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_increase_bandwidth/">Increase bandwidth</a></li>
<li class="toctree-l3"><a class="reference internal" href="../metrics/">Monitor metrics</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/logs_loki/">Send logs to Loki</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/grafana/">Set up Grafana</a></li>
<li class="toctree-l3"><a class="reference internal" href="../backup/">Back up a server</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/disaster_recovery/">Recover instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/disaster_recovery_replication/">Disaster recovery with storage replication</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../howto/snap/">Manage the snap</a></li>
<li class="toctree-l2"><a class="reference internal" href="../howto/security_harden/">Harden security</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../howto/troubleshoot/">Troubleshooting</a><input aria-label="Toggle navigation of Troubleshooting" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../howto/network_bridge_firewalld/">Configure your firewall</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/instances_troubleshoot/">Troubleshoot instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../howto/dqlite_troubleshoot/">Troubleshoot Dqlite</a></li>
<li class="toctree-l3"><a class="reference internal" href="../debugging/">Debug LXD</a></li>
<li class="toctree-l3"><a class="reference internal" href="../faq/">Frequently asked</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../support/">Get support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contributing/">Contribute to LXD</a></li>
<li class="toctree-l2"><a class="reference internal" href="../howto/devlxd_authenticate/">How to authenticate to the DevLXD API</a></li>
</ul>
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../explanation/">Explanation</a><input aria-label="Toggle navigation of Explanation" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l2"><a class="reference internal" href="../explanation/lxd_lxc/"><code class="docutils literal notranslate"><span class="pre">lxd</span></code> and <code class="docutils literal notranslate"><span class="pre">lxc</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/instances/">Containers and VMs</a></li>
<li class="toctree-l2"><a class="reference internal" href="../image-handling/">Local and remote images</a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/storage/">Storage pools, volumes, and buckets</a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/networks/">Networking setups</a></li>
<li class="toctree-l2"><a class="reference internal" href="../database/">The LXD Dqlite database</a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/lxc_show_info/"><code class="docutils literal notranslate"><span class="pre">lxc</span></code> <code class="docutils literal notranslate"><span class="pre">show</span></code> and <code class="docutils literal notranslate"><span class="pre">info</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../authentication/">Remote API authentication</a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/authorization/">Remote API authorization</a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/projects/">Instances grouping with projects</a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/clusters/">Clusters</a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/performance_tuning/">Performance tuning</a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/security/">Security</a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/bpf/">Privilege delegation using BPF Token</a></li>
<li class="toctree-l2"><a class="reference internal" href="../explanation/csi/">The LXD CSI driver</a></li>
</ul>
</li>
<li class="toctree-l1 current has-children"><a class="reference internal" href="../reference/">Reference</a><input aria-label="Toggle navigation of Reference" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../requirements/">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architectures/">Architectures</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../reference/release-notes/">Release notes</a><input aria-label="Toggle navigation of Release notes" class="toctree-checkbox" id="toctree-checkbox-15" name="toctree-checkbox-15" role="switch" type="checkbox"/><label for="toctree-checkbox-15"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/release-notes/release-notes-6.6/">LXD 6.6</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/releases-snap/">Releases and snap</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/remote_image_servers/">Remote image servers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/image_format/">Image format</a></li>
<li class="toctree-l2"><a class="reference internal" href="../guest-os-compatibility/">Guest OS compatibility</a></li>
<li class="toctree-l2"><a class="reference internal" href="../container-environment/">Container environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="../config-options/">Configuration option index</a></li>
<li class="toctree-l2"><a class="reference internal" href="../server/">Server configuration</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../explanation/instance_config/">Instance configuration</a><input aria-label="Toggle navigation of Instance configuration" class="toctree-checkbox" id="toctree-checkbox-16" name="toctree-checkbox-16" role="switch" type="checkbox"/><label for="toctree-checkbox-16"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/instance_properties/">Instance properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/instance_options/">Instance options</a></li>
<li class="toctree-l3 has-children"><a class="reference internal" href="../reference/devices/">Devices</a><input aria-label="Toggle navigation of Devices" class="toctree-checkbox" id="toctree-checkbox-17" name="toctree-checkbox-17" role="switch" type="checkbox"/><label for="toctree-checkbox-17"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l4"><a class="reference internal" href="../reference/standard_devices/">Standard devices</a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_none/">Type: <code class="docutils literal notranslate"><span class="pre">none</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_nic/">Type: <code class="docutils literal notranslate"><span class="pre">nic</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_disk/">Type: <code class="docutils literal notranslate"><span class="pre">disk</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_unix_char/">Type: <code class="docutils literal notranslate"><span class="pre">unix-char</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_unix_block/">Type: <code class="docutils literal notranslate"><span class="pre">unix-block</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_usb/">Type: <code class="docutils literal notranslate"><span class="pre">usb</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_gpu/">Type: <code class="docutils literal notranslate"><span class="pre">gpu</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_infiniband/">Type: <code class="docutils literal notranslate"><span class="pre">infiniband</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_proxy/">Type: <code class="docutils literal notranslate"><span class="pre">proxy</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_unix_hotplug/">Type: <code class="docutils literal notranslate"><span class="pre">unix-hotplug</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_tpm/">Type: <code class="docutils literal notranslate"><span class="pre">tpm</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../reference/devices_pci/">Type: <code class="docutils literal notranslate"><span class="pre">pci</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../reference/instance_units/">Units for storage and network limits</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/preseed_yaml_fields/">Preseed YAML file fields</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/projects/">Project configuration</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../reference/storage_drivers/">Storage drivers</a><input aria-label="Toggle navigation of Storage drivers" class="toctree-checkbox" id="toctree-checkbox-18" name="toctree-checkbox-18" role="switch" type="checkbox"/><label for="toctree-checkbox-18"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/storage_dir/">Directory - <code class="docutils literal notranslate"><span class="pre">dir</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/storage_btrfs/">Btrfs - <code class="docutils literal notranslate"><span class="pre">btrfs</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/storage_lvm/">LVM - <code class="docutils literal notranslate"><span class="pre">lvm</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/storage_zfs/">ZFS - <code class="docutils literal notranslate"><span class="pre">zfs</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/storage_ceph/">Ceph RBD - <code class="docutils literal notranslate"><span class="pre">ceph</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/storage_powerflex/">Dell PowerFlex - <code class="docutils literal notranslate"><span class="pre">powerflex</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/storage_pure/">Pure Storage - <code class="docutils literal notranslate"><span class="pre">pure</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/storage_alletra/">HPE Alletra - <code class="docutils literal notranslate"><span class="pre">alletra</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/storage_cephfs/">CephFS - <code class="docutils literal notranslate"><span class="pre">cephfs</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/storage_cephobject/">Ceph Object - <code class="docutils literal notranslate"><span class="pre">cephobject</span></code></a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../reference/networks/">Networks</a><input aria-label="Toggle navigation of Networks" class="toctree-checkbox" id="toctree-checkbox-19" name="toctree-checkbox-19" role="switch" type="checkbox"/><label for="toctree-checkbox-19"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/network_bridge/">Bridge network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/network_ovn/">OVN network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/network_macvlan/">Macvlan network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/network_physical/">Physical network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/network_sriov/">SR-IOV network</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/cluster_member_config/">Cluster configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/placement_groups/">Placement group configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/server_settings/">Production server settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/provided_metrics/">Provided metrics</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/permissions/">Permissions</a></li>
<li class="toctree-l2 current has-children"><a class="reference internal" href="../restapi_landing/">REST API</a><input aria-label="Toggle navigation of REST API" checked="" class="toctree-checkbox" id="toctree-checkbox-20" name="toctree-checkbox-20" role="switch" type="checkbox"/><label for="toctree-checkbox-20"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
<li class="toctree-l3 current current-page"><a class="current reference internal" href="#">Main API documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/">Main API specification</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api-extensions/">Main API extensions</a></li>
<li class="toctree-l3"><a class="reference internal" href="../events/">Events API documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../dev-lxd/">Instance API</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/driver_csi/">LXD CSI driver reference</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../reference/manpages/">Man pages</a><input aria-label="Toggle navigation of Man pages" class="toctree-checkbox" id="toctree-checkbox-21" name="toctree-checkbox-21" role="switch" type="checkbox"/><label for="toctree-checkbox-21"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/manpages/lxc/"><code class="docutils literal notranslate"><span class="pre">lxc</span></code></a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../internals/">Internals</a><input aria-label="Toggle navigation of Internals" class="toctree-checkbox" id="toctree-checkbox-22" name="toctree-checkbox-22" role="switch" type="checkbox"/><label for="toctree-checkbox-22"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../environment/">Environment variables</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/uefi_variables/">UEFI variables for VMs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../daemon-behavior/">Daemon behavior</a></li>
<li class="toctree-l3"><a class="reference internal" href="../syscall-interception/">System call interception</a></li>
<li class="toctree-l3"><a class="reference internal" href="../userns-idmap/">User namespace setup</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/ovn-internals/">OVN implementation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/vm_live_migration_internals/">VM live migration implementation</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="https://github.com/canonical/lxd">Project repository</a></li>
<li class="toctree-l2"><a class="reference external" href="https://images.lxd.canonical.com">Image server</a></li>
</ul>
</li>
</ul>

</div>
</div>

      </div>
      
    </div>
  </aside>
  <div class="main">
    <div class="content">
      <div class="article-container">
        <a href="#" class="back-to-top muted-link">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
            <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
          </svg>
          <span>Back to top</span>
        </a>
        <div class="content-icon-container">
          <div class="view-this-page">
  <a class="muted-link" href="../_sources/rest-api.md.txt" title="View this page">
    <svg><use href="#svg-eye"></use></svg>
    <span class="visually-hidden">View this page</span>
  </a>
</div>
<div class="theme-toggle-container theme-toggle-content">
            <button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
              <svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
              <svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
              <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
              <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
            </button>
          </div>
          <label class="toc-overlay-icon toc-content-icon" for="__toc">
            <span class="icon"><svg><use href="#svg-toc"></use></svg></span>
          </label>
        </div>
        <article role="main" id="furo-main-content">
          <section id="rest-api">
<span id="id1"></span><h1>REST API<a class="headerlink" href="#rest-api" title="Link to this heading">¶</a></h1>
         <p class="youtube_link">           <a href="https://www.youtube.com/watch?v=YvGbvspXObI" target="_blank">             <span title="LXD REST API - YouTube" class="play_icon">▶</span>             <span title="LXD REST API - YouTube">Watch on YouTube</span>           </a>         </p><p>All communication between LXD and its clients happens using a RESTful API over HTTP.
This API is encapsulated over either TLS (for remote operations) or a Unix socket (for local operations).</p>
<p>See <a class="reference internal" href="../authentication/#authentication"><span class="std std-ref">Remote API authentication</span></a> for information about how to access the API remotely.</p>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<ul class="simple">
<li><p>For examples on how the API is used, run any command of the LXD client (<a class="reference internal" href="../reference/manpages/lxc/#lxc-md"><span class="std std-ref"><code class="docutils literal notranslate"><span class="pre">lxc</span></code></span></a>) with the <code class="docutils literal notranslate"><span class="pre">--debug</span></code> flag.
The debug information displays the API calls and the return values.</p></li>
<li><p>For quickly querying the API, the LXD client provides a <a class="reference internal" href="../reference/manpages/lxc/query/#lxc-query-md"><span class="std std-ref"><code class="docutils literal notranslate"><span class="pre">lxc</span> <span class="pre">query</span></code></span></a> command.</p></li>
</ul>
</div>
<section id="api-versioning">
<h2>API versioning<a class="headerlink" href="#api-versioning" title="Link to this heading">¶</a></h2>
<p>The list of supported major API versions can be retrieved using <code class="docutils literal notranslate"><span class="pre">GET</span> <span class="pre">/</span></code>.</p>
<p>The reason for a major API bump is if the API breaks backward compatibility.</p>
<p>Feature additions done without breaking backward compatibility only
result in addition to <code class="docutils literal notranslate"><span class="pre">api_extensions</span></code> which can be used by the client
to check if a given feature is supported by the server.</p>
</section>
<section id="return-values">
<h2>Return values<a class="headerlink" href="#return-values" title="Link to this heading">¶</a></h2>
<p>There are three standard return types:</p>
<ul class="simple">
<li><p>Standard return value</p></li>
<li><p>Background operation</p></li>
<li><p>Error</p></li>
</ul>
<section id="standard-return-value">
<h3>Standard return value<a class="headerlink" href="#standard-return-value" title="Link to this heading">¶</a></h3>
<p>For a standard synchronous operation, the following JSON object is returned:</p>
<div class="highlight-js notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w">    </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;sync&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="s2">&quot;status&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;Success&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="s2">&quot;status_code&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">200</span><span class="p">,</span>
<span class="w">    </span><span class="s2">&quot;metadata&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{}</span><span class="w">                          </span><span class="c1">// Extra resource/action specific metadata</span>
<span class="p">}</span>
</pre></div>
</div>
<p>HTTP code must be 200.</p>
</section>
<section id="background-operation">
<h3>Background operation<a class="headerlink" href="#background-operation" title="Link to this heading">¶</a></h3>
<p>When a request results in a background operation, the HTTP code is set to 202 (Accepted)
and the Location HTTP header is set to the operation URL.</p>
<p>The body is a JSON object with the following structure:</p>
<div class="highlight-js notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w">    </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;async&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="s2">&quot;status&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;OK&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="s2">&quot;status_code&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">100</span><span class="p">,</span>
<span class="w">    </span><span class="s2">&quot;operation&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;/1.0/instances/&lt;id&gt;&quot;</span><span class="p">,</span><span class="w">                     </span><span class="c1">// URL to the background operation</span>
<span class="w">    </span><span class="s2">&quot;metadata&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{}</span><span class="w">                                          </span><span class="c1">// Operation metadata (see below)</span>
<span class="p">}</span>
</pre></div>
</div>
<p>The operation metadata structure looks like:</p>
<div class="highlight-js notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w">    </span><span class="s2">&quot;id&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;a40f5541-5e98-454f-b3b6-8a51ef5dbd3c&quot;</span><span class="p">,</span><span class="w">           </span><span class="c1">// UUID of the operation</span>
<span class="w">    </span><span class="s2">&quot;class&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;websocket&quot;</span><span class="p">,</span><span class="w">                                   </span><span class="c1">// Class of the operation (task, websocket or token)</span>
<span class="w">    </span><span class="s2">&quot;created_at&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;2015-11-17T22:32:02.226176091-05:00&quot;</span><span class="p">,</span><span class="w">    </span><span class="c1">// When the operation was created</span>
<span class="w">    </span><span class="s2">&quot;updated_at&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;2015-11-17T22:32:02.226176091-05:00&quot;</span><span class="p">,</span><span class="w">    </span><span class="c1">// Last time the operation was updated</span>
<span class="w">    </span><span class="s2">&quot;status&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;Running&quot;</span><span class="p">,</span><span class="w">                                    </span><span class="c1">// String version of the operation&#39;s status</span>
<span class="w">    </span><span class="s2">&quot;status_code&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">103</span><span class="p">,</span><span class="w">                                     </span><span class="c1">// Integer version of the operation&#39;s status (use this rather than status)</span>
<span class="w">    </span><span class="s2">&quot;resources&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{</span><span class="w">                                          </span><span class="c1">// Dictionary of resource types (container, snapshots, images) and affected resources</span>
<span class="w">      </span><span class="s2">&quot;containers&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span>
<span class="w">        </span><span class="s2">&quot;/1.0/instances/test&quot;</span>
<span class="w">      </span><span class="p">]</span>
<span class="w">    </span><span class="p">},</span>
<span class="w">    </span><span class="s2">&quot;metadata&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{</span><span class="w">                                           </span><span class="c1">// Metadata specific to the operation in question (in this case, exec)</span>
<span class="w">      </span><span class="s2">&quot;fds&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{</span>
<span class="w">        </span><span class="s2">&quot;0&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;2a4a97af81529f6608dca31f03a7b7e47acc0b8dc6514496eb25e325f9e4fa6a&quot;</span><span class="p">,</span>
<span class="w">        </span><span class="s2">&quot;control&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;5b64c661ef313b423b5317ba9cb6410e40b705806c28255f601c0ef603f079a7&quot;</span>
<span class="w">      </span><span class="p">}</span>
<span class="w">    </span><span class="p">},</span>
<span class="w">    </span><span class="s2">&quot;may_cancel&quot;</span><span class="o">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">                                    </span><span class="c1">// Whether the operation can be canceled (DELETE over REST)</span>
<span class="w">    </span><span class="s2">&quot;err&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;&quot;</span><span class="w">                                               </span><span class="c1">// The error string should the operation have failed</span>
<span class="p">}</span>
</pre></div>
</div>
<p>The body is mostly provided as a user friendly way of seeing what’s
going on without having to pull the target operation, all information in
the body can also be retrieved from the background operation URL.</p>
</section>
<section id="error">
<h3>Error<a class="headerlink" href="#error" title="Link to this heading">¶</a></h3>
<p>There are various situations in which something may immediately go
wrong, in those cases, the following return value is used:</p>
<div class="highlight-js notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w">    </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;error&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="s2">&quot;error&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;Failure&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="s2">&quot;error_code&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">400</span><span class="p">,</span>
<span class="w">    </span><span class="s2">&quot;metadata&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{}</span><span class="w">                      </span><span class="c1">// More details about the error</span>
<span class="p">}</span>
</pre></div>
</div>
<p>HTTP code must be one of of 400, 401, 403, 404, 409, 412 or 500.</p>
</section>
</section>
<section id="status-codes">
<h2>Status codes<a class="headerlink" href="#status-codes" title="Link to this heading">¶</a></h2>
<p>The LXD REST API often has to return status information, be that the
reason for an error, the current state of an operation or the state of
the various resources it exports.</p>
<p>To make it simple to debug, all of those are always doubled. There is a
numeric representation of the state which is guaranteed never to change
and can be relied on by API clients. Then there is a text version meant
to make it easier for people manually using the API to figure out what’s
happening.</p>
<p>In most cases, those will be called status and <code class="docutils literal notranslate"><span class="pre">status_code</span></code>, the former
being the user-friendly string representation and the latter the fixed
numeric value.</p>
<p>The codes are always 3 digits, with the following ranges:</p>
<ul class="simple">
<li><p>100 to 199: resource state (started, stopped, ready, …)</p></li>
<li><p>200 to 399: positive action result</p></li>
<li><p>400 to 599: negative action result</p></li>
<li><p>600 to 999: future use</p></li>
</ul>
<section id="list-of-current-status-codes">
<h3>List of current status codes<a class="headerlink" href="#list-of-current-status-codes" title="Link to this heading">¶</a></h3>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head text-left"><p>Code</p></th>
<th class="head text-left"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td class="text-left"><p>100</p></td>
<td class="text-left"><p>Operation created</p></td>
</tr>
<tr class="row-odd"><td class="text-left"><p>101</p></td>
<td class="text-left"><p>Started</p></td>
</tr>
<tr class="row-even"><td class="text-left"><p>102</p></td>
<td class="text-left"><p>Stopped</p></td>
</tr>
<tr class="row-odd"><td class="text-left"><p>103</p></td>
<td class="text-left"><p>Running</p></td>
</tr>
<tr class="row-even"><td class="text-left"><p>104</p></td>
<td class="text-left"><p>Canceling</p></td>
</tr>
<tr class="row-odd"><td class="text-left"><p>105</p></td>
<td class="text-left"><p>Pending</p></td>
</tr>
<tr class="row-even"><td class="text-left"><p>106</p></td>
<td class="text-left"><p>Starting</p></td>
</tr>
<tr class="row-odd"><td class="text-left"><p>107</p></td>
<td class="text-left"><p>Stopping</p></td>
</tr>
<tr class="row-even"><td class="text-left"><p>108</p></td>
<td class="text-left"><p>Aborting</p></td>
</tr>
<tr class="row-odd"><td class="text-left"><p>109</p></td>
<td class="text-left"><p>Freezing</p></td>
</tr>
<tr class="row-even"><td class="text-left"><p>110</p></td>
<td class="text-left"><p>Frozen</p></td>
</tr>
<tr class="row-odd"><td class="text-left"><p>111</p></td>
<td class="text-left"><p>Thawed</p></td>
</tr>
<tr class="row-even"><td class="text-left"><p>112</p></td>
<td class="text-left"><p>Error</p></td>
</tr>
<tr class="row-odd"><td class="text-left"><p>113</p></td>
<td class="text-left"><p>Ready</p></td>
</tr>
<tr class="row-even"><td class="text-left"><p>200</p></td>
<td class="text-left"><p>Success</p></td>
</tr>
<tr class="row-odd"><td class="text-left"><p>400</p></td>
<td class="text-left"><p>Failure</p></td>
</tr>
<tr class="row-even"><td class="text-left"><p>401</p></td>
<td class="text-left"><p>Canceled</p></td>
</tr>
</tbody>
</table>
</div>
</section>
</section>
<section id="recursion">
<span id="rest-api-recursion"></span><h2>Recursion<a class="headerlink" href="#recursion" title="Link to this heading">¶</a></h2>
<p>To optimize queries of large lists, recursion is implemented for collections.
A <code class="docutils literal notranslate"><span class="pre">recursion</span></code> argument can be passed to a GET query against a collection.</p>
<p>The default value is 0 which means that collection member URLs are
returned. Setting it to 1 will have those URLs be replaced by the object
they point to (typically another JSON object).</p>
<p>Recursion is implemented by simply replacing any pointer to an job (URL)
by the object itself.</p>
</section>
<section id="filtering">
<span id="rest-api-filtering"></span><h2>Filtering<a class="headerlink" href="#filtering" title="Link to this heading">¶</a></h2>
<p>To filter your results on certain values, filter is implemented for collections.
A <code class="docutils literal notranslate"><span class="pre">filter</span></code> argument can be passed to a GET query against a collection.</p>
<p>Filtering is available for the instance, image and storage volume endpoints.</p>
<p>There is no default value for filter which means that all results found will
be returned. The following is the language used for the filter argument:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>?filter=field_name eq desired_field_assignment
</pre></div>
</div>
<p>The language follows the OData conventions for structuring REST API filtering
logic. Logical operators are also supported for filtering: not (<code class="docutils literal notranslate"><span class="pre">not</span></code>), equals (<code class="docutils literal notranslate"><span class="pre">eq</span></code>),
not equals (<code class="docutils literal notranslate"><span class="pre">ne</span></code>), and (<code class="docutils literal notranslate"><span class="pre">and</span></code>), or (<code class="docutils literal notranslate"><span class="pre">or</span></code>). Filters are evaluated with left associativity.
Values with spaces can be surrounded with quotes. Nesting filtering is also supported.
For instance, to filter on a field in a configuration you would pass:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>?filter=config.field_name eq desired_field_assignment
</pre></div>
</div>
<p>For filtering on device attributes you would pass:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>?filter=devices.device_name.field_name eq desired_field_assignment
</pre></div>
</div>
<p>Here are a few GET query examples of the different filtering methods mentioned above:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>containers?filter=name eq &quot;my container&quot; and status eq Running

containers?filter=config.image.os eq ubuntu or devices.eth0.nictype eq bridged

images?filter=Properties.os eq Centos and not UpdateSource.Protocol eq simplestreams
</pre></div>
</div>
</section>
<section id="asynchronous-operations">
<h2>Asynchronous operations<a class="headerlink" href="#asynchronous-operations" title="Link to this heading">¶</a></h2>
<p>Any operation which may take more than a second to be done must be done
in the background, returning a background operation ID to the client.</p>
<p>The client will then be able to either poll for a status update or wait
for a notification using the long-poll API.</p>
</section>
<section id="notifications">
<h2>Notifications<a class="headerlink" href="#notifications" title="Link to this heading">¶</a></h2>
<p>A WebSocket-based API is available for notifications, different notification
types exist to limit the traffic going to the client.</p>
<p>It’s recommended that the client always subscribes to the operations
notification type before triggering remote operations so that it doesn’t
have to then poll for their status.</p>
</section>
<section id="put-vs-patch">
<span id="rest-api-put-vs-patch"></span><h2>PUT vs PATCH<a class="headerlink" href="#put-vs-patch" title="Link to this heading">¶</a></h2>
<p>The LXD API supports both PUT and PATCH to modify existing objects:</p>
<section id="the-put-method">
<span id="rest-api-put"></span><h3>The PUT method<a class="headerlink" href="#the-put-method" title="Link to this heading">¶</a></h3>
<p>PUT <em>replaces</em> the entire object with a new definition. Since it overwrites the existing state, it’s often called after retrieving and recording the current object state through GET.</p>
<p>To avoid race conditions, the ETag header should be read from the GET response and sent as If-Match for the PUT request. This will cause LXD to fail the request if the object was modified between GET and PUT.</p>
</section>
<section id="the-patch-method">
<span id="rest-api-patch"></span><h3>The PATCH method<a class="headerlink" href="#the-patch-method" title="Link to this heading">¶</a></h3>
<p>PATCH can be used to modify a single field inside an object by only specifying the property that you want to change. To unset a key, setting it to empty will usually do the trick, but there are cases where PATCH won’t work and PUT needs to be used instead.</p>
</section>
</section>
<section id="instances-containers-and-virtual-machines">
<h2>Instances, containers and virtual-machines<a class="headerlink" href="#instances-containers-and-virtual-machines" title="Link to this heading">¶</a></h2>
<p>The documentation shows paths such as <code class="docutils literal notranslate"><span class="pre">/1.0/instances/...</span></code>, which were introduced with LXD 3.19.
Older releases that supported only containers and not virtual machines supply the exact same API at <code class="docutils literal notranslate"><span class="pre">/1.0/containers/...</span></code>.</p>
<p>For backward compatibility reasons, LXD does still expose and support
that <code class="docutils literal notranslate"><span class="pre">/1.0/containers</span></code> API, though for the sake of brevity, we decided
not to double-document everything.</p>
<p>An additional endpoint at <code class="docutils literal notranslate"><span class="pre">/1.0/virtual-machines</span></code> is also present and
much like <code class="docutils literal notranslate"><span class="pre">/1.0/containers</span></code> will only show you instances of that type.</p>
</section>
<section id="api-structure">
<h2>API structure<a class="headerlink" href="#api-structure" title="Link to this heading">¶</a></h2>
<p>LXD has an auto-generated <a class="reference external" href="https://swagger.io/">Swagger</a> specification describing its API endpoints.
The YAML version of this API specification can be found in <a class="reference external" href="https://github.com/canonical/lxd/blob/main/doc/rest-api.yaml"><code class="docutils literal notranslate"><span class="pre">rest-api.yaml</span></code></a>.
See <a class="reference internal" href="../api/"><span class="doc">Main API specification</span></a> for a convenient web rendering of it.</p>
</section>
</section>

        </article>
      </div>
      <footer>
        
   

<div class="related-pages">
  
  
      
  
  
  <a class="next-page" href="../api/">
        <div class="page-info">
          <div class="context">
            <span>Next</span>
          </div>
          <div class="title">Main API specification</div>
        </div>
        <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
      </a>
    <a class="prev-page" href="../restapi_landing/">
        <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
        <div class="page-info">
          <div class="context">
            <span>Previous</span>
          </div>
          
            <div class="title">REST API</div>
          
        </div>
      </a>
</div>
<div class="bottom-of-page">
  <div class="left-details">
    <div class="copyright">
        Copyright &#169; 2014-2026 LXD contributors
    </div>

    <div class="last-updated">
      Last updated on Feb 04, 2026</div>
    <div class="show-source">
      <a class="muted-link" href="../_sources/rest-api.md.txt"
         rel="nofollow">Show source</a>
    </div>
  </div>
  <div>
    
        
        
          
              <a class="display-contributors">Thanks to the 26 contributors!</a>
          
          <div id="overlay"></div>
          <ul class="all-contributors">
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/60f47dd5772de58fa7261bd1ce5b10da79ec0a35" class="contributor">Alberto Donato</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/8d443e3f81a36b32caed05b6339dc3168f6c1e1d" class="contributor">Andy Greene</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/2dae58f6c01b5dc56c0efdb0a2edf64441f0eff2" class="contributor">Christian Brauner</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/5ccfe971c9734795900f4e0e811edaef9cdb4b4b" class="contributor">Christopher Bartz</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/20197ec5b7b314e501304331e95e57faefc546f0" class="contributor">Dario Tranchitella</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/be7751ea3baf7c2f6b958d6d8eeb19fd933e82ce" class="contributor">Fedor Dikarev</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/1aaabcbda2159bb4aee15cbbe7f325181db74057" class="contributor">Felix Engelmann</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/6c6a5f9de95ed14ceab3b8b08909222ffbda9976" class="contributor">Free Ekanayaka</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/92d450b9f25a003f3420fef780d2f2a10799a914" class="contributor">Hiroaki Nakamura</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/f6677d0a061162973f661a7089de753ee7c57614" class="contributor">Hiroki Kiyohara</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/94d900d81fbd17d6f5b6118e17b8612726441fa4" class="contributor">Jeff Shantz</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/22275568aa85f40836f00c60cea83555db046fa5" class="contributor">Jose R. Gonzalez</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/5aa5d7a5e8d6311bc6f832a2a4f9487ed16c2da3" class="contributor">Julien Reichardt</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/906114c8c7db9efab2e7c96cbb82d7834c1e174d" class="contributor">KATOH Yasufumi</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/a0876aca6cfde9992d8378350f60a9ca0b51c583" class="contributor">Kevin Turner</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/0a0c2aa42d7fb5d7a5b17195675e030e993ea0f5" class="contributor">Maciej Krüger</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/6679e9f8db9d3e650e60bbbae6e85d01174df959" class="contributor">Minae Lee</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/5e44cd2bb143cfca106796d5ba674a14229bb61a" class="contributor">Piotr Resztak</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/6bb9b925fd3eb6f49020944a2060577dd272b79b" class="contributor">Rene Fragoso</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/a748515add0b33288eb595733e8b69a2f96fdde4" class="contributor">Ruth Fuchss</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/b3463f939cbfe5aba4d040548a95e8a9219728ed" class="contributor">Salem Yaslem</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/2629d4c31ddfa7b57029bef1cf136fbc0922ae9b" class="contributor">Stéphane Graber</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/e3f0434aa00103db5e13ea3856a6a5330b9b714a" class="contributor">Thomas Hipp</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/d0d4472cc4dd280cb8ccd5430a8e40e109dec5df" class="contributor">Thomas Parrott</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/b113a6cbc9e336661de4b6e04ad27e8dadf39568" class="contributor">Tom Parrott</a>
                  </li>
              
                  <li>
                      <a href="https://github.com/canonical/lxd/commit/3e575401512b2b1b216ff151e7afc7c3e2bdfb57" class="contributor">Tycho Andersen</a>
                  </li>
              
          </ul>
        
    
  </div>
  <div class="right-details">

    

    
    <div class="ask-discourse">
      <a class="muted-link" href="https://discourse.ubuntu.com/c/lxd/">Ask a question on Discourse</a>
    </div>
    

    

    
    <div class="ask-matrix">
      <a class="muted-link" href="https://matrix.to/#/#documentation:ubuntu.com">Ask a question on Matrix</a>
    </div>
    

    

    
    <div class="issue-github">
      <a class="muted-link" href="https://github.com/canonical/lxd/issues/new?title=doc%3A+ADD+A+TITLE&body=DESCRIBE+THE+ISSUE%0A%0A---%0ADocument: rest-api.md">Open a GitHub issue for this page</a>
    </div>
    

    <div class="edit-github">
      <a class="muted-link" href="https://github.com/canonical/lxd/edit/main/doc/rest-api.md">Edit this page on GitHub</a>
    </div>
    


    </div>
  </div>
</div>

      </footer>
    </div>
    <aside class="toc-drawer">
      
<div class="toc-sticky toc-scroll">
   
    <div class="toc-title-container">
      <span class="toc-title">
       Contents
      </span>
    </div>
    <div class="toc-tree-container">
      <div class="toc-tree">
        <ul>
<li><a class="reference internal" href="#">REST API</a><ul>
<li><a class="reference internal" href="#api-versioning">API versioning</a></li>
<li><a class="reference internal" href="#return-values">Return values</a><ul>
<li><a class="reference internal" href="#standard-return-value">Standard return value</a></li>
<li><a class="reference internal" href="#background-operation">Background operation</a></li>
<li><a class="reference internal" href="#error">Error</a></li>
</ul>
</li>
<li><a class="reference internal" href="#status-codes">Status codes</a><ul>
<li><a class="reference internal" href="#list-of-current-status-codes">List of current status codes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#recursion">Recursion</a></li>
<li><a class="reference internal" href="#filtering">Filtering</a></li>
<li><a class="reference internal" href="#asynchronous-operations">Asynchronous operations</a></li>
<li><a class="reference internal" href="#notifications">Notifications</a></li>
<li><a class="reference internal" href="#put-vs-patch">PUT vs PATCH</a><ul>
<li><a class="reference internal" href="#the-put-method">The PUT method</a></li>
<li><a class="reference internal" href="#the-patch-method">The PATCH method</a></li>
</ul>
</li>
<li><a class="reference internal" href="#instances-containers-and-virtual-machines">Instances, containers and virtual-machines</a></li>
<li><a class="reference internal" href="#api-structure">API structure</a></li>
</ul>
</li>
</ul>

      </div>
    </div>
   
    
  </div>

    </aside>
  </div>
</div><script src="../_static/jquery.js?v=5d32c60e"></script>
    <script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
    <script src="../_static/documentation_options.js?v=187304be"></script>
    <script src="../_static/doctools.js?v=9bcbadda"></script>
    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="../_static/scripts/furo.js?v=46bd48cc"></script>
    <script src="../_static/clipboard.min.js?v=a7894cd8"></script>
    <script src="../_static/copybutton.js?v=f281be69"></script>
    <script src="../_static/config-options.js"></script>
    <script src="../_static/design-tabs.js?v=f930bc37"></script>
    <script src="../_static/header-nav.js?v=e117ad08"></script>
    <script src="../_static/footer.js?v=5acea47a"></script>
    <script src="../_static/github_issue_links.js?v=32bb732f"></script>
    <script src="../_static/js/bundle.js?v=a4d88309"></script>
    
<script>
  const github_url = "https://github.com/canonical/lxd";
</script>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit