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

    Group Query

    Scheduled Pinned Locked Moved REST API
    9 Posts 4 Posters 445 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.
    • M Offline
      M92
      last edited by

      Do we have an accurate way to query XO Groups and their members via REST api?

      I am able to get this via xo-cli groups.getAll but was hoping this could be done via rest, this would be useful for reporting in larger environments like the one I am operating in

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

        Question for @julien-f 🙂

        1 Reply Last reply Reply Quote 0
        • julien-fJ Offline
          julien-f Vates 🪐 Co-Founder XO Team @M92
          last edited by

          @M92 Hello, no, groups are not exposed at this time, will do it ASAP.

          M 1 Reply Last reply Reply Quote 3
          • M Offline
            M92 @julien-f
            last edited by

            @julien-f

            Thanks Julien, will we also be able to use Filter in the query?

            A nice to have is if the username inside the groups is returned instead of just the UUID, but I can match this from another query/table if I need to.

            I am not sure if this is resolved either but there was an issue where results were truncated after 100 lines in some queries. I have far more than 100 lines to return, but this may already be fixed

            julien-fJ 1 Reply Last reply Reply Quote 0
            • julien-fJ Offline
              julien-f Vates 🪐 Co-Founder XO Team @M92
              last edited by

              @M92 There is now a /groups collection which lists all the groups and two new collections, /groups/:id/users and /users/:id/groups which list respectively all users in a group and all groups a user belongs to.

              These new collections have the same behaviours than the others, which means they accept the fields, filter and limit parameters.

              And yes the limit parameter should work correctly, let me know if you have any issue.

              M 1 Reply Last reply Reply Quote 3
              • M Offline
                M92 @julien-f
                last edited by

                @julien-f

                Do I need to switch release channel on XOA? I swapped to latest over stable but no luck

                Appreciate the fast turnaround

                DanpD 1 Reply Last reply Reply Quote 0
                • DanpD Offline
                  Danp Pro Support Team @M92
                  last edited by

                  @M92 These changes will be in the next release. To try them now you would need to build from sources.

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    M92 @Danp
                    last edited by

                    @Danp No problem, I will build from sources to at least test and modify a few scripts we are running. Thanks!

                    julien-fJ 1 Reply Last reply Reply Quote 1
                    • julien-fJ Offline
                      julien-f Vates 🪐 Co-Founder XO Team @M92
                      last edited by julien-f

                      As @Danp said, changes appear first in the GitHub repo and are available for the XOAs at the next release in the latest channel.

                      But, as it appear, we just did a new patch release (5.91.2) which also contains the REST API changes we talked about 😉

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post