Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
63e006371This file is pinned to the selected release. Download the original to open it in your design tool.
openapi: 3.0.1
info:
title: Connect
description:
This is a printer connect webservice. It is compatible with another 3D printer services, so many applications
which use thi serice
contact:
email: developer@prusa3d.cz
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
externalDocs:
description: Find out more about API
url: http://connect.prusa3d.cz
tags:
- name: login
description: Everything about loging process
- name: printer
description: Access to printer
paths:
/api/login:
post:
tags:
- login
summary: Creates a login session.
requestBody:
content:
application/json:
schema:
type: object
properties:
passive:
type: boolean
user:
type: string
pass:
type: string
remember:
type: boolean
responses:
200:
description: OK
401:
description: Unauthorized
403:
description: Forbidden
/api/logout:
post:
tags:
- login
summary: Ends the current login session
responses:
204:
description: No Content
/api/printer:
get:
tags:
- printer
summary: Retrive the current printer state
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
temperature:
$ref: '#/components/schemas/TemperatureState'
sd:
$ref: '#/components/schemas/SDState'
state:
$ref: '#/components/schemas/PrinterState'
/api/job:
get:
tags:
- printer
summary: Retrieve information about the current job (if there is one).
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
job:
$ref: '#/components/schemas/Job'
progress:
$ref: '#/components/schemas/Progress'
state:
enum: ["Operational", "Printing", "Pausing", "Paused", "Cancelling", "Error", "Offline"]
components:
schemas:
timestamp:
type: number
description: Unix Timestamep
TemperatureData:
type: object
properties:
actual:
type: number
description: Current temperature
example: 22.5
target:
type: number
description: Target temperature
example: 50
offset:
type: number
nullable: true
description: Currenntly configured temperature offset to apply.
HistoricTemperatureDataPoint:
type: object
properties:
time:
$ref: "#/components/schemas/timestamp"
tool0:
$ref: "#/components/schemas/TemperatureData"
bed:
$ref: "#/components/schemas/TemperatureData"
TemperatureState:
type: object
properties:
tool0:
$ref: "#/components/schemas/TemperatureData"
bed:
$ref: "#/components/schemas/TemperatureData"
history:
type: array
items:
$ref: "#/components/schemas/HistoricTemperatureDataPoint"
SDState:
type: object
properties:
ready:
type: boolean
PrinterState:
type: object
properties:
text:
type: string
flags:
type: object
properties:
operational:
type: boolean
paused:
type: boolean
printing:
type: boolean
cancelling:
type: boolean
pausing:
type: boolean
sdReady:
type: boolean
error:
type: boolean
ready:
type: boolean
closedOrError:
type: boolean
Job:
type: object
properties:
file:
type: string
example: Eiffel_Tower_0.2mm_PETG_MK3S_2h31m.gcode
estimatedPrintTime:
type: number
description: Estimated print time for the file in seconds.
lastPrintTime:
type: number
description: Last print time for the file in seconds.
filament:
type: object
properties:
length:
type: number
description: Length of filament used in mm.
volume:
type: number
description: Volume in filament used in cm3.
Progress:
type: object
properties:
completion:
type: number
description: Percentage of completion of the current job.
filepos:
type: number
printTime:
type: number
description: Time already spent printing in seconds.
printTimeLeft:
type: number
description: Estimate of time left to print in seconds.
securitySchemes:
api_key:
type: apiKey
name: api_key
in: header
cookie:
type: apiKey
in: cookie
name: session_P5000