XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    XO REST API: share your tips and scripts!

    Scheduled Pinned Locked Moved REST API
    1 Posts 1 Posters 461 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • olivierlambertO Offline
      olivierlambert Vates 🪐 Co-Founder CEO
      last edited by

      As our REST API is going better and better, we wanted to centralize the community efforts on building scripts and solutions on top of it 🙂

      Our first example on our side, is to help returning a CSV with all VMs without any backup job:
      https://gist.github.com/olivierlambert/a7d4a0add61c96d837db81970bc7212f

      You can use it this way:

      # node restapi.mjs <XOA URL> <XOA TOKEN>
      "VM-NAME";"VM-UUID"; "HOST/CLUSTER";"Tags"
      "Test Debian 11";"29d19fd6-6337-2f5c-1dd8-789e2463271d";"c1d386df-990a-a892-ca89-267e7b3b5afd/c1d386df-990a-a892-ca89-267e7b3b5afd";"Prod"
      "dml-netperf-zen4-1";"b85e7d22-c63d-3fcf-3f3c-5f22e599d2c8";"6362271f-abdc-40ac-a59b-a447c2570ed1/c1d386df-990a-a892-ca89-267e7b3b5afd";"Test"
      

      But obviously, more examples in more languages are always a plus!

      1 Reply Last reply Reply Quote 0
      • olivierlambertO olivierlambert moved this topic from Xen Orchestra on
      • First post
        Last post