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

    How to return all data with xo-cli without limits

    Scheduled Pinned Locked Moved Solved REST API
    5 Posts 3 Posters 132 Views 3 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.
    • E Offline
      eeldivad
      last edited by

      When I run this xo-cli rest get vdis it shows me a list of VDIs but not all of them. At the end it will show ... 1447 more items. Here's an example output

      'vdis/b1129b5c-517e-49e2-834c-d386d5faa795', 'vdis/df3b5d1b-c3ca-40d2-8a93-49195a2b564b', 'vdis/21ea982e-3fdb-4966-be37-483dd5360f64', 'vdis/bf6d04aa-bccd-47a3-abe5-ebadd5eb3925', 'vdis/c7100c77-cc86-4f2f-9d37-37241ebfe048', 'vdis/a0b7cb90-1a08-4ecf-8dde-4391cde3a051', 'vdis/728686f9-4957-421c-9732-4ea48964ebb9', ... 1447 more items ]

      I tried to set the limit to a high number but it doesn't seem to work. Anyone have any ideas?
      xo-cli rest get vdis limit=9999

      MathieuRAM 1 Reply Last reply Reply Quote 0
      • MathieuRAM Offline
        MathieuRA Vates 🪐 XO Team @eeldivad
        last edited by

        Hi @eeldivad 🙂

        You can use the json flag. xo-cli rest --json get vdis

        E 1 Reply Last reply Reply Quote 1
        • olivierlambertO Offline
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by

          Ping @julien-f

          1 Reply Last reply Reply Quote 0
          • MathieuRAM Offline
            MathieuRA Vates 🪐 XO Team @eeldivad
            last edited by

            Hi @eeldivad 🙂

            You can use the json flag. xo-cli rest --json get vdis

            E 1 Reply Last reply Reply Quote 1
            • E Offline
              eeldivad @MathieuRA
              last edited by

              @MathieuRA That worked! Thank you. I thought json was the default format and it seems --json must be right after the rest word. I tried putting it at the end and it didn't work but not a big deal. Thank you. How do you mark this post as resolved?

              1 Reply Last reply Reply Quote 1
              • olivierlambertO Offline
                olivierlambert Vates 🪐 Co-Founder CEO
                last edited by

                On it. Thanks 🙂

                1 Reply Last reply Reply Quote 1
                • olivierlambertO olivierlambert marked this topic as a question on
                • olivierlambertO olivierlambert has marked this topic as solved on
                • First post
                  Last post