docs: document "extended" argument for GET directory endpoint

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2020-11-02 20:13:45 -05:00
parent 624be50026
commit 73cbcb7b7e
2 changed files with 13 additions and 2 deletions

View File

@ -1,6 +1,12 @@
This document keeps a record of all changes to Moonraker's remote
facing APIs.
### November 2nd 2020
- The `GET /server/files/directory` endpoint now accepts a new
optional argument, `extended`. If `extended=true`, then
the data returned for gcode files will also include extracted
metadata if it exists.
### October 25th 2020
- The `modified` field reported for files and directories is no
longer represented as a string. It is now a floating point

View File

@ -483,18 +483,23 @@ Unlike `/server/files/list`, this command does not walk through
subdirectories.
- HTTP command:\
`GET /server/files/directory?path=gcodes/my_subdir`
`GET /server/files/directory?path=gcodes/my_subdir&extended=true`
If the query string is omitted then the command will return
the "gcodes" file list by default.
- Websocket command:\
`{jsonrpc: "2.0", method: "server.files.get_directory",
params: {path: "gcodes/my_subdir"} , id: <request id>}`
params: {path: "gcodes/my_subdir", extended: true} ,
id: <request id>}`
If the "params" are omitted then the command will return
the "gcodes" file list by default.
The `extended` argument is optional, and defaults to false. If
specified and set to true, then data returned for gcode files
will also include metadata if it is available.
- Returns:\
An object containing file and subdirectory information in the
following format: