From 36de982692c416ef3cc4d494784433e56d393dd0 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Fri, 17 Feb 2023 14:32:20 -0500 Subject: [PATCH] docs: document file manager API fix Signed-off-by: Eric Callahan --- docs/api_changes.md | 12 ++++++++++++ docs/web_api.md | 16 ++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/api_changes.md b/docs/api_changes.md index 4b1ade4..607ba04 100644 --- a/docs/api_changes.md +++ b/docs/api_changes.md @@ -1,6 +1,18 @@ ## This document keeps a record of all changes to Moonraker's web APIs. +### February 17 2023 +- Moonraker API Version 1.2.1 +- An error in the return value for some file manager endpoints has + been corrected. Specifically, the returned result contains an `item` object + with a `path` field that was prefixed with the root (ie: "gcodes"). + This is inconsistent with the websocket notification and has been corrected + to remove the prefix. This affects the following endpoints: + - `POST /server/files/directory` | `server.files.post_directory` + - `DELETE /server/files/directory` | `server.files.delete_directory` + - `POST /server/files/move` | `server.files.move` + - `POST /server/files/copy` | `server.files.copy` + ### March 4th 2022 - Moonraker API Version 1.0.1 - The `server.websocket.id` endpoint has been deprecated. It is diff --git a/docs/web_api.md b/docs/web_api.md index af0622b..09ca4bc 100644 --- a/docs/web_api.md +++ b/docs/web_api.md @@ -2011,7 +2011,7 @@ Returns: Information about the created directory ```json { "item": { - "path": "gcodes/testdir", + "path": "my_new_dir", "root": "gcodes" }, "action": "create_dir" @@ -2031,7 +2031,7 @@ JSON-RPC request: "jsonrpc": "2.0", "method": "server.files.delete_directory", "params": { - "path": "gcodes/my_new_dir", + "path": "gcodes/my_subdir", "force": false }, "id": 6545 @@ -2045,7 +2045,7 @@ Returns: Information about the deleted directory ```json { "item": { - "path": "gcodes/testdir", + "path": "my_subdir", "root": "gcodes" }, "action": "delete_dir" @@ -2072,7 +2072,7 @@ in *moving* the source directory into the destination directory. HTTP request: ```http -POST /server/files/move?source=gcodes/my_file.gcode&dest=gcodes/subdir/my_file.gcode +POST /server/files/move?source=gcodes/testdir/my_file.gcode&dest=gcodes/subdir/my_file.gcode ``` JSON-RPC request: ```json @@ -2080,7 +2080,7 @@ JSON-RPC request: "jsonrpc": "2.0", "method": "server.files.move", "params": { - "source": "gcodes/my_file.gcode", + "source": "gcodes/testdir/my_file.gcode", "dest": "gcodes/subdir/my_file.gcode" }, "id": 5664 @@ -2093,10 +2093,10 @@ Returns: Information about the moved file or directory "result": { "item": { "root": "gcodes", - "path": "test4/test3" + "path": "subdir/my_file.gcode" }, "source_item": { - "path": "gcodes/test4/test3", + "path": "testdir/my_file.gcode", "root": "gcodes" }, "action": "move_dir" @@ -2132,7 +2132,7 @@ Returns: Information about the copied file or directory { "item": { "root": "gcodes", - "path": "test4/Voron_v2_350_afterburner_Filament Cover_0.2mm_ABS.gcode" + "path": "subdir/my_file.gcode" }, "action": "create_file" }