Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] REST API: get path to currently printed .gcode file #2210

Closed
aurror opened this issue Nov 5, 2017 · 2 comments
Closed

[REQUEST] REST API: get path to currently printed .gcode file #2210

aurror opened this issue Nov 5, 2017 · 2 comments
Labels
done Done but not yet released request Feature request

Comments

@aurror
Copy link

aurror commented Nov 5, 2017

It would be nice to be able to get the path of the currently printed file somehow,
for example as an extra entry in GET /api/printer or with a new file operation command .

Edit: I'm currently in the process of adding this, I'll submit a pull request once it's done.

@GitIssueBot GitIssueBot added the request Feature request label Nov 5, 2017
@foosel
Copy link
Member

foosel commented Nov 6, 2017

It is actually returned on api/job (even though the example in the documentation doesn't yet include it, that should indeed be fixed). E.g.:

{
  "job": {
    "averagePrintTime": null, 
    "estimatedPrintTime": 4855.383235247895, 
    "filament": {
      "tool0": {
        "length": 1736.3539000000453, 
        "volume": 0.0
      }
    }, 
    "file": {
      "date": 1508423977, 
      "display": "3DBenchy_.25.gcode", 
      "name": "3DBenchy_.25.gcode", 
      "origin": "local", 
      "path": "test/3DBenchy_.25.gcode", 
      "size": 2978760
    }, 
    "lastPrintTime": null
  }, 
  "progress": {
    "completion": 0.027830372369710882, 
    "filepos": 829, 
    "printTime": 0, 
    "printTimeLeft": 4854, 
    "printTimeLeftOrigin": "analysis"
  }, 
  "state": "Printing"
}

@LazeMSS
Copy link
Contributor

LazeMSS commented Mar 31, 2021

Closing - the path is included in the reply.

@LazeMSS LazeMSS closed this as completed Mar 31, 2021
@github-actions github-actions bot added the done Done but not yet released label Mar 31, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
done Done but not yet released request Feature request
Projects
None yet
Development

No branches or pull requests

4 participants