Skip to content

Commit 81735d0

Browse files
committed
Merge branch 'rc/maintenance'
2 parents 03e328f + 2c640ff commit 81735d0

File tree

179 files changed

+8532
-6551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+8532
-6551
lines changed

.versioneer-lookup

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ prerelease
1818
HEAD
1919
\(detached.*
2020

21-
# maintenance is currently the branch for preparation of maintenance release 1.3.9
21+
# maintenance is currently the branch for preparation of maintenance release 1.3.11
2222
# so are any fix/... and improve/... branches
23-
maintenance 1.3.10 fdf0f75ffa5731fee406c6e761e84a9d2b47aa43 pep440-dev
24-
fix/.* 1.3.10 fdf0f75ffa5731fee406c6e761e84a9d2b47aa43 pep440-dev
25-
improve/.* 1.3.10 fdf0f75ffa5731fee406c6e761e84a9d2b47aa43 pep440-dev
23+
maintenance 1.3.11 e14c00f135bf2a955e54ac3f0a2928d8440055d2 pep440-dev
24+
fix/.* 1.3.11 e14c00f135bf2a955e54ac3f0a2928d8440055d2 pep440-dev
25+
improve/.* 1.3.11 e14c00f135bf2a955e54ac3f0a2928d8440055d2 pep440-dev
2626

27-
# staging/maintenance is currently the branch for preparation of 1.3.10rc5
27+
# staging/maintenance is currently the branch for preparation of 1.3.11rc3
2828
# so is regressionfix/...
29-
staging/maintenance 1.3.10rc5 e628aedbc11e2ef03ba4172b93e5be2a892b955b pep440-dev
30-
regressionfix/.* 1.3.10rc5 e628aedbc11e2ef03ba4172b93e5be2a892b955b pep440-dev
29+
staging/maintenance 1.3.11rc3 18e7d2b72ad73c5d8e522cebbc001d0e8a3dff14 pep440-dev
30+
regressionfix/.* 1.3.11rc3 18e7d2b72ad73c5d8e522cebbc001d0e8a3dff14 pep440-dev
3131

3232
# every other branch is a development branch and thus gets resolved to 1.4.0-dev for now
3333
.* 1.4.0 7f5d03d0549bcbd26f40e7e4a3297ea5204fb1cc pep440-dev

AUTHORS.md

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ date of first contribution):
9494
* [Gaston Dombiak](https://github.com/gdombiak)
9595
* [Brad Fisher](https://github.com/bradcfisher)
9696
* [Aldo Hoeben](https://github.com/fieldofview)
97+
* [Henning Groß](https://github.com/hgross)
98+
* [Jubaleth](https://github.com/jubaleth)
99+
* [Daniel Joyce](https://github.com/DanielJoyce)
100+
* [Andy Qua](https://github.com/AndyQ)
101+
* [Fabio Santos](https://github.com/Fabi0San)
97102

98103
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
99104
[Daid Braam](https://github.com/daid). Parts of its communication layer and

CHANGELOG.md

+148
Large diffs are not rendered by default.

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,8 @@ be edited from OctoPrint's settings dialog.
143143

144144
## Special Thanks
145145

146-
Cross-browser testing services are kindly provided by [BrowserStack](http://www.browserstack.com/).
147-
Profiling is done with the help of [PyVmMonitor](http://www.pyvmmonitor.com).
146+
Cross-browser testing services are kindly provided by [BrowserStack](https://www.browserstack.com/).
147+
148+
Profiling is done with the help of [PyVmMonitor](https://www.pyvmmonitor.com).
149+
150+
Error tracking is powered and sponsored by [Sentry](https://sentry.io).

SUPPORTERS.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,49 @@ thanks to everyone who contributed!
99
* Andre Bubel
1010
* Andrew Moorby
1111
* Arnljot Arntsen
12+
* Bjorn Breckenridge
1213
* Boris Hussein
1314
* Brad Jackson
1415
* Christian Petropolis
1516
* Christian Wolf
1617
* COLLE+McVOY
1718
* D Brian Kimmel
1819
* DeltaMaker 3D Printers
20+
* Dorian Gray
1921
* E3D BigBox
2022
* Eric Betts
21-
* Eric Slape
2223
* Ernesto Martinez
23-
* Frank Sander
24+
* Franziska Kunsmann
2425
* George Robles
25-
* Jared Go
26+
* jean-claude migneault
2627
* Jeff Renfer
2728
* Jefferson Hunt
2829
* Jeremiah Avery
2930
* Joseph Payne
30-
* Josh Daniels
3131
* Joshua Wills
3232
* Justin Kaufman
3333
* Kaile Riser
3434
* Kale Stedman
3535
* Kazuhiro Ogura
3636
* LA 3D Printer Repair
37-
* Lewis Newby
3837
* LulzBot®
3938
* Makespace Madrid
4039
* Mark Walker
4140
* Michael Aumock
4241
* Miles Flavel
4342
* Mosaic Manufacturing
43+
* OMER MEHMET SUTAS
4444
* Patrick McGinnis
4545
* Prof Yuh Wen Chen
4646
* Randy C. Will
4747
* Robert Gusek
48-
* Roger Strolz
4948
* Samer Najia
49+
* Shawn Lewis
5050
* Simon Hallam
5151
* Stefan Krister
5252
* Sven Mueller
53-
* Thomas Hatley
54-
* Timothy D Hoogland
53+
* TEVO 3D Printers
5554
* Trent Shumay
55+
* Ulrich Kempken
5656

57-
and 1446 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
57+
and 1544 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!

THIRDPARTYLICENSES.md

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
* [Awesome-Slugify](https://pypi.python.org/pypi/awesome-slugify): GPLv3
3737
* [chainmap](https://bitbucket.org/jeunice/chainmap): Python
3838
* [Click](http://click.pocoo.org/): BSD
39-
* [dateutil](https://dateutil.readthedocs.io/): BSD
4039
* [emoji](https://github.com/carpedm20/emoji/): BSD
4140
* [feedparser](https://github.com/kurtmckee/feedparser): BSD
4241
* [Flask](http://flask.pocoo.org/): BSD

docs/api/apps.rst

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Apps
1111
Session Keys
1212
============
1313

14+
.. deprecated:: 1.3.11
15+
16+
This functionality will be removed in 1.4.0. Use the :ref:`Application Keys Plugin workflow <sec-bundledplugins-appkeys-workflow>` instead.
17+
1418
OctoPrint offers a special API key type for apps to use, the so called App Session Key. These keys have a time based
1519
validity and are generated by OctoPrint for requesting apps.
1620

docs/api/general.rst

+21-10
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ General information
1111
Authorization
1212
=============
1313

14-
OctoPrint's API expects an API key to be supplied with each request. This API key can be either the globally
15-
configured one, a user specific one if "Access Control" is enabled or an app and user specific one as generated
16-
by the authorization workflow implemented by the bundled :ref:`Application Keys Plugin <sec-bundledplugins-appkeys>` (since 1.3.10).
14+
If :ref:`Access Control <sec-features-access_control>` is enabled OctoPrint's API expects an API key to be supplied with each request. This API
15+
key can be either the globally configured one, a user specific one or an app and user specific one as generated by the
16+
authorization workflow implemented by the bundled :ref:`Application Keys Plugin <sec-bundledplugins-appkeys>` (since 1.3.10).
1717

1818
Clients are advised to implement the :ref:`Application Keys Plugin workflow <sec-bundledplugins-appkeys-workflow>` first and
1919
fallback on directing the user to manually supply the the user specific API key. The global key should rarely be used.
@@ -26,8 +26,6 @@ The API key must be supplied in the custom HTTP header ``X-Api-Key``, e.g.
2626
Host: example.com
2727
X-Api-Key: abcdef...
2828

29-
If it is missing or included but invalid, OctoPrint will directly return a response with status :http:statuscode:`403`.
30-
3129
For testing purposes it is also possible to supply the API key via a query parameter ``apikey``, e.g.
3230

3331
.. sourcecode:: http
@@ -37,6 +35,24 @@ For testing purposes it is also possible to supply the API key via a query param
3735

3836
Please be advised that clients should use the header field variant if at all possible.
3937

38+
If the key is missing or invalid, OctoPrint will treat the request as it would any unauthenticated anonymous request to the endpoint.
39+
Consequently, if the bundled :ref:`ForceLogin plugin <sec-bundledplugins-forcelogin>` is active (which is the default), that means
40+
that any requests without or with an invalid API key targeting other API endpoints than :ref:`Login <sec-api-general-login>`
41+
will be denied with a :http:statuscode:`403`.
42+
43+
.. warning::
44+
45+
If :ref:`Access Control <sec-features-access_control>` is disabled, OctoPrint will treat any unauthenticated anonymous requests and thus also requests
46+
with an invalid or outright missing API key as requests with full admin rights!
47+
48+
.. note::
49+
50+
The API key requirements changed in 1.3.11. Up to that version, even if Access Control was disabled, all requests needed to
51+
be supplied with an API Key. To make the webinterface work under these circumstances, an unauthenticated anonymous API key was injected into the
52+
HTML page and also available on the :ref:`Push API <sec-api-push>`. The presence and ready availability of this unauthenticated
53+
anonymous "UI API key" caused confusion and false alarm among users and didn't contribute to the security of the platform in a
54+
meaningful way, so it was finally abandoned in 1.3.11.
55+
4056
.. _fig-api-general-globalapikey:
4157
.. figure:: ../images/settings-global-api-key.png
4258
:align: center
@@ -58,11 +74,6 @@ Please be advised that clients should use the header field variant if at all pos
5874

5975
The API key options in the "Change password" dialog. Users can generate and revoke their custom API key here.
6076

61-
.. note::
62-
OctoPrint's web interface uses a custom API key that is freshly generated on every server start. This key is not
63-
intended to be used by any other client and would not be very useful in any case, since it basically represents
64-
a completely anonymous client.
65-
6677
.. _sec-api-general-contenttype:
6778

6879
Content Type

docs/api/job.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ Retrieve information about the current job
212212
"filepos": 337942,
213213
"printTime": 276,
214214
"printTimeLeft": 912
215-
}
215+
},
216+
"state": "Printing"
216217
}
217218

218219
:statuscode 200: No error
@@ -243,4 +244,8 @@ Job information response
243244
- 1
244245
- :ref:`sec-api-datamodel-jobs-progress`
245246
- Information regarding the progress of the current print job
246-
247+
* - ``state``
248+
- 1
249+
- String
250+
- A textual representation of the current state of the job, i.e. "Operational", "Printing", "Pausing", "Paused",
251+
"Cancelling", "Error" or "Offline".

docs/api/printer.rst

+156-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ Bed
2222
corresponding resource returns temperature information including an optional history. Note that Bed commands
2323
are only available if the currently selected printer profile has a heated bed.
2424
See :ref:`sec-api-printer-bedcommand`.
25+
Chamber
26+
Chamber commands allow setting the temperature and temperature offset for the printer's heated chamber. Querying
27+
the corresponding resource returns temperature information including an option history. Note that Chamber commands
28+
are only available if the currently selected printer profile has a heated chamber.
29+
See :ref:`sec-api-printer-chambercommand`.
2530
SD card
2631
SD commands allow initialization, refresh and release of the printer's SD card (if available). Querying the
2732
corresponding resource returns the current SD card state.
@@ -623,12 +628,12 @@ Issue a bed command
623628
are:
624629

625630
target
626-
Sets the given target temperature on the printer's tools. Additional parameters:
631+
Sets the given target temperature on the printer's bed. Additional parameters:
627632

628633
* ``target``: Target temperature to set.
629634

630635
offset
631-
Sets the given temperature offset on the printer's tools. Additional parameters:
636+
Sets the given temperature offset on the printer's bed. Additional parameters:
632637

633638
* ``offset``: Offset to set.
634639

@@ -710,7 +715,7 @@ Retrieve the current bed state
710715
an :http:statuscode:`409`.
711716

712717
.. note::
713-
If you want both tool and bed temperature information at the same time, take a look at
718+
If you want tool, bed and chamber temperature information at the same time, take a look at
714719
:ref:`Retrieve the current printer state <sec-api-printer-state>`.
715720

716721
**Example**
@@ -760,6 +765,154 @@ Retrieve the current bed state
760765
:statuscode 409: If the printer is not operational or the selected printer profile
761766
does not have a heated bed.
762767

768+
.. _sec-api-printer-chambercommand:
769+
770+
Issue a chamber command
771+
=======================
772+
773+
.. http:post:: /api/printer/bed
774+
775+
Chamber commands allow setting the temperature and temperature offsets for the printer's heated chamber. Available commands
776+
are:
777+
778+
target
779+
Sets the given target temperature on the printer's chamber. Additional parameters:
780+
781+
* ``target``: Target temperature to set.
782+
783+
offset
784+
Sets the given temperature offset on the printer's chamber. Additional parameters:
785+
786+
* ``offset``: Offset to set.
787+
788+
All of these commands may only be sent if the printer is currently operational. Otherwise a :http:statuscode:`409`
789+
is returned.
790+
791+
Upon success, a status code of :http:statuscode:`204` and an empty body is returned.
792+
793+
If no heated chambed is configured for the currently selected printer profile, the resource will return
794+
an :http:statuscode:`409`.
795+
796+
Requires user rights.
797+
798+
**Example Target Temperature Request**
799+
800+
Set the target temperature for the printer's heated chamber to 50°C.
801+
802+
.. sourcecode:: http
803+
804+
POST /api/printer/chamber HTTP/1.1
805+
Host: example.com
806+
Content-Type: application/json
807+
X-Api-Key: abcdef...
808+
809+
{
810+
"command": "target",
811+
"target": 50
812+
}
813+
814+
.. sourcecode:: http
815+
816+
HTTP/1.1 204 No Content
817+
818+
**Example Offset Temperature Request**
819+
820+
Set the temperature offset for the heated chamber to -5°C.
821+
822+
.. sourcecode:: http
823+
824+
POST /api/printer/chamber HTTP/1.1
825+
Host: example.com
826+
Content-Type: application/json
827+
X-Api-Key: abcdef...
828+
829+
{
830+
"command": "offset",
831+
"offset": -5
832+
}
833+
834+
.. sourcecode:: http
835+
836+
HTTP/1.1 204 No Content
837+
838+
:json string command: The command to issue, either ``target`` or ``offset``.
839+
:json object target: ``target`` command: The target temperature to set.
840+
:json object offset: ``offset`` command: The offset temperature to set.
841+
:statuscode 204: No error
842+
:statuscode 400: If ``target`` or ``offset`` is not a valid number or outside of the supported range, or if the
843+
request is otherwise invalid.
844+
:statuscode 409: If the printer is not operational or the selected printer profile
845+
does not have a heated chamber.
846+
847+
.. _sec-api-printer-chamberstate:
848+
849+
Retrieve the current chamber state
850+
==================================
851+
852+
.. http:get:: /api/printer/chamber
853+
854+
Retrieves the current temperature data (actual, target and offset) plus optionally a (limited) history (actual, target,
855+
timestamp) for the printer's heated chamber.
856+
857+
It's also possible to retrieve the temperature history by supplying the ``history`` query parameter set to ``true``. The
858+
amount of returned history data points can be limited using the ``limit`` query parameter.
859+
860+
Returns a :http:statuscode:`200` with a Temperature Response in the body upon success.
861+
862+
If no heated chamber is configured for the currently selected printer profile, the resource will return
863+
an :http:statuscode:`409`.
864+
865+
.. note::
866+
If you want tool, bed and chamber temperature information at the same time, take a look at
867+
:ref:`Retrieve the current printer state <sec-api-printer-state>`.
868+
869+
**Example**
870+
871+
Query the chamber temperature data and also include the temperature history but limit it to two entries.
872+
873+
.. sourcecode:: http
874+
875+
GET /api/printer/chamber?history=true&limit=2 HTTP/1.1
876+
Host: example.com
877+
X-Api-Key: abcdef...
878+
879+
.. sourcecode:: http
880+
881+
HTTP/1.1 200 OK
882+
Content-Type: application/json
883+
884+
{
885+
"chamber": {
886+
"actual": 50.221,
887+
"target": 70.0,
888+
"offset": 5
889+
},
890+
"history": [
891+
{
892+
"time": 1395651928,
893+
"chamber": {
894+
"actual": 50.221,
895+
"target": 70.0
896+
}
897+
},
898+
{
899+
"time": 1395651926,
900+
"chamber": {
901+
"actual": 49.1123,
902+
"target": 70.0
903+
}
904+
}
905+
]
906+
}
907+
908+
:query history: If set to ``true`` (or: ``yes``, ``y``, ``1``), history information will be included in the response
909+
too. If no ``limit`` parameter is given, all available temperature history data will be returned.
910+
:query limit: If set to an integer (``n``), only the last ``n`` data points from the printer's temperature history
911+
will be returned. Will be ignored if ``history`` is not enabled.
912+
:statuscode 200: No error
913+
:statuscode 409: If the printer is not operational or the selected printer profile
914+
does not have a heated chamber.
915+
763916
.. _sec-api-printer-sdcommand:
764917

765918
Issue an SD command

0 commit comments

Comments
 (0)