aboutsummaryrefslogtreecommitdiffstats
path: root/docs/API_Server.md
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-07-27 13:29:36 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-07-27 13:29:36 -0400
commit37efd1b8f19eadafb45d1d52148d5e21e3fef204 (patch)
treebc3c3851a2e317168bac20bc5d3e6df0ff24694d /docs/API_Server.md
parentafca515e2c2db240b4d354a0ae665479894ef89b (diff)
downloadkutter-37efd1b8f19eadafb45d1d52148d5e21e3fef204.tar.gz
kutter-37efd1b8f19eadafb45d1d52148d5e21e3fef204.tar.xz
kutter-37efd1b8f19eadafb45d1d52148d5e21e3fef204.zip
docs: Use hash marks for header lines
Consistently use leading hash marks (#) to note section headers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs/API_Server.md')
-rw-r--r--docs/API_Server.md15
1 files changed, 5 insertions, 10 deletions
diff --git a/docs/API_Server.md b/docs/API_Server.md
index 1ccb6d91..b8419a8d 100644
--- a/docs/API_Server.md
+++ b/docs/API_Server.md
@@ -4,8 +4,7 @@ This document describes Klipper's Application Programmer Interface
(API). This interface enables external applications to query and
control the Klipper host software.
-Enabling the API socket
------------------------
+## Enabling the API socket
In order to use the API server, the klippy.py host software must be
started with the `-a` parameter. For example:
@@ -17,8 +16,7 @@ This causes the host software to create a Unix Domain Socket. A client
can then open a connection on that socket and send commands to
Klipper.
-Request format
---------------
+## Request format
Messages sent and received on the socket are JSON encoded strings
terminated by an ASCII 0x03 character:
@@ -38,8 +36,7 @@ be on a single line, and it will automatically append the 0x03
terminator when transmitting a request. (The Klipper API server does
not have a newline requirement.)
-API Protocol
-------------
+## API Protocol
The command protocol used on the communication socket is inspired by
[json-rpc](https://www.jsonrpc.org/).
@@ -92,8 +89,7 @@ which could cause the associated response to be sent out of order with
respect to responses from other requests. A JSON request will never
pause the processing of future JSON requests.
-Subscriptions
--------------
+## Subscriptions
Some Klipper "endpoint" requests allow one to "subscribe" to future
asynchronous update messages.
@@ -120,8 +116,7 @@ with "endpoint" specific contents to the response template and then
send that template. If a "response_template" field is not provided
then it defaults to an empty dictionary (`{}`).
-Available "endpoints"
----------------------
+## Available "endpoints"
By convention, Klipper "endpoints" are of the form
`<module_name>/<some_name>`. When making a request to an "endpoint",