Documentation ¶
Overview ¶
Command snuggied is an HTTP server that exposes a REST API for 'slicing' 3D models, converting them into G-code machine instructions for 3D printers.
snuggied -http=:8888
Clients (host software or the snuggier tool) POST 3D mesh files to snuggied and, after slicing is complete, snuggied exposes the resulting G-code for the client to retreive as a GET. Clients periodically poll the server during slicing for status updates. Clients may cancel an in-progress slicing job at any point by issuing a DELETE request.
The snuggied HTTP API is documented here. For configuration information call snuggied with the -h flag.
snuggied -h
Create a job ¶
The job begins with the client supplying a 3D mesh file for the server to slice.
POST /slicer/jobs Content-Type: muiltpart/form-data meshfile 3D mesh file (stl or amf) slicer backend slicer program (only "slic3r" supported currently) preset name of a preset backend configuration 201 Created Content-Type: application/json slicerjob.Job
List jobs ¶
The client may use this if interested in the status of multiple jobs.
GET /slicer/jobs 200 OK Content-Type: application/json slicerjob.Page of []slicerjob.Job
Get a job's status ¶
Until the backend slicer has completed the client polls the job's status for progress.
GET /slicer/jobs/{id} 200 OK Content-Type: application/json slicerjob.Job
Cancel a job ¶
Cancelling a job removes it from internal queues and terminates the backend slicing procedure if it has already begun.
DELETE /slicer/jobs/{id} 200 OK
Retrieve final g-code ¶
After a job completes it's g-code output is available using the job id as a key.
GET /slicer/gcodes/{id} 200 OK Content-Type: application/octet-stream
Retrieve an original mesh file ¶
The mesh file originally given to a job. not in the critical path of printing.
GET /slicer/meshes/{id} 200 OK Content-Type: application/octet-stream
The contents of the original 3D mesh file are returned. The content-type may be more specific when the file has a known media type.
List backend presets ¶
Clients may provide a level of dynamic discovery by detecting presets for the slicer.
GET /slicer/presets/{slicer} 200 OK Content-Type: application/json slicerjob.SlicerPresets