Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    rr_filelist documentation clarification

    Scheduled Pinned Locked Moved Solved
    Third-party software
    2
    3
    63
    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.
    • stuartofmtundefined
      stuartofmt
      last edited by

      The documentation (https://github.com/Duet3D/RepRapFirmware/wiki/HTTP-requests)

      and actual for rr_filelist response do not match. I'm happy with the actual but want to check in case there is a bug and it will change. If not a bug then the documentation would benefit from a correction.

      I'm in the process of changing one of my plugins (duetBackup) so that it can be used (remotely) to backup standalone printers.
      For this - I'm looking to switch to rr_ APIs (from /machine) for simplicity.

      I'm currently testing rr_filelist against a remote SBC

      The following is the actual result of rr_filelist. Essentially it only (and usefully) returns the files array described in the documentation.

      S C:\Users\stuar\Github\DWC\duetBackup> curl http://192.168.10.140/rr_filelist?dir=/macros/      
      
      
      StatusCode        : 200
      StatusDescription : OK
      Content           : [{"type":"d","name":"Piezo","date":"2025-01-18T14:27:19"},{"type":"d","
                          name":"duetLapse_Test","date":"2025-05-01T21:29:14"},{"type":"d","name" 
                          :"Pen Calibration","date":"2025-01-25T10:05:36"},{"type":"...
      RawContent        : HTTP/1.1 200 OK
                          Content-Length: 516
                          Content-Type: application/json
                          Date: Wed, 07 May 2025 09:26:27 GMT
                          Server: Kestrel
      
                          [{"type":"d","name":"Piezo","date":"2025-01-18T14:27:19"},{"type":"d"," 
                          nam...
      Forms             : {}
      Headers           : {[Content-Length, 516], [Content-Type, application/json], [Date, Wed, 
                          07 May 2025 09:26:27 GMT], [Server, Kestrel]}
      Images            : {}
      InputFields       : {}
      Links             : {}
      ParsedHtml        : mshtml.HTMLDocumentClass
      RawContentLength  : 516
      
      chrishammundefined 1 Reply Last reply Reply Quote 0
      • stuartofmtundefined stuartofmt marked this topic as a question
      • chrishammundefined
        chrishamm administrators @stuartofmt
        last edited by

        @stuartofmt Thanks for pointing this out, I've got a fix ready. For now you can set first=0 to get a properly formatted response which should match the RRF format.

        Duet software engineer

        stuartofmtundefined 1 Reply Last reply Reply Quote 0
        • stuartofmtundefined
          stuartofmt @chrishamm
          last edited by

          @chrishamm
          Thanks. Confirmed working with first=0

          1 Reply Last reply Reply Quote 0
          • stuartofmtundefined stuartofmt has marked this topic as solved
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA