diff --git a/docs/api_changes.md b/docs/api_changes.md index 63dd194..e63cbe3 100644 --- a/docs/api_changes.md +++ b/docs/api_changes.md @@ -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 diff --git a/docs/web_api.md b/docs/web_api.md index 009c08c..13555b3 100644 --- a/docs/web_api.md +++ b/docs/web_api.md @@ -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: }` + params: {path: "gcodes/my_subdir", extended: true} , + 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: