· 6 years ago · Mar 25, 2020, 08:32 AM
1{
2 "swagger": "2.0",
3 "info": {
4 "version": "1.0.0",
5 "title": "Ultimaker API",
6 "description": "REST API for the Ultimaker 3D printer.\n\nAuthentication: Any PUT/POST/DELETE api requires authentication before it can be used. Authentication is done with http digest (RFC 2617) without fallback to basic authentication.\n\nTo get a valid username/password combination, the following process can/should be followed.\n\n1) POST /auth/request with 'application' and 'user' as parameters. The application name and user name will be shown to the user on the printer. The reply body will contain a json reply with an 'id' and 'key' part.\n\n2) Repeatedly GET /auth/check/<id> until it reports 'authorized' or 'unauthorized'. This will be reported back once the end user selects if the application is allowed to use the API.\n\n3) [optional] test the authentication, the earlier given 'id' is the username, the 'key' is the password. Use digest authentication on GET /auth/verify to test this."
7 },
8 "basePath": "/api/v1",
9 "tags": [{
10 "name": "Authentication",
11 "description": "Request and check authorization keys"
12 }, {
13 "name": "Materials",
14 "description": "All materials known by the printer"
15 }, {
16 "name": "Printer",
17 "description": "Printer state"
18 }, {
19 "name": "Network",
20 "description": "Network state"
21 }, {
22 "name": "PrintJob",
23 "description": "Currently running print"
24 }, {
25 "name": "System",
26 "description": "Device information"
27 }, {
28 "name": "History",
29 "description": "History of this printer"
30 }, {
31 "name": "Camera",
32 "description": "Camera image and video"
33 }, {
34 "name": "AirManager",
35 "description": "Air-manager peripheral"
36 }],
37 "schemes": [
38 "http"
39 ],
40 "consumes": [
41 "application/json",
42 "multipart/form-data"
43 ],
44 "produces": [
45 "application/json"
46 ],
47 "paths": {
48 "/auth/request": {
49 "post": {
50 "tags": ["Authentication"],
51 "description": "Request authentication from the printer. This generates new id/key combination that has to be used as username/password in the digest authentication on certain APIs.",
52 "parameters": [{
53 "name": "application",
54 "in": "formData",
55 "description": "Name of the application that wants access. Displayed to the user.",
56 "required": true,
57 "type": "string"
58 }, {
59 "name": "user",
60 "in": "formData",
61 "description": "Name of the user who wants access. Displayed to the user when confirming access.",
62 "required": true,
63 "type": "string"
64 }, {
65 "name": "host_name",
66 "in": "formData",
67 "description": "Optionally the hostname of the service that is authenticating can be provided for future use.",
68 "required": false,
69 "type": "string"
70 }, {
71 "name": "exclusion_key",
72 "in": "formData",
73 "description": "Optionally This key can make sure only one authorisation will exist on the remote printer with this same key, This allows a new user to de-authenticate the old one preventing multiple printer controlling applications to use the printer at the same time. Naturally multiple authorisations can exist if this is omitted",
74 "required": false,
75 "type": "string"
76 }],
77 "responses": {
78 "200": {
79 "schema": {
80 "type": "object",
81 "properties": {
82 "id": {
83 "type": "string",
84 "description": "New ID that is unique as authentication token. This is the username part in the http digest authentication."
85 },
86 "key": {
87 "type": "string",
88 "description": "New key that is unique as authentication token. This is the password part in the http digest authentication."
89 }
90 }
91 },
92 "description": "Register as a new application that wants access to the API."
93 }
94 }
95 }
96 },
97 "/auth/check/{id}": {
98 "get": {
99 "tags": ["Authentication"],
100 "description": "Check if the given ID is authorized for printer access. Will return 'authorized' when the end user has selected that this application is allowed to use the printer. Will return 'unauthorized' when the user has selected that the application is not allowed to access the printer. Will return 'unknown' when the end user has not selected any option yet.",
101 "parameters": [{
102 "name": "id",
103 "in": "path",
104 "description": "id returned from the /auth/request call",
105 "required": true,
106 "type": "string"
107 }],
108 "responses": {
109 "200": {
110 "description": "result of the authorization check.",
111 "schema": {
112 "type": "object",
113 "properties": {
114 "message": {
115 "type": "string",
116 "enum": [
117 "authorized",
118 "unauthorized",
119 "unknown"
120 ]
121 }
122 }
123 }
124 }
125 }
126 }
127 },
128 "/auth/verify": {
129 "get": {
130 "tags": ["Authentication"],
131 "description": "This API call always does authentication checking for digest authentication. Invalid digest id/key combinations will generate a 401 result.",
132 "responses": {
133 "200": {
134 "description": "Verify check successful, digest authentication is valid.",
135 "schema": {
136 "type": "object",
137 "properties": {
138 "message": {
139 "type": "string",
140 "enum": [
141 "ok"
142 ]
143 }
144 }
145 }
146 },
147 "401": {
148 "description": "Not authorized. Check or request your id/key combination, and/or http digest implementation."
149 }
150 }
151 }
152 },
153 "/airmanager": {
154 "get": {
155 "tags": ["AirManager"],
156 "description": "Returns Air-manager details",
157 "responses": {
158 "200": {
159 "description": "Air-manager details",
160 "schema": {
161 "$ref": "#/definitions/AirManager"
162 }
163 }
164 }
165 }
166 },
167 "/camera": {
168 "get": {
169 "tags": ["Camera"],
170 "description": "Returns camera object",
171 "responses": {
172 "200": {
173 "description": "Camera object",
174 "schema": {
175 "$ref": "#/definitions/Camera"
176 }
177 }
178 }
179 }
180 },
181 "/camera/feed": {
182 "get": {
183 "tags": ["Camera"],
184 "description": "Get a link to the camera feed, this returns an url to a camera stream",
185 "responses": {
186 "200": {
187 "description": "Camera feed",
188 "schema": {
189 "type": "string"
190 }
191 }
192 }
193 }
194 },
195 "/camera/{index}/stream": {
196 "get": {
197 "tags": ["Camera"],
198 "description": "Get a redirection to the camera live feed.",
199 "parameters": [{
200 "name": "index",
201 "in": "path",
202 "description": "index of the camera to get the feed from.",
203 "required": true,
204 "type": "number"
205 }],
206 "responses": {
207 "302": {
208 "description": "Redirection to the camera feed."
209 },
210 "404": {
211 "description": "Camera with this index is not available in the system."
212 }
213 }
214 }
215 },
216 "/camera/{index}/snapshot": {
217 "get": {
218 "tags": ["Camera"],
219 "description": "Get a redirection to the camera snapshot.",
220 "parameters": [{
221 "name": "index",
222 "in": "path",
223 "description": "index of the camera to get the snapshot from.",
224 "required": true,
225 "type": "number"
226 }],
227 "responses": {
228 "302": {
229 "description": "Redirection to the camera snapshot."
230 },
231 "404": {
232 "description": "Camera with this index is not available in the system."
233 }
234 }
235 }
236 },
237 "/materials": {
238 "get": {
239 "tags": ["Materials"],
240 "responses": {
241 "200": {
242 "schema": {
243 "type": "array",
244 "items": {
245 "type": "string"
246 }
247 },
248 "description": "All known material XML files, one string for each material."
249 }
250 }
251 },
252 "post": {
253 "tags": ["Materials"],
254 "parameters": [{
255 "name": "file",
256 "in": "formData",
257 "description": "Material file (.xml)",
258 "required": true,
259 "type": "file"
260 }, {
261 "name": "filename",
262 "in": "formData",
263 "description": "Name of the file",
264 "required": true,
265 "type": "string"
266 }, {
267 "name": "signature_file",
268 "in": "formData",
269 "description": "Signature file (.sig)",
270 "required": false,
271 "type": "file"
272 }],
273 "responses": {
274 "204": {
275 "description": "Material profile added."
276 }
277 }
278 }
279 },
280 "/materials/{material_guid}": {
281 "get": {
282 "tags": ["Materials"],
283 "parameters": [{
284 "name": "material_guid",
285 "in": "path",
286 "description": "GUID of material to fetch",
287 "required": true,
288 "type": "string"
289 }],
290 "responses": {
291 "200": {
292 "description": "xml of material",
293 "schema": {
294 "type": "string"
295 }
296 }
297 }
298 },
299 "put": {
300 "tags": ["Materials"],
301 "parameters": [{
302 "name": "material_guid",
303 "in": "path",
304 "description": "GUID of material to update",
305 "required": true,
306 "type": "string"
307 }],
308 "responses": {
309 "204": {
310 "description": "Material updated"
311 }
312 }
313 },
314 "delete": {
315 "tags": ["Materials"],
316 "parameters": [{
317 "name": "material_guid",
318 "in": "path",
319 "description": "GUID of material to delete",
320 "required": true,
321 "type": "string"
322 }],
323 "responses": {
324 "204": {
325 "description": "Material deleted"
326 }
327 }
328 }
329 },
330 "/printer": {
331 "get": {
332 "tags": ["Printer"],
333 "description": "Returns printer object",
334 "responses": {
335 "200": {
336 "description": "Printer object",
337 "schema": {
338 "$ref": "#/definitions/Printer"
339 }
340 }
341 }
342 }
343 },
344 "/printer/diagnostics/cap_sensor_noise": {
345 "get": {
346 "tags": ["Printer"],
347 "description": "Calculates noise variances on the cap sensor by executing 100 loop iterations, each iteration measuring 50 samples",
348 "responses": {
349 "200": {
350 "description": "A list of dictionaries containing the min, max, avg and stddev^2 values"
351 },
352 "400": {
353 "description": "When a timeout occurs (taking too long to get the data) or when the printer is already busy"
354 }
355 }
356 }
357 },
358 "/printer/diagnostics/cap_sensor_noise/{loop_count}": {
359 "get": {
360 "tags": ["Printer"],
361 "description": "Calculates noise variances on the cap sensor by executing the specified loop_count iterations, each iteration measuring 50 samples",
362 "parameters": [{
363 "name": "loop_count",
364 "in": "path",
365 "description": "The number of times to get sample data",
366 "required": true,
367 "type": "integer",
368 "format": "int32"
369 }],
370 "responses": {
371 "200": {
372 "description": "A list of dictionaries containing the min, max, avg and stddev^2 values"
373 },
374 "400": {
375 "description": "When a timeout occurs (taking too long to get the data) or when the printer is already busy"
376 }
377 }
378 }
379 },
380 "/printer/diagnostics/cap_sensor_noise/{loop_count}/{sample_count}": {
381 "get": {
382 "tags": ["Printer"],
383 "description": "Calculates noise variances on the cap sensor by executing the specified loop_count iterations, each iteration measuring sample_count samples",
384 "parameters": [{
385 "name": "loop_count",
386 "in": "path",
387 "description": "The number of times to get sample data",
388 "required": true,
389 "type": "integer",
390 "format": "int32"
391 }, {
392 "name": "sample_count",
393 "in": "path",
394 "description": "The number of samples to get in each iteration",
395 "required": true,
396 "type": "integer",
397 "format": "int32"
398 }],
399 "responses": {
400 "200": {
401 "description": "A list of dictionaries containing the min, max, avg and stddev^2 values"
402 },
403 "400": {
404 "description": "When a timeout occurs (taking too long to get the data) or when the printer is already busy"
405 }
406 }
407 }
408 },
409 "/printer/diagnostics/temperature_flow/{sample_count}": {
410 "get": {
411 "tags": ["Printer"],
412 "description": "Gets historical temperature & flow data",
413 "produces": [
414 "application/json",
415 "text/csv"
416 ],
417 "parameters": [{
418 "name": "sample_count",
419 "in": "path",
420 "description": "The number of samples to get",
421 "required": true,
422 "type": "integer",
423 "format": "int32"
424 }, {
425 "name": "csv",
426 "in": "query",
427 "description": "If not zero, return the results as comma separated values instead of a normal json response.",
428 "required": false,
429 "type": "integer",
430 "format": "int32"
431 }],
432 "responses": {
433 "200": {
434 "description": "A 2 dimensional array of sample data. First row of the array contains names of each column. All the other rows contain the actual sample data."
435 }
436 }
437 }
438 },
439 "/printer/diagnostics/probing_report": {
440 "get": {
441 "tags": ["Printer"],
442 "responses": {
443 "200": {
444 "description": "Gets a file with the most recent build plate probing report.",
445 "schema": {
446 "type": "file"
447 }
448 },
449 "204": {
450 "description": "When no probing report is found."
451 }
452 }
453 }
454 },
455 "/printer/status": {
456 "get": {
457 "tags": ["Printer"],
458 "description": "Get the status of the printer",
459 "responses": {
460 "200": {
461 "description": "Global status of the printer, most interesting ones are 'idle' which means the printer can accept a print job. And 'printing' which means the printer is actively working on a print job.",
462 "schema": {
463 "$ref": "#/definitions/Printer_status"
464 }
465 }
466 }
467 }
468 },
469 "/printer/led": {
470 "get": {
471 "tags": ["Printer"],
472 "description": "Returns the hue, saturation, and value (HSV) of the case lighting",
473 "responses": {
474 "200": {
475 "description": "HSV the case lighting",
476 "schema": {
477 "$ref": "#/definitions/led"
478 }
479 }
480 }
481 },
482 "put": {
483 "tags": ["Printer"],
484 "description": "Sets the hue, saturation, and value (HSV) of the case lighting",
485 "parameters": [
486 {
487 "name": "color",
488 "in": "body",
489 "description": "Target HSV of case lighting",
490 "required": true,
491 "schema": {
492 "$ref": "#/definitions/led"
493 }
494 }
495 ],
496 "responses": {
497 "204": {
498 "description": "lighting set"
499 }
500 }
501 }
502 },
503
504 "/printer/led/hue": {
505 "get": {
506 "tags": ["Printer"],
507 "description": "Returns the hue of the case lighting",
508 "responses": {
509 "200": {
510 "description": "Current hue of the case lighting",
511 "schema": {
512 "$ref": "#/definitions/led_hue"
513 }
514 }
515 }
516 },
517 "put": {
518 "tags": ["Printer"],
519 "parameters": [
520 {
521 "name": "hue",
522 "in": "body",
523 "description": "Target hue of case lighting",
524 "required": true,
525 "schema": {
526 "$ref": "#/definitions/led_hue"
527 }
528 }
529 ],
530 "responses": {
531 "204": {
532 "description": "lighting set"
533 }
534 }
535 }
536 },
537 "/printer/led/saturation": {
538 "get": {
539 "tags": ["Printer"],
540 "description": "Returns the saturation of the case lighting",
541 "responses": {
542 "200": {
543 "description": "Current saturation of the case lighting",
544 "schema": {
545 "$ref": "#/definitions/led_saturation"
546 }
547 }
548 }
549 },
550 "put": {
551 "tags": ["Printer"],
552 "parameters": [
553 {
554 "name": "saturation",
555 "in": "body",
556 "description": "Target saturation of case lighting",
557 "required": true,
558 "schema": {
559 "$ref": "#/definitions/led_saturation"
560 }
561 }
562 ],
563 "responses": {
564 "204": {
565 "description": "lighting set"
566 }
567 }
568 }
569 },
570 "/printer/led/brightness": {
571 "get": {
572 "tags": ["Printer"],
573 "description": "Returns the brightness of the case lighting",
574 "responses": {
575 "200": {
576 "description": "Current brightness of the case lighting",
577 "schema": {
578 "$ref": "#/definitions/led_brightness"
579 }
580 }
581 }
582 },
583 "put": {
584 "tags": ["Printer"],
585 "parameters": [
586 {
587 "name": "value",
588 "in": "body",
589 "description": "Target brightness of case lighting",
590 "required": true,
591 "schema": {
592 "$ref": "#/definitions/led_brightness"
593 }
594 }
595 ],
596 "responses": {
597 "204": {
598 "description": "lighting set"
599 }
600 }
601 }
602 },
603 "/printer/led/blink": {
604 "post": {
605 "tags": ["Printer"],
606 "parameters": [{
607 "name": "blink",
608 "in": "body",
609 "required": false,
610 "schema": {
611 "$ref": "#/definitions/Blink"
612 }
613 }],
614 "responses": {
615 "204": {
616 "description": "blink set"
617 },
618 "400": {
619 "description": "This is returned when frequency <= 0 or count <= 0 with a message"
620 }
621 }
622 }
623 },
624 "/printer/heads": {
625 "get": {
626 "tags": ["Printer"],
627 "description": "Returns all heads of the printer",
628 "responses": {
629 "200": {
630 "description": "",
631 "schema": {
632 "type": "array",
633 "items": {
634 "$ref": "#/definitions/Head"
635 }
636 }
637 }
638 }
639 }
640 },
641 "/printer/heads/{head_id}": {
642 "get": {
643 "tags": ["Printer"],
644 "description": "Returns head by ID",
645 "parameters": [{
646 "name": "head_id",
647 "in": "path",
648 "description": "ID of head to fetch",
649 "required": true,
650 "type": "integer",
651 "format": "int64"
652 }],
653 "responses": {
654 "200": {
655 "description": "",
656 "schema": {
657 "$ref": "#/definitions/Head"
658 }
659 },
660 "404": {
661 "description": "Head was not found. Note that this means that all deeper (eg: getting position, extruders, etc.) calls will also return a 404"
662 }
663 }
664 }
665 },
666 "/printer/heads/{head_id}/position": {
667 "get": {
668 "tags": ["Printer"],
669 "description": "Returns position of head by ID",
670 "parameters": [{
671 "name": "head_id",
672 "in": "path",
673 "description": "ID of head of which to get position. Note that this position also has a Z component. This api assumes that the head is the only part that moves.",
674 "required": true,
675 "type": "integer",
676 "format": "int64"
677 }],
678 "responses": {
679 "200": {
680 "description": "",
681 "schema": {
682 "$ref": "#/definitions/XYZ"
683 }
684 }
685 }
686 },
687 "put": {
688 "tags": ["Printer"],
689 "parameters": [{
690 "name": "head_id",
691 "in": "path",
692 "description": "ID of head from which the position is changed",
693 "required": true,
694 "type": "integer",
695 "format": "int64"
696 }, {
697 "name": "position",
698 "in": "body",
699 "description": "Target position",
700 "required": true,
701 "schema": {
702 "type": "object",
703 "properties": {
704 "x": {
705 "type": "number",
706 "description": "X position of the head, in mm."
707 },
708 "y": {
709 "type": "number",
710 "description": "Y position of the head, in mm."
711 },
712 "z": {
713 "type": "number",
714 "description": "Z position of the bed, in mm."
715 },
716 "speed": {
717 "type": "number",
718 "description": "Speed of the requested movement, in mm/s.",
719 "default": 150
720 }
721 }
722 }
723 }],
724 "responses": {
725 "204": {
726 "description": "Position set"
727 }
728 }
729 },
730 "post": {
731 "tags": ["Printer"],
732 "description": "A POST to the position is used to specific actions for the position.",
733 "parameters": [{
734 "name": "head_id",
735 "in": "path",
736 "description": "ID of head from which the hotend is fetched",
737 "required": true,
738 "type": "integer",
739 "format": "int64"
740 }, {
741 "name": "action",
742 "in": "body",
743 "description": "Which action to do on the position. Currently a single action is supported 'home', which sends the head to the endstop positions and resets the origin of the position so 0,0,0 is the front left corner on the print bed.",
744 "required": true,
745 "schema": {
746 "type": "string",
747 "enum": ["home"]
748 }
749 }],
750 "responses": {
751 "200": {
752 "description": "Position set"
753 }
754 }
755 }
756 },
757 "/printer/heads/{head_id}/max_speed": {
758 "get": {
759 "tags": ["Printer"],
760 "description": "Returns max speed of head by ID",
761 "parameters": [{
762 "name": "head_id",
763 "in": "path",
764 "description": "ID of head of which to get the max speed of. Note that this speed also has a Z component. This api assumes that the head is the only part that moves.",
765 "required": true,
766 "type": "integer",
767 "format": "int64"
768 }],
769 "responses": {
770 "200": {
771 "description": "",
772 "schema": {
773 "$ref": "#/definitions/XYZ"
774 }
775 }
776 }
777 },
778 "put": {
779 "tags": ["Printer"],
780 "parameters": [{
781 "name": "head_id",
782 "in": "path",
783 "description": "",
784 "required": true,
785 "type": "integer",
786 "format": "int64"
787 }, {
788 "name": "speed",
789 "in": "body",
790 "description": "Target maximum speed for each axis.",
791 "required": true,
792 "schema": {
793 "$ref": "#/definitions/XYZ"
794 }
795 }],
796 "responses": {
797 "204": {
798 "description": "Max speed set"
799 }
800 }
801 }
802 },
803 "/printer/heads/{head_id}/acceleration": {
804 "get": {
805 "tags": ["Printer"],
806 "description": "Returns the default acceleration of head by ID.",
807 "parameters": [{
808 "name": "head_id",
809 "in": "path",
810 "description": "ID of head of which to get the default acceleration of. Note that this speed also has a Z component. This API assumes that the head is the only part that moves.",
811 "required": true,
812 "type": "integer",
813 "format": "int64"
814 }],
815 "responses": {
816 "200": {
817 "description": "",
818 "schema": {
819 "type": "number"
820 }
821 }
822 }
823 },
824 "put": {
825 "tags": ["Printer"],
826 "parameters": [{
827 "name": "head_id",
828 "in": "path",
829 "description": "",
830 "required": true,
831 "type": "integer",
832 "format": "int64"
833 }, {
834 "name": "acceleration",
835 "in": "body",
836 "description": "Target default acceleration.",
837 "required": true,
838 "schema": {
839 "type": "number"
840 }
841 }],
842 "responses": {
843 "204": {
844 "description": "acceleration speed set"
845 }
846 }
847 }
848 },
849 "/printer/heads/{head_id}/jerk": {
850 "get": {
851 "tags": ["Printer"],
852 "description": "Returns jerk of head by ID",
853 "parameters": [{
854 "name": "head_id",
855 "in": "path",
856 "description": "ID of head of which to get the jerk of. Note that this speed also has a Z component. This API assumes that the head is the only part that moves.",
857 "required": true,
858 "type": "integer",
859 "format": "int64"
860 }],
861 "responses": {
862 "200": {
863 "description": "",
864 "schema": {
865 "$ref": "#/definitions/XYZ"
866 }
867 }
868 }
869 },
870 "put": {
871 "tags": ["Printer"],
872 "parameters": [{
873 "name": "head_id",
874 "in": "path",
875 "description": "",
876 "required": true,
877 "type": "integer",
878 "format": "int64"
879 }, {
880 "name": "jerk",
881 "in": "body",
882 "description": "Target jerk",
883 "required": true,
884 "schema": {
885 "$ref": "#/definitions/XYZ"
886 }
887 }],
888 "responses": {
889 "204": {
890 "description": "Jerk set"
891 }
892 }
893 }
894 },
895 "/printer/bed": {
896 "get": {
897 "tags": ["Printer"],
898 "description": "Returns bed object",
899 "responses": {
900 "200": {
901 "description": "bed object",
902 "schema": {
903 "$ref": "#/definitions/Bed"
904 }
905 }
906 }
907 }
908 },
909 "/printer/bed/temperature": {
910 "get": {
911 "tags": ["Printer"],
912 "description": "Returns temperature of bed",
913 "responses": {
914 "200": {
915 "description": "Temperature of the bed",
916 "schema": {
917 "$ref": "#/definitions/CurrentTargetNumberPair"
918 }
919 }
920 }
921 },
922 "put": {
923 "tags": ["Printer"],
924 "parameters": [{
925 "name": "temperature",
926 "in": "formData",
927 "description": "Target temperature of bed",
928 "required": true,
929 "type": "number"
930 }],
931 "responses": {
932 "204": {
933 "description": "Temperature set"
934 }
935 }
936 }
937 },
938 "/printer/bed/pre_heat": {
939 "get": {
940 "tags": ["Printer"],
941 "description": "Returns status of pre-heating the heated bed.",
942 "responses": {
943 "200": {
944 "description": "Status of pre-heating the heated bed.",
945 "schema": {
946 "type": "object",
947 "properties": {
948 "active": {
949 "type": "boolean"
950 },
951 "remaining": {
952 "type": "number",
953 "description": "Remaining pre-heat time in seconds. Only available when 'active' is True"
954 }
955 }
956 }
957 }
958 }
959 },
960 "put": {
961 "tags": ["Printer"],
962 "parameters": [{
963 "name": "temperature",
964 "in": "body",
965 "required": true,
966 "schema": {
967 "$ref": "#/definitions/Bed_PreHeat"
968 }
969 }],
970 "responses": {
971 "400": {
972 "description": "Bad request (invalid parameters)"
973 },
974 "204": {
975 "description": "Preheating Temperature set"
976 }
977 }
978 }
979 },
980 "/printer/bed/type": {
981 "get": {
982 "tags": ["Printer"],
983 "description": "Returns the type of the bed.",
984 "responses": {
985 "200": {
986 "description": "The type of the bed, for now glass.",
987 "schema": {
988 "type": "string"
989 }
990 }
991 }
992 }
993 },
994 "/printer/heads/{head_id}/extruders": {
995 "get": {
996 "tags": ["Printer"],
997 "description": "Returns all extruders of a head",
998 "parameters": [{
999 "name": "head_id",
1000 "in": "path",
1001 "description": "ID of head from which the extruders are fetched",
1002 "required": true,
1003 "type": "integer",
1004 "format": "int64"
1005 }],
1006 "responses": {
1007 "200": {
1008 "description": "",
1009 "schema": {
1010 "type": "array",
1011 "items": {
1012 "$ref": "#/definitions/Extruder"
1013 }
1014 }
1015 }
1016 }
1017 }
1018 },
1019 "/printer/heads/{head_id}/extruders/{extruder_id}": {
1020 "get": {
1021 "tags": ["Printer"],
1022 "description": "Returns extruder by ID",
1023 "parameters": [{
1024 "name": "head_id",
1025 "in": "path",
1026 "description": "ID of head from which the extruder is fetched",
1027 "required": true,
1028 "type": "integer",
1029 "format": "int64"
1030 }, {
1031 "name": "extruder_id",
1032 "in": "path",
1033 "description": "ID of extruder to fetch.",
1034 "required": true,
1035 "type": "integer",
1036 "format": "int64"
1037 }],
1038 "responses": {
1039 "200": {
1040 "description": "",
1041 "schema": {
1042 "$ref": "#/definitions/Extruder"
1043 }
1044 }
1045 }
1046 }
1047 },
1048 "/printer/heads/{head_id}/extruders/{extruder_id}/hotend/offset": {
1049 "get": {
1050 "tags": ["Printer"],
1051 "description": "Returns offset of hotend with respect to head",
1052 "parameters": [{
1053 "name": "head_id",
1054 "in": "path",
1055 "description": "ID of head from which the extruder is fetched",
1056 "required": true,
1057 "type": "integer",
1058 "format": "int64"
1059 }, {
1060 "name": "extruder_id",
1061 "in": "path",
1062 "description": "ID of extruder to fetch",
1063 "required": true,
1064 "type": "integer",
1065 "format": "int64"
1066 }],
1067 "responses": {
1068 "200": {
1069 "description": "",
1070 "schema": {
1071 "$ref": "#/definitions/HotendOffset"
1072 }
1073 }
1074 }
1075 }
1076 },
1077 "/printer/heads/{head_id}/extruders/{extruder_id}/feeder": {
1078 "get": {
1079 "tags": ["Printer"],
1080 "description": "Returns feeder of selected extruder",
1081 "parameters": [{
1082 "name": "head_id",
1083 "in": "path",
1084 "description": "ID of head from which the extruder is fetched",
1085 "required": true,
1086 "type": "integer",
1087 "format": "int64"
1088 }, {
1089 "name": "extruder_id",
1090 "in": "path",
1091 "description": "ID of extruder from which the feeder is fetched",
1092 "required": true,
1093 "type": "integer",
1094 "format": "int64"
1095 }],
1096 "responses": {
1097 "200": {
1098 "description": "",
1099 "schema": {
1100 "$ref": "#/definitions/Feeder"
1101 }
1102 }
1103 }
1104 }
1105 },
1106 "/printer/heads/{head_id}/extruders/{extruder_id}/feeder/jerk": {
1107 "get": {
1108 "tags": ["Printer"],
1109 "description": "Returns jerk of feeder",
1110 "parameters": [{
1111 "name": "head_id",
1112 "in": "path",
1113 "description": "ID of head from which the extruder is fetched",
1114 "required": true,
1115 "type": "integer",
1116 "format": "int64"
1117 }, {
1118 "name": "extruder_id",
1119 "in": "path",
1120 "description": "ID of extruder from which the feeder is fetched",
1121 "required": true,
1122 "type": "integer",
1123 "format": "int64"
1124 }],
1125 "responses": {
1126 "200": {
1127 "description": "",
1128 "schema": {
1129 "type": "number"
1130 }
1131 }
1132 }
1133 },
1134 "put": {
1135 "tags": ["Printer"],
1136 "parameters": [{
1137 "name": "head_id",
1138 "in": "path",
1139 "description": "ID of head from which the extruder is fetched",
1140 "required": true,
1141 "type": "integer",
1142 "format": "int64"
1143 }, {
1144 "name": "extruder_id",
1145 "in": "path",
1146 "description": "ID of extruder from which the feeder is fetched",
1147 "required": true,
1148 "type": "integer",
1149 "format": "int64"
1150 }, {
1151 "name": "jerk",
1152 "in": "body",
1153 "description": "Target jerk",
1154 "required": true,
1155 "schema": {
1156 "type": "number"
1157 }
1158 }],
1159 "responses": {
1160 "204": {
1161 "description": "Jerk set"
1162 }
1163 }
1164 }
1165 },
1166 "/printer/heads/{head_id}/extruders/{extruder_id}/feeder/max_speed": {
1167 "get": {
1168 "tags": ["Printer"],
1169 "description": "Returns max_speed of feeder.",
1170 "parameters": [{
1171 "name": "head_id",
1172 "in": "path",
1173 "description": "ID of head from which the extruder is fetched",
1174 "required": true,
1175 "type": "integer",
1176 "format": "int64"
1177 }, {
1178 "name": "extruder_id",
1179 "in": "path",
1180 "description": "ID of extruder from which the feeder is fetched",
1181 "required": true,
1182 "type": "integer",
1183 "format": "int64"
1184 }],
1185 "responses": {
1186 "200": {
1187 "description": "",
1188 "schema": {
1189 "type": "number"
1190 }
1191 }
1192 }
1193 },
1194 "put": {
1195 "tags": ["Printer"],
1196 "parameters": [{
1197 "name": "head_id",
1198 "in": "path",
1199 "description": "ID of head from which the extruder is fetched",
1200 "required": true,
1201 "type": "integer",
1202 "format": "int64"
1203 }, {
1204 "name": "extruder_id",
1205 "in": "path",
1206 "description": "ID of extruder from which the feeder is fetched",
1207 "required": true,
1208 "type": "integer",
1209 "format": "int64"
1210 }, {
1211 "name": "max_speed",
1212 "in": "body",
1213 "description": "Target max speed",
1214 "required": true,
1215 "schema": {
1216 "type": "number"
1217 }
1218 }],
1219 "responses": {
1220 "204": {
1221 "description": "Max speed set"
1222 }
1223 }
1224 }
1225 },
1226 "/printer/heads/{head_id}/extruders/{extruder_id}/feeder/acceleration": {
1227 "get": {
1228 "tags": ["Printer"],
1229 "description": "Returns acceleration of feeder.",
1230 "parameters": [{
1231 "name": "head_id",
1232 "in": "path",
1233 "description": "ID of head from which the extruder is fetched",
1234 "required": true,
1235 "type": "integer",
1236 "format": "int64"
1237 }, {
1238 "name": "extruder_id",
1239 "in": "path",
1240 "description": "ID of extruder from which the feeder is fetched",
1241 "required": true,
1242 "type": "integer",
1243 "format": "int64"
1244 }],
1245 "responses": {
1246 "200": {
1247 "description": "",
1248 "schema": {
1249 "type": "number"
1250 }
1251 }
1252 }
1253 },
1254 "put": {
1255 "tags": ["Printer"],
1256 "parameters": [{
1257 "name": "head_id",
1258 "in": "path",
1259 "description": "ID of head from which the extruder is fetched",
1260 "required": true,
1261 "type": "integer",
1262 "format": "int64"
1263 }, {
1264 "name": "extruder_id",
1265 "in": "path",
1266 "description": "ID of extruder from which the feeder is fetched",
1267 "required": true,
1268 "type": "integer",
1269 "format": "int64"
1270 }, {
1271 "name": "acceleration",
1272 "in": "body",
1273 "description": "Target acceleration speed",
1274 "required": true,
1275 "schema": {
1276 "type": "number"
1277 }
1278 }],
1279 "responses": {
1280 "204": {
1281 "description": "Acceleration set"
1282 }
1283 }
1284 }
1285 },
1286 "/printer/heads/{head_id}/extruders/{extruder_id}/active_material": {
1287 "get": {
1288 "tags": ["Printer"],
1289 "description": "Get the active material of the extruder",
1290 "parameters": [{
1291 "name": "head_id",
1292 "in": "path",
1293 "description": "ID of head from which the extruder is fetched",
1294 "required": true,
1295 "type": "integer",
1296 "format": "int64"
1297 }, {
1298 "name": "extruder_id",
1299 "in": "path",
1300 "description": "ID of extruder",
1301 "required": true,
1302 "type": "integer",
1303 "format": "int64"
1304 }],
1305 "responses": {
1306 "200": {
1307 "description": "",
1308 "schema": {
1309 "$ref": "#/definitions/Material"
1310 }
1311 }
1312 }
1313 }
1314 },
1315 "/printer/heads/{head_id}/extruders/{extruder_id}/active_material/length_remaining": {
1316 "get": {
1317 "tags": ["Printer"],
1318 "description": "length of material remaining on spool in mm. Or -1 if no value is known.",
1319 "parameters": [{
1320 "name": "head_id",
1321 "in": "path",
1322 "description": "ID of head from which the hotend is fetched",
1323 "required": true,
1324 "type": "integer",
1325 "format": "int64"
1326 }, {
1327 "name": "extruder_id",
1328 "in": "path",
1329 "description": "ID of extruder from which the hotend is fetched",
1330 "required": true,
1331 "type": "integer",
1332 "format": "int64"
1333 }],
1334 "responses": {
1335 "200": {
1336 "description": "length of material remaining on spool in mm. Or -1 if no value is known.",
1337 "schema": {
1338 "type": "number"
1339 }
1340 }
1341 }
1342 }
1343 },
1344 "/printer/heads/{head_id}/extruders/{extruder_id}/hotend": {
1345 "get": {
1346 "tags": ["Printer"],
1347 "description": "Returns hotend of extruder",
1348 "parameters": [{
1349 "name": "head_id",
1350 "in": "path",
1351 "description": "ID of head from which the hotend is fetched",
1352 "required": true,
1353 "type": "integer",
1354 "format": "int64"
1355 }, {
1356 "name": "extruder_id",
1357 "in": "path",
1358 "description": "ID of extruder from which the hotend is fetched",
1359 "required": true,
1360 "type": "integer",
1361 "format": "int64"
1362 }],
1363 "responses": {
1364 "200": {
1365 "description": "",
1366 "schema": {
1367 "$ref": "#/definitions/Hotend"
1368 }
1369 }
1370 }
1371 }
1372 },
1373 "/printer/heads/{head_id}/extruders/{extruder_id}/hotend/temperature": {
1374 "get": {
1375 "tags": ["Printer"],
1376 "description": "Returns temperature of extruder",
1377 "parameters": [{
1378 "name": "head_id",
1379 "in": "path",
1380 "description": "ID of head from which the hotend is fetched",
1381 "required": true,
1382 "type": "integer",
1383 "format": "int64"
1384 }, {
1385 "name": "extruder_id",
1386 "in": "path",
1387 "description": "ID of extruder from which the hotend is fetched",
1388 "required": true,
1389 "type": "integer",
1390 "format": "int64"
1391 }],
1392 "responses": {
1393 "200": {
1394 "description": "Temperature of the hotend",
1395 "schema": {
1396 "$ref": "#/definitions/CurrentTargetNumberPair"
1397 }
1398 }
1399 }
1400 },
1401 "put": {
1402 "tags": ["Printer"],
1403 "parameters": [{
1404 "name": "head_id",
1405 "in": "path",
1406 "description": "ID of head from which the hotend is fetched",
1407 "required": true,
1408 "type": "integer",
1409 "format": "int64"
1410 }, {
1411 "name": "extruder_id",
1412 "in": "path",
1413 "description": "ID of extruder from which the hotend is fetched",
1414 "required": true,
1415 "type": "integer",
1416 "format": "int64"
1417 }, {
1418 "name": "temperature",
1419 "in": "formData",
1420 "description": "Target temperature of nozzle",
1421 "required": true,
1422 "type": "number"
1423 }],
1424 "responses": {
1425 "204": {
1426 "description": "Temperature set"
1427 }
1428 }
1429 }
1430 },
1431 "/printer/heads/{head_id}/extruders/{extruder_id}/active_material/guid": {
1432 "get": {
1433 "tags": ["Printer"],
1434 "description": "Returns the GUID of the active material",
1435 "parameters": [{
1436 "name": "head_id",
1437 "in": "path",
1438 "description": "ID of head from which the hotend is fetched",
1439 "required": true,
1440 "type": "integer",
1441 "format": "int64"
1442 }, {
1443 "name": "extruder_id",
1444 "in": "path",
1445 "description": "ID of extruder from which the hotend is fetched",
1446 "required": true,
1447 "type": "integer",
1448 "format": "int64"
1449 }],
1450 "responses": {
1451 "200": {
1452 "description": "The GUID of the current active material.",
1453 "schema": {
1454 "type": "string"
1455 }
1456 }
1457 }
1458 }
1459 },
1460 "/printer/heads/{head_id}/extruders/{extruder_id}/active_material/GUID": {
1461 "get": {
1462 "tags": ["Printer"],
1463 "deprecated": true,
1464 "description": "Returns the GUID of the active material",
1465 "parameters": [{
1466 "name": "head_id",
1467 "in": "path",
1468 "description": "ID of head from which the hotend is fetched",
1469 "required": true,
1470 "type": "integer",
1471 "format": "int64"
1472 }, {
1473 "name": "extruder_id",
1474 "in": "path",
1475 "description": "ID of extruder from which the hotend is fetched",
1476 "required": true,
1477 "type": "integer",
1478 "format": "int64"
1479 }],
1480 "responses": {
1481 "200": {
1482 "description": "The GUID of the current active material.",
1483 "schema": {
1484 "type": "string"
1485 }
1486 }
1487 }
1488 }
1489 },
1490 "/printer/network": {
1491 "get": {
1492 "tags": ["Network"],
1493 "description": "Returns network state",
1494 "responses": {
1495 "200": {
1496 "description": "Network object",
1497 "schema": {
1498 "$ref": "#/definitions/Network"
1499 }
1500 }
1501 }
1502 }
1503 },
1504 "/printer/network/wifi_networks": {
1505 "get": {
1506 "tags": ["Network"],
1507 "description": "Returns a list of available wifi networks",
1508 "responses": {
1509 "200": {
1510 "description": "List of network ssid'",
1511 "schema": {
1512 "type": "array",
1513 "items": {
1514 "$ref": "#/definitions/Wifi_network"
1515 }
1516 }
1517 }
1518 }
1519 }
1520 },
1521 "/printer/network/wifi_networks/{ssid}": {
1522 "put": {
1523 "tags": ["Network"],
1524 "description": "Connect to a wifi network",
1525 "parameters": [{
1526 "name": "ssid",
1527 "in": "path",
1528 "description": "ssid of the network to connect with.",
1529 "type": "string",
1530 "required": true
1531 }, {
1532 "name": "passphrase",
1533 "in": "formData",
1534 "type": "string",
1535 "description": "Phassphrase of network to connect with",
1536 "required": true
1537 }],
1538 "responses": {
1539 "204": {
1540 "description": ""
1541 }
1542 }
1543 },
1544 "delete": {
1545 "tags": ["Network"],
1546 "description": "Forget a wifi network",
1547 "parameters": [{
1548 "name": "ssid",
1549 "in": "path",
1550 "description": "ssid of the network to forget.",
1551 "type": "string",
1552 "required": true
1553 }],
1554 "responses": {
1555 "204": {
1556 "description": ""
1557 }
1558 }
1559 }
1560 },
1561 "/printer/validate_header": {
1562 "post": {
1563 "tags": [
1564 "Printer"
1565 ],
1566 "parameters": [
1567 {
1568 "name": "file",
1569 "in": "formData",
1570 "description": "File that needs to be printed (.gcode, .gcode.gz)",
1571 "required": true,
1572 "type": "file"
1573 }
1574 ],
1575 "responses": {
1576 "200": {
1577 "description": "All header validation mishaps",
1578 "schema": {
1579 "type": "array",
1580 "items": {
1581 "$ref": "#/definitions/HeaderValidationEntry"
1582 }
1583 }
1584 },
1585 "400": {
1586 "description": "No validation checked because file is missing."
1587 }
1588 }
1589 }
1590 },
1591 "/printer/beep": {
1592 "post": {
1593 "tags": ["Printer"],
1594 "description": "Makes the printer beep",
1595 "parameters": [{
1596 "name": "beep parameters",
1597 "in": "body",
1598 "required": true,
1599 "schema": {
1600 "type": "object",
1601 "properties": {
1602 "frequency": {
1603 "description": "The frequency of the tone in hz.",
1604 "type": "number"
1605 },
1606 "duration": {
1607 "description": "The duration in milliseconds.",
1608 "type": "number"
1609 }
1610 }
1611 }
1612 }],
1613 "responses": {
1614 "204": {
1615 "description": "Printer beeped"
1616 },
1617 "400": {
1618 "description": "Unable to beep due to missing parameters"
1619 }
1620 }
1621 }
1622 },
1623 "/print_job": {
1624 "get": {
1625 "tags": ["PrintJob"],
1626 "responses": {
1627 "200": {
1628 "description": "Print job object",
1629 "schema": {
1630 "$ref": "#/definitions/PrintJob"
1631 }
1632 },
1633 "404": {
1634 "description": "No printer job running"
1635 }
1636 }
1637 },
1638 "post": {
1639 "tags": ["PrintJob"],
1640 "parameters": [{
1641 "name": "jobname",
1642 "in": "formData",
1643 "description": "Name of the print job.",
1644 "required": true,
1645 "type": "string"
1646 }, {
1647 "name": "file",
1648 "in": "formData",
1649 "description": "File that needs to be printed (.gcode, .gcode.gz, .ufp)",
1650 "required": true,
1651 "type": "file"
1652 }],
1653 "responses": {
1654 "201": {
1655 "description": "Print job accepted",
1656 "schema": {
1657 "type": "object",
1658 "properties": {
1659 "message": {
1660 "type": "string"
1661 },
1662 "uuid": {
1663 "$ref": "#/definitions/uuid"
1664 }
1665 }
1666 }
1667 }
1668 }
1669 }
1670 },
1671 "/print_job/name": {
1672 "get": {
1673 "tags": ["PrintJob"],
1674 "description": "Name of print job",
1675 "responses": {
1676 "200": {
1677 "description": "Name of print job",
1678 "schema": {
1679 "type": "string"
1680 }
1681 },
1682 "404": {
1683 "description": "No printer job running"
1684 }
1685 }
1686 }
1687 },
1688 "/print_job/datetime_started": {
1689 "get": {
1690 "tags": ["PrintJob"],
1691 "description": "The moment the current print job was started",
1692 "responses": {
1693 "200": {
1694 "description": "A timestamp in ISO 8601 format or an empty string if not available",
1695 "schema": {
1696 "type": "string",
1697 "format":"date-time"
1698 }
1699 },
1700 "404": {
1701 "description": "No printer job running"
1702 }
1703 }
1704 }
1705 },
1706 "/print_job/datetime_finished": {
1707 "get": {
1708 "tags": ["PrintJob"],
1709 "description": "The moment the last print job finished.",
1710 "responses": {
1711 "200": {
1712 "description": "A timestamp in ISO 8601 format or an empty string if not available",
1713 "schema": {
1714 "type": "string",
1715 "format":"date-time"
1716 }
1717 },
1718 "404": {
1719 "description": "No printer job running"
1720 }
1721 }
1722 }
1723 },
1724 "/print_job/datetime_cleaned": {
1725 "get": {
1726 "tags": ["PrintJob"],
1727 "description": "The moment the last print job was cleaned from the build plate",
1728 "responses": {
1729 "200": {
1730 "description": "A timestamp in ISO 8601 format or an empty string if not available",
1731 "schema": {
1732 "type": "string",
1733 "format":"date-time"
1734 }
1735 },
1736 "404": {
1737 "description": "No printer job running"
1738 }
1739 }
1740 }
1741 },
1742
1743 "/print_job/source": {
1744 "get": {
1745 "tags": ["PrintJob"],
1746 "description": "From what source was the print job started. USB means it's started manually from the USB drive. WEB_API means it's being received by the WEB API. CALIBRATION_MENU means it's printing the XY offset print",
1747 "responses": {
1748 "200": {
1749 "description": "",
1750 "schema": {
1751 "type": "string",
1752 "enum": [
1753 "USB",
1754 "WEP_API",
1755 "CALIBRATION_MENU"
1756 ]
1757 }
1758 },
1759 "404": {
1760 "description": "No printer job running"
1761 }
1762 }
1763 }
1764 },
1765 "/print_job/source_user": {
1766 "get": {
1767 "tags": ["PrintJob"],
1768 "description": "If the origin equals to WEB_API, then this will return the user who initiated the job",
1769 "responses": {
1770 "200": {
1771 "description": "",
1772 "schema": {
1773 "type": "string"
1774 }
1775 },
1776 "404": {
1777 "description": "No printer job running"
1778 }
1779 }
1780 }
1781 },
1782 "/print_job/source_application": {
1783 "get": {
1784 "tags": ["PrintJob"],
1785 "description": "If the origin equals to WEB_API, then this will return the application that sent the job",
1786 "responses": {
1787 "200": {
1788 "description": "",
1789 "schema": {
1790 "type": "string"
1791 }
1792 },
1793 "404": {
1794 "description": "No printer job running"
1795 }
1796 }
1797 }
1798 },
1799 "/print_job/uuid": {
1800 "get": {
1801 "tags": ["PrintJob"],
1802 "responses": {
1803 "200": {
1804 "description": "Unique identifier of this print job. In a UUID4 format.",
1805 "schema": {
1806 "$ref": "#/definitions/uuid"
1807 }
1808 },
1809 "404": {
1810 "description": "No printer job running"
1811 }
1812 }
1813 }
1814 },
1815 "/print_job/reprint_original_uuid": {
1816 "get": {
1817 "tags": ["PrintJob"],
1818 "responses": {
1819 "200": {
1820 "description": "Unique identifier of this print job. In a UUID4 format.",
1821 "schema": {
1822 "$ref": "#/definitions/uuid"
1823 }
1824 },
1825 "404": {
1826 "description": "No printer job running"
1827 }
1828 }
1829 }
1830 },
1831 "/print_job/time_elapsed": {
1832 "get": {
1833 "tags": ["PrintJob"],
1834 "description": "Get the time elapsed (in seconds) since starting this print, including pauses etc.",
1835 "responses": {
1836 "200": {
1837 "description": "",
1838 "schema": {
1839 "type": "integer"
1840 }
1841 },
1842 "404": {
1843 "description": "No printer job running"
1844 }
1845 }
1846 }
1847 },
1848 "/print_job/time_total": {
1849 "get": {
1850 "tags": ["PrintJob"],
1851 "description": "Get the (estimated) total time in seconds for this print, excluding pauses etc.",
1852 "responses": {
1853 "200": {
1854 "description": "",
1855 "schema": {
1856 "type": "integer"
1857 }
1858 },
1859 "404": {
1860 "description": "No printer job running"
1861 }
1862 }
1863 }
1864 },
1865 "/print_job/progress": {
1866 "get": {
1867 "tags": ["PrintJob"],
1868 "description": "Get the (estimated) progress for the current print job, a value between 0 and 1",
1869 "responses": {
1870 "200": {
1871 "description": "",
1872 "schema": {
1873 "type": "number"
1874 }
1875 },
1876 "404": {
1877 "description": "No printer job running"
1878 }
1879 }
1880 }
1881 },
1882 "/print_job/gcode": {
1883 "get": {
1884 "tags": ["PrintJob"],
1885 "responses": {
1886 "200": {
1887 "description": "Get the gcode (possibly gzipped) of the active print job, you need to get this with authentication!",
1888 "schema": {
1889 "type": "file"
1890 }
1891 },
1892 "404": {
1893 "description": "No printer job running or no gcode found"
1894 }
1895 }
1896 }
1897 },
1898 "/print_job/container": {
1899 "get": {
1900 "tags": ["PrintJob"],
1901 "responses": {
1902 "200": {
1903 "description": "Get the file (Gzipped, gcode or UFP) of the active print job, you need to get this with authentication!",
1904 "schema": {
1905 "type": "file"
1906 }
1907 },
1908 "404": {
1909 "description": "No printer job running or no file found"
1910 }
1911 }
1912 }
1913 },
1914 "/print_job/pause_source": {
1915 "get": {
1916 "tags": ["PrintJob"],
1917 "description": "If the printer is paused this exposes what initiated the pause",
1918 "responses": {
1919 "200": {
1920 "description": "",
1921 "schema": {
1922 "type": "string",
1923 "enum": [
1924 "unknown",
1925 "gcode",
1926 "display",
1927 "flowsensor",
1928 "printer",
1929 "api"
1930 ]
1931 }
1932 },
1933 "404": {
1934 "description": "No printer job running"
1935 }
1936 }
1937 }
1938 },
1939 "/print_job/state": {
1940 "get": {
1941 "tags": ["PrintJob"],
1942 "description": "Get the print job state",
1943 "responses": {
1944 "200": {
1945 "description": "",
1946 "schema": {
1947 "type": "string",
1948 "enum": [
1949 "none",
1950 "printing",
1951 "pausing",
1952 "paused",
1953 "resuming",
1954 "pre_print",
1955 "post_print",
1956 "wait_cleanup",
1957 "wait_user_action"
1958 ]
1959 }
1960 },
1961 "404": {
1962 "description": "No printer job running"
1963 }
1964 }
1965 },
1966 "put": {
1967 "tags": ["PrintJob"],
1968 "parameters": [{
1969 "name": "target",
1970 "in": "body",
1971 "description": "\"print\", \"pause\" or \"abort\". Change the current state of the print. Note that only changes to abort / pause are always allowed and changing to print only when state is paused.",
1972 "required": true,
1973 "schema": {
1974 "type": "string",
1975 "enum": [
1976 "print",
1977 "pause",
1978 "abort"
1979 ]
1980 }
1981 }],
1982 "responses": {
1983 "204": {
1984 "description": "State changed"
1985 }
1986 }
1987 }
1988 },
1989 "/print_job/result": {
1990 "get": {
1991 "tags": ["PrintJob"],
1992 "description": "The result of the current print job",
1993 "responses": {
1994 "200": {
1995 "description": "The result of a print job",
1996 "schema": {
1997 "$ref": "#/definitions/printJob_result"
1998 }
1999 },
2000 "404": {
2001 "description": "No printer job running"
2002 }
2003 }
2004 }
2005 },
2006 "/history/print_jobs": {
2007 "get": {
2008 "tags": ["History"],
2009 "parameters": [
2010 {
2011 "name": "offset",
2012 "in": "query",
2013 "description": "Allow an offset parameter to specify the start in the history to get jobs from. Defaults to 0",
2014 "required": false,
2015 "type": "number"
2016 },
2017 {
2018 "name": "count",
2019 "in": "query",
2020 "description": "Allow a count parameter to specify the number of jobs to get from the log. Defaults to 50",
2021 "required": false,
2022 "type": "number"
2023 }
2024 ],
2025 "responses": {
2026 "200": {
2027 "description": "All past PrintJobs on this printer",
2028 "schema": {
2029 "type": "array",
2030 "items": {
2031 "$ref": "#/definitions/PrintJobHistory"
2032 }
2033 }
2034 }
2035 }
2036 }
2037 },
2038 "/history/print_jobs/{uuid}": {
2039 "get": {
2040 "tags": ["History"],
2041 "parameters": [
2042 {
2043 "name": "uuid",
2044 "in": "path",
2045 "description": "UUID of the job to get",
2046 "required": true,
2047 "type": "string"
2048 }
2049 ],
2050 "responses": {
2051 "200": {
2052 "description": "PrintJob with the given UUID",
2053 "schema": {
2054 "$ref": "#/definitions/PrintJobHistory"
2055 }
2056 }
2057 }
2058 }
2059 },
2060 "/history/events": {
2061 "get": {
2062 "tags": ["History"],
2063 "parameters": [
2064 {
2065 "name": "offset",
2066 "in": "query",
2067 "description": "Allow an offset parameter to specify the start in the history to get events from. Defaults to 0",
2068 "required": false,
2069 "type": "number"
2070 },
2071 {
2072 "name": "count",
2073 "in": "query",
2074 "description": "Allow a count parameter to specify the number of events to get from the log. Defaults to 50",
2075 "required": false,
2076 "type": "number"
2077 },
2078 {
2079 "name": "type_id",
2080 "in": "query",
2081 "description": "Allows the user to filter events by type",
2082 "required": false,
2083 "type": "number"
2084 }
2085 ],
2086 "responses": {
2087 "200": {
2088 "description": "All events that happened on this printer",
2089 "schema": {
2090 "type": "array",
2091 "items": {
2092 "$ref": "#/definitions/EventHistoryEntry"
2093 }
2094 }
2095 }
2096 }
2097 },
2098 "post": {
2099 "tags": ["History"],
2100 "parameters": [{
2101 "name": "type_id",
2102 "in": "formData",
2103 "required": true,
2104 "type": "number"
2105 },{
2106 "name": "parameters",
2107 "in": "formData",
2108 "required": true,
2109 "type": "array",
2110 "items": {
2111 "type": "string"
2112 }
2113 }],
2114 "responses": {
2115 "200": {
2116 "description": "Event logged"
2117 },
2118 "400": {
2119 "description": "Bad request, some input value was not excepted."
2120 }
2121 }
2122 }
2123 },
2124 "/system": {
2125 "get": {
2126 "tags": ["System"],
2127 "description": "Get the entire system object",
2128 "responses": {
2129 "200": {
2130 "description": "",
2131 "schema": {
2132 "$ref": "#/definitions/System"
2133 }
2134 }
2135 }
2136 }
2137 },
2138 "/system/platform": {
2139 "get": {
2140 "tags": ["System"],
2141 "description": "A string identifying the underlying platform in human readable form.",
2142 "responses": {
2143 "200": {
2144 "description": "Platform",
2145 "schema": {
2146 "type": "string"
2147 }
2148 }
2149 }
2150 }
2151 },
2152 "/system/hostname": {
2153 "get": {
2154 "tags": ["System"],
2155 "description": "The hostname of this machine",
2156 "responses": {
2157 "200": {
2158 "description": "Hostname",
2159 "schema": {
2160 "type": "string"
2161 }
2162 }
2163 }
2164 }
2165 },
2166 "/system/firmware": {
2167 "get": {
2168 "tags": ["System"],
2169 "description": "The version of the firmware currently running",
2170 "responses": {
2171 "200": {
2172 "description": "Firmware version",
2173 "schema": {
2174 "type": "string"
2175 }
2176 }
2177 }
2178 },
2179 "put": {
2180 "tags": ["System"],
2181 "description": "Trigger a firmware update. Printer will try to fetch & install the latest version.",
2182 "parameters": [{
2183 "name": "update_type",
2184 "in": "body",
2185 "description": "Type of the firmware update to do. Can be 'testing' or 'stable'",
2186 "required": false,
2187 "schema": {
2188 "type": "string"
2189 }
2190 }],
2191 "responses": {
2192 "200": {
2193 "description": "Update started"
2194 }
2195 }
2196 }
2197 },
2198 "/system/firmware/status": {
2199 "get": {
2200 "tags": ["System"],
2201 "description": "Get the status of the firmware update",
2202 "responses": {
2203 "200": {
2204 "description": "Status of the firmware update",
2205 "schema": {
2206 "type": "string"
2207 }
2208 }
2209 }
2210 }
2211 },
2212 "/system/firmware/stable": {
2213 "get": {
2214 "tags": ["System"],
2215 "description": "Get the version available for updating in the 'stable' release path",
2216 "responses": {
2217 "200": {
2218 "description": "Possible future firmware version",
2219 "schema": {
2220 "type": "string"
2221 }
2222 }
2223 }
2224 }
2225 },
2226 "/system/firmware/testing": {
2227 "get": {
2228 "tags": ["System"],
2229 "description": "Get the version available for updating in the 'testing' release path",
2230 "responses": {
2231 "200": {
2232 "description": "Possible future firmware version",
2233 "schema": {
2234 "type": "string"
2235 }
2236 }
2237 }
2238 }
2239 },
2240 "/system/memory": {
2241 "get": {
2242 "tags": ["System"],
2243 "description": "The current memory usage",
2244 "responses": {
2245 "200": {
2246 "description": "Memory usage",
2247 "schema": {
2248 "$ref": "#/definitions/system_memory"
2249 }
2250 }
2251 }
2252 }
2253 },
2254 "/system/time": {
2255 "get": {
2256 "tags": ["System"],
2257 "description": "The current UTC time",
2258 "responses": {
2259 "200": {
2260 "description": "Time",
2261 "schema": {
2262 "$ref": "#/definitions/system_time"
2263 }
2264 }
2265 }
2266 }
2267 },
2268 "/system/log": {
2269 "get": {
2270 "tags": ["System"],
2271 "description": "Get the logs of the system",
2272 "parameters": [{
2273 "name": "boot",
2274 "in": "query",
2275 "description": "Allow a boot parameter to get logs from previous boot sessions, default is 0 which is the current boot. -1 is the previous boot.",
2276 "required": false,
2277 "type": "number"
2278 }, {
2279 "name": "lines",
2280 "in": "query",
2281 "description": "Allow a lines parameter to specify the number of lines to get from the log. Defaults to 50",
2282 "required": false,
2283 "type": "number"
2284 }],
2285 "responses": {
2286 "200": {
2287 "description": "Log data",
2288 "schema": {
2289 "$ref": "#/definitions/SystemLog"
2290 }
2291 }
2292 }
2293 }
2294 },
2295 "/system/name": {
2296 "get": {
2297 "tags": ["System"],
2298 "description": "Get the name of the system",
2299 "responses": {
2300 "200": {
2301 "description": "name",
2302 "schema": {
2303 "type": "string"
2304 }
2305 }
2306 }
2307 },
2308 "put": {
2309 "tags": ["System"],
2310 "parameters": [{
2311 "name": "name",
2312 "in": "body",
2313 "description": "Target name of machine",
2314 "required": true,
2315 "schema": {
2316 "type": "string"
2317 }
2318 }],
2319 "responses": {
2320 "204": {
2321 "description": "Name set"
2322 },
2323 "400": {
2324 "description": "Name is not set, because an invalid name is specified"
2325 }
2326 }
2327 }
2328 },
2329 "/system/country": {
2330 "get": {
2331 "tags": ["System"],
2332 "description": "Get the country of the system",
2333 "responses": {
2334 "200": {
2335 "description": "country",
2336 "schema": {
2337 "type": "string"
2338 }
2339 }
2340 }
2341 },
2342 "put": {
2343 "tags": ["System"],
2344 "parameters": [{
2345 "name": "country",
2346 "in": "body",
2347 "description": "Target country of system",
2348 "required": true,
2349 "schema": {
2350 "type": "string"
2351 }
2352 }],
2353 "responses": {
2354 "204": {
2355 "description": "Country set"
2356 }
2357 }
2358 }
2359 },
2360 "/system/language": {
2361 "get": {
2362 "tags": ["System"],
2363 "description": "Get the language of the system",
2364 "responses": {
2365 "200": {
2366 "description": "Language",
2367 "schema": {
2368 "type": "string"
2369 }
2370 }
2371 }
2372 }
2373 },
2374 "/system/uptime": {
2375 "get": {
2376 "tags": ["System"],
2377 "description": "Get the uptime of the system in seconds",
2378 "responses": {
2379 "200": {
2380 "description": "Uptime",
2381 "schema": {
2382 "type": "integer"
2383 }
2384 }
2385 }
2386 }
2387 },
2388 "/system/type": {
2389 "get": {
2390 "tags": ["System"],
2391 "description": "Get the type of machine that we are talking with. Always returns \"3D printer\"",
2392 "responses": {
2393 "200": {
2394 "description": "Type of machine",
2395 "schema": {
2396 "type": "string"
2397 }
2398 }
2399 }
2400 }
2401 },
2402 "/system/variant": {
2403 "get": {
2404 "tags": ["System"],
2405 "description": "Gets the machines variant. Currently this can return \"Ultimaker 3\", \"Ultimaker 3 extended\" or \"Ultimaker S5\".",
2406 "responses": {
2407 "200": {
2408 "description": "Machine variant",
2409 "schema": {
2410 "type": "string"
2411 }
2412 }
2413 }
2414 }
2415 },
2416 "/system/hardware": {
2417 "get": {
2418 "tags": ["System"],
2419 "description": "Gets the hardware number and revision identifiers",
2420 "responses": {
2421 "200": {
2422 "description": "Machine hardware type and revision ID",
2423 "schema": {
2424 "$ref": "#/definitions/system_hardware"
2425 }
2426 }
2427 }
2428 }
2429 },
2430 "/system/hardware/typeid": {
2431 "get": {
2432 "tags": ["System"],
2433 "description": "Gets the machine type as number identifier. This identifier IDs a specific form of hardware",
2434 "responses": {
2435 "200": {
2436 "description": "Machine hardware type ID",
2437 "schema": {
2438 "type": "integer"
2439 }
2440 }
2441 }
2442 }
2443 },
2444 "/system/hardware/revision": {
2445 "get": {
2446 "tags": ["System"],
2447 "description": "The same machine could have different hardware revisions. When hardware is updated and software needs to know that hardware has changed, this revision number is changed. Currently only revision 0 is known.",
2448 "responses": {
2449 "200": {
2450 "description": "Machine hardware revision",
2451 "schema": {
2452 "type": "integer"
2453 }
2454 }
2455 }
2456 }
2457 },
2458 "/system/guid": {
2459 "get": {
2460 "tags": ["System"],
2461 "description": "Every machine has a unique identifier stored inside the board. This allows for unique identification of this machine. This identifier is a UUID4.",
2462 "responses": {
2463 "200": {
2464 "description": "Machine guid",
2465 "schema": {
2466 "type": "string"
2467 }
2468 }
2469 }
2470 }
2471 },
2472 "/system/display_message": {
2473 "put": {
2474 "tags": ["System"],
2475 "description": "Enable external services to display a message screen on the printer.",
2476 "parameters": [
2477 {
2478 "name": "message_data",
2479 "in": "body",
2480 "description": "Data to display on the screen of the printer.",
2481 "required": true,
2482 "schema": {
2483 "type": "object",
2484 "required": [ "message" ],
2485 "properties": {
2486 "message": {
2487 "type": "string"
2488 },
2489 "button_caption": {
2490 "type": "string"
2491 }
2492 }
2493 }
2494 }
2495 ],
2496 "responses": {
2497 "200": {
2498 "description": "Message is being displayed on the printer."
2499 },
2500 "400": {
2501 "description": "No message specified."
2502 },
2503 "405": {
2504 "description": "Message cannot be displayed because the printer is busy."
2505 }
2506 }
2507 }
2508 }
2509 },
2510 "definitions": {
2511 "AirManager": {
2512 "type": "object",
2513 "properties": {
2514 "firmware_version": {
2515 "type": "string",
2516 "description": "Version of the installed firmware"
2517 },
2518 "filter_age": {
2519 "type": "number",
2520 "description": "Filter hours used"
2521 },
2522 "filter_max_age": {
2523 "type": "number",
2524 "description": "Lifespan of the filter in hours"
2525 },
2526 "filter_status": {
2527 "type": "string",
2528 "description" : "Indicate the status of the Air Manager filter",
2529 "enum" : [
2530 "unknown",
2531 "peak_performance",
2532 "replacement_near",
2533 "replacement_required",
2534 "missing"
2535 ]
2536 },
2537 "status": {
2538 "type": "string",
2539 "description": "Indicate the status of the Air Manager device",
2540 "enum": [
2541 "error",
2542 "unavailable",
2543 "available",
2544 "installing_firmware"
2545 ]
2546 },
2547 "fan_speed": {
2548 "type": "number",
2549 "description": "Speed of the fan in revolutions per minute"
2550 }
2551 }
2552 },
2553 "Camera": {
2554 "type": "object",
2555 "required": ["feed"],
2556 "properties": {
2557 "feed": {
2558 "type": "string"
2559 }
2560 }
2561 },
2562 "Printer_status": {
2563 "type": "string",
2564 "enum": [
2565 "booting",
2566 "idle",
2567 "printing",
2568 "error",
2569 "maintenance"
2570 ]
2571 },
2572 "Printer": {
2573 "type": "object",
2574 "required": [
2575 "heads"
2576 ],
2577 "properties": {
2578 "heads": {
2579 "type": "array",
2580 "items": {
2581 "$ref": "#/definitions/Head"
2582 }
2583 },
2584 "camera": {
2585 "$ref": "#/definitions/Camera"
2586 },
2587 "bed": {
2588 "$ref": "#/definitions/Bed"
2589 },
2590 "network": {
2591 "$ref": "#/definitions/Network"
2592 },
2593 "led": {
2594 "$ref": "#/definitions/led"
2595 },
2596 "status": {
2597 "$ref": "#/definitions/Printer_status"
2598 },
2599 "airmanager": {
2600 "$ref": "#/definitions/AirManager"
2601 }
2602 }
2603 },
2604 "Material": {
2605 "type": "object",
2606 "properties": {
2607 "length_remaining": {
2608 "description": "mm of filament remaining on spool. Returns -1 if the remaining length is unknown.",
2609 "type": "number"
2610 },
2611 "GUID": {
2612 "description": "Unique identifier of the material, empty string if no material loaded.",
2613 "type": "string"
2614 }
2615 }
2616 },
2617 "Network": {
2618 "type": "object",
2619 "properties": {
2620 "wifi": {
2621 "type": "object",
2622 "properties": {
2623 "connected": {
2624 "type": "boolean",
2625 "description": "A bool indicating if the interface is connected."
2626 },
2627 "enabled": {
2628 "type": "boolean",
2629 "description": "A bool indicating if the interface is enabled."
2630 },
2631 "mode": {
2632 "type": "string",
2633 "description": "Wifi mode",
2634 "enum": [
2635 "AUTO",
2636 "HOTSPOT",
2637 "WIFI SETUP",
2638 "CABLE",
2639 "WIRELESS",
2640 "OFFLINE"
2641 ]
2642 },
2643 "ssid": {
2644 "type": "string",
2645 "description": "If connected, the SSID of the hotspot this machine is connected to."
2646 }
2647 }
2648 },
2649 "wifi_networks": {
2650 "type": "array",
2651 "items": {
2652 "$ref": "#/definitions/Wifi_network"
2653 }
2654 },
2655 "ethernet": {
2656 "type": "object",
2657 "properties" : {
2658 "connected": {
2659 "type": "boolean",
2660 "description": "A bool indicating if the interface is connected."
2661 },
2662 "enabled": {
2663 "type": "boolean",
2664 "description": "A bool indicating if the interface is enabled."
2665 }
2666 }
2667 }
2668 }
2669 },
2670 "Extruder": {
2671 "type": "object",
2672 "description": "Extruder drive train. Includes the feeder & nozzle. Note that its id can never be lower than 0 and should be seen as an index.",
2673 "properties": {
2674 "hotend": {
2675 "$ref": "#/definitions/Hotend"
2676 },
2677 "feeder": {
2678 "$ref": "#/definitions/Feeder"
2679 },
2680 "active_material": {
2681 "$ref": "#/definitions/Material"
2682 }
2683 }
2684 },
2685 "Head": {
2686 "type": "object",
2687 "description": "Head of a printer. May contain multiple extruders. Heads can be uniquely identified by ID. The id is an integer starting at 0.",
2688 "properties": {
2689 "position": {
2690 "$ref": "#/definitions/XYZ"
2691 },
2692 "max_speed": {
2693 "$ref": "#/definitions/XYZ"
2694 },
2695 "acceleration": {
2696 "description": "The default acceleration for the X, Y and Z axis",
2697 "type": "number"
2698 },
2699 "jerk": {
2700 "$ref": "#/definitions/XYZ"
2701 },
2702 "extruders": {
2703 "type": "array",
2704 "items": {
2705 "$ref": "#/definitions/Extruder"
2706 }
2707 },
2708 "fan": {
2709 "description": "The speed of the fan in percentage",
2710 "type": "number"
2711 }
2712 }
2713 },
2714 "Wifi_network": {
2715 "type": "object",
2716 "properties": {
2717 "ssid": {
2718 "type": "string"
2719 },
2720 "security_required": {
2721 "type": "boolean"
2722 },
2723 "strength": {
2724 "type": "integer"
2725 }
2726 }
2727 },
2728 "Hotend": {
2729 "type": "object",
2730 "description": "A single hotend",
2731 "required": [
2732 "id"
2733 ],
2734 "properties": {
2735 "id": {
2736 "type": "string"
2737 },
2738 "serial": {
2739 "description": "A hexadecimal representation of the serial number",
2740 "type": "string"
2741 },
2742 "temperature": {
2743 "$ref": "#/definitions/CurrentTargetNumberPair"
2744 },
2745 "offset": {
2746 "$ref": "#/definitions/HotendOffset"
2747 },
2748 "statistics": {
2749 "$ref": "#/definitions/HotendStatistics"
2750 }
2751 }
2752 },
2753 "led_hue" : {
2754 "description": "A LED hue value that ranges from 0-360",
2755 "type" : "number"
2756 },
2757 "led_saturation" : {
2758 "description": "A LED saturation value that ranges from 0-100",
2759 "type" : "number"
2760 },
2761 "led_brightness" : {
2762 "description": "A LED brightness value that ranges from 0-100",
2763 "type" : "number"
2764 },
2765 "led": {
2766 "type": "object",
2767 "description": "A single (or set) of light source(s)",
2768 "properties": {
2769 "hue": {
2770 "$ref": "#/definitions/led_hue"
2771 },
2772 "saturation": {
2773 "$ref": "#/definitions/led_saturation"
2774 },
2775 "brightness": {
2776 "$ref": "#/definitions/led_brightness"
2777 }
2778 }
2779 },
2780 "Blink": {
2781 "type": "object",
2782 "description": "A description of a LED blink pattern",
2783 "properties": {
2784 "frequency": {
2785 "description": "Determine how fast the blink will happen (in Hz); defaults to 1Hz;",
2786 "type": "number",
2787 "minimum": 0.1
2788 },
2789 "count": {
2790 "description": "The number of times the blinking should be repeated; defaults to once.",
2791 "type": "number",
2792 "minimum": 1
2793 }
2794 }
2795 },
2796 "Bed": {
2797 "type": "object",
2798 "description": "(heated) bed of the printer",
2799 "properties": {
2800 "temperature": {
2801 "$ref": "#/definitions/CurrentTargetNumberPair"
2802 }
2803 }
2804 },
2805 "CurrentTargetNumberPair": {
2806 "type": "object",
2807 "description": "Object with two numbers; Current (numeric) value of a setting and the target (numeric) value of a setting",
2808 "properties": {
2809 "target": {
2810 "type": "number"
2811 },
2812 "current": {
2813 "type": "number"
2814 }
2815 }
2816 },
2817 "Feeder": {
2818 "type": "object",
2819 "description": "The feeder unit",
2820 "properties": {
2821 "position": {
2822 "description": "The position of the feeder. This is otherwise known as the E value",
2823 "type": "number"
2824 },
2825 "max_speed": {
2826 "type": "number",
2827 "description": "Max speed of the feeder in mm/s"
2828 },
2829 "jerk": {
2830 "type": "number",
2831 "description": "Acceleration of the acceleration (in mm/s^3)"
2832 },
2833 "acceleration": {
2834 "type": "number",
2835 "description": "Acceleration of the feeder (in mm/s^2)"
2836 }
2837 }
2838 },
2839 "HotendOffset": {
2840 "type": "object",
2841 "description": "X,Y and Z offset of this hotend nozzle exit compared to the other hotends in this head. The state indicates if the data for this hotend is valid and thus can be used.",
2842 "properties": {
2843 "x": {
2844 "type": "number",
2845 "default": 0
2846 },
2847 "y": {
2848 "type": "number",
2849 "default": 0
2850 },
2851 "z": {
2852 "type": "number",
2853 "default": 0
2854 },
2855 "state": {
2856 "type": "string",
2857 "enum": [
2858 "valid",
2859 "invalid"
2860 ]
2861 }
2862 }
2863 },
2864 "HotendStatistics": {
2865 "type": "object",
2866 "description": "Keeping track of both changing statistics of the PrintCore.",
2867 "properties": {
2868 "last_material_guid": {
2869 "$ref": "#/definitions/uuid"
2870 },
2871 "material_extruded": {
2872 "description": "Approximate accumulated amount of material extruded during printing in millimeters.",
2873 "type": "integer"
2874 },
2875 "max_temperature_exposed": {
2876 "description": "Maximum temperature exposed in degrees Celsius",
2877 "type": "integer"
2878 },
2879 "time_spent_hot": {
2880 "description": "Approximate time spent above 65 degrees Celsius in seconds.",
2881 "type": "integer"
2882 }
2883 }
2884 },
2885 "XYZ": {
2886 "type": "object",
2887 "description": "Container for xyz",
2888 "properties": {
2889 "x": {
2890 "type": "number",
2891 "default": 0
2892 },
2893 "y": {
2894 "type": "number",
2895 "default": 0
2896 },
2897 "z": {
2898 "type": "number",
2899 "default": 0
2900 }
2901 }
2902 },
2903 "printJob_result": {
2904 "type": "string",
2905 "enum": [
2906 "Failed",
2907 "Aborted",
2908 "Finished"
2909 ]
2910 },
2911 "PrintJob": {
2912 "type": "object",
2913 "description": "An active print job.",
2914 "properties": {
2915 "time_elapsed": {
2916 "type": "integer"
2917 },
2918 "time_total": {
2919 "type": "integer"
2920 },
2921 "datetime_started": {
2922 "description": "Moment this print job started in ISO 8601 format",
2923 "type":"string",
2924 "format":"date-time"
2925 },
2926 "datetime_finished": {
2927 "description": "Moment this print job finished in ISO 8601 format or empty string if not finished yet",
2928 "type":"string",
2929 "format":"date-time"
2930 },
2931 "datetime_cleaned": {
2932 "description": "Moment this print job was cleaned in ISO 8601 format or empty string if build plate not cleaned yet",
2933 "type":"string",
2934 "format":"date-time"
2935 },
2936 "source": {
2937 "type": "string"
2938 },
2939 "source_user": {
2940 "type": "string"
2941 },
2942 "source_application": {
2943 "type": "string"
2944 },
2945 "name": {
2946 "type": "string"
2947 },
2948 "uuid": {
2949 "$ref": "#/definitions/uuid"
2950 },
2951 "reprint_original_uuid": {
2952 "$ref": "#/definitions/uuid"
2953 },
2954 "progress": {
2955 "type": "number",
2956 "description": "Estimated progress for the current print job, a value between 0 and 1"
2957 },
2958 "state": {
2959 "type": "string",
2960 "enum": [
2961 "none",
2962 "printing",
2963 "pausing",
2964 "paused",
2965 "resuming",
2966 "pre_print",
2967 "post_print",
2968 "wait_cleanup",
2969 "wait_user_action"
2970 ]
2971 },
2972 "result": {
2973 "$ref": "#/definitions/printJob_result"
2974 }
2975 }
2976 },
2977 "HeaderValidationEntry" : {
2978 "type": "object",
2979 "description": "A validation result of the header check.",
2980 "properties": {
2981 "fault_code": {
2982 "type": "string",
2983 "enum": [
2984 "HEADER_NOT_PRESENT",
2985 "HEADER_MISSING_ITEM",
2986 "MACHINE_TOO_SMALL_FOR_GCODE",
2987 "CHANGE_BUILDPLATE",
2988 "NOZZLE_AMOUNT_MISMATCH",
2989 "NOZZLE_MISMATCH",
2990 "MATERIAL_NOT_LOADED",
2991 "GUID_MISMATCH"
2992 ]
2993 },
2994 "fault_level": {
2995 "type": "string",
2996 "enum": [
2997 "WARNING",
2998 "ERROR"
2999 ]
3000 },
3001 "message": {
3002 "type": "string"
3003 },
3004 "data": {
3005 "description": "This is a string encoded dictionary holding Key/Value pairs or an empty string",
3006 "type": "string"
3007 }
3008 }
3009 },
3010 "PrintJobHistory": {
3011 "type": "object",
3012 "description": "A print job in the past.",
3013 "properties": {
3014 "time_elapsed": {
3015 "type": "integer"
3016 },
3017 "time_estimated": {
3018 "type": "integer"
3019 },
3020 "time_total": {
3021 "type": "integer"
3022 },
3023 "datetime_started": {
3024 "type":"string",
3025 "format":"date-time"
3026 },
3027 "datetime_finished": {
3028 "type":"string",
3029 "format":"date-time"
3030 },
3031 "datetime_cleaned": {
3032 "type":"string",
3033 "format":"date-time"
3034 },
3035 "result": {
3036 "type": "string",
3037 "enum": ["Finished", "Aborted"]
3038 },
3039 "source": {
3040 "type": "string"
3041 },
3042 "reprint_original_uuid": {
3043 "$ref": "#/definitions/uuid"
3044 },
3045 "name": {
3046 "type": "string"
3047 },
3048 "uuid": {
3049 "$ref": "#/definitions/uuid"
3050 }
3051 }
3052 },
3053 "EventHistoryEntry": {
3054 "type": "object",
3055 "description": "An event that happened on the printer.",
3056 "properties": {
3057 "time": {
3058 "type":"string",
3059 "format":"date-time"
3060 },
3061 "type_id": {
3062 "type": "number"
3063 },
3064 "message": {
3065 "type": "string"
3066 },
3067 "parameters": {
3068 "type": "array",
3069 "items": {
3070 "type": "string"
3071 }
3072 }
3073 }
3074 },
3075 "uuid": {
3076 "description": "UUID in UUID4 format.",
3077 "type": "string"
3078 },
3079 "system_memory": {
3080 "description": "System memory",
3081 "type": "object",
3082 "properties": {
3083 "total": {
3084 "description": "in bytes",
3085 "type": "integer"
3086 },
3087 "used": {
3088 "description": "in bytes",
3089 "type": "integer"
3090 }
3091 }
3092 },
3093 "system_hardware": {
3094 "type": "object",
3095 "description": "Hardware versions",
3096 "properties": {
3097 "typeid": {
3098 "type": "integer"
3099 },
3100 "revision": {
3101 "type": "integer"
3102 }
3103 }
3104 },
3105 "system_time": {
3106 "type": "object",
3107 "properties": {
3108 "utc": {
3109 "type": "number",
3110 "description": "Number of seconds since the Unix Epoch"
3111 }
3112 }
3113 },
3114 "System": {
3115 "type": "object",
3116 "description": "Meta data on the system.",
3117 "properties": {
3118 "name": {
3119 "type": "string"
3120 },
3121 "platform": {
3122 "type": "string"
3123 },
3124 "hostname": {
3125 "type": "string"
3126 },
3127 "firmware": {
3128 "type": "string"
3129 },
3130 "country": {
3131 "type": "string"
3132 },
3133 "language": {
3134 "type": "string"
3135 },
3136 "uptime": {
3137 "type": "integer"
3138 },
3139 "time": {
3140 "$ref": "#/definitions/system_time"
3141 },
3142 "type": {
3143 "type": "string"
3144 },
3145 "variant": {
3146 "type": "string"
3147 },
3148 "memory": {
3149 "$ref": "#/definitions/system_memory"
3150 },
3151 "hardware": {
3152 "$ref": "#/definitions/system_hardware"
3153 },
3154 "log": {
3155 "type": "string"
3156 },
3157 "guid": {
3158 "type": "string"
3159 }
3160 }
3161 },
3162 "SystemLog": {
3163 "type": "array",
3164 "items": {
3165 "type": "string"
3166 }
3167 },
3168 "Bed_PreHeat": {
3169 "type": "object",
3170 "properties": {
3171 "temperature": {
3172 "description": "Target temperature of bed in degrees Celsius. Set to 0 to stop pre-heating",
3173 "type": "number",
3174 "minimum": 0
3175 },
3176 "timeout": {
3177 "description": "Timeout for preheating in seconds",
3178 "type": "number"
3179 }
3180 }
3181 }
3182 }
3183}