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

    REST - Reversed query?

    Scheduled Pinned Locked Moved REST API
    2 Posts 2 Posters 20 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.
    • DustyArmstrongD Offline
      DustyArmstrong
      last edited by

      I use the REST API to record my backup status to Grafana, and have noticed it just change after updating - it's an older one I use so haven't done so in a while.

      I normally run the following query:

      https://my-xo.mydomain.local/rest/v0/backups/logs?fields=id,status&filter=MY%20VM%20Deltas&limit=7

      This used to return the most recent backups, but now it seems to be returning the oldest. Is there a way I can reverse the query (e.g. order by id desc in some form). The oldest backup is 0 while my newest backup is 161 - I don't know if this was always the case? It could just be something I have done outside of XO.

      If it's not possible, is there a limitation or is it something that could be easily implemented?

      Thanks!

      florentF 1 Reply Last reply Reply Quote 0
      • florentF Offline
        florent Vates 🪐 XO Team @DustyArmstrong
        last edited by

        @DustyArmstrong for now the rest api doesn't support server side sorting ( we don't have the memory budget to do this )

        it will be improved in the future

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post