Update printer.rst

This commit is contained in:
bortek 2014-12-30 12:18:39 +01:00
parent 87ddcac2fc
commit 2b7885c3f8

View file

@ -331,7 +331,7 @@ Retrieve the current SD state
GET /api/printer/sd HTTP/1.1
Host: example.com
**Example Response**
**ponse**
.. sourcecode:: http
@ -345,6 +345,33 @@ Retrieve the current SD state
:statuscode 200: No error
:statuscode 404: If SD support has been disabled in OctoPrint's config.
.. _sec-api-printer-arbcommand:
Send an arbitrary command to the printer
=============================
.. http:post:: /api/printer/command
Sends any command to the printer via serial inerface. Should be used with some care as some commands can stop a running print job.
If successful returns a :http:statuscode:`204` and an empty body.
**Example Request**
.. sourcecode:: http
POST /api/printer/command HTTP/1.1
Host: example.com
Content-Type: application/json
X-Api-Key: abcdef...
{
"command": "M27"
}
:json string command: The command to issue.
:statuscode 204: No error
.. _sec-api-printer-datamodel:
Datamodel
@ -366,4 +393,4 @@ SD State Response
* - ``ready``
- 1
- Boolean
- Whether the SD card has been initialized (``true``) or not (``false``).
- Whether the SD card has been initialized (``true``) or not (``false``).