From 578ce740c5fa4a85fdb3416950fa693e562c2cf5 Mon Sep 17 00:00:00 2001 From: Arksine Date: Fri, 22 Jan 2021 06:28:20 -0500 Subject: [PATCH] docs: update API documentation for changes to update_manager Signed-off-by: Eric Callahan --- README.md | 2 +- docs/api_changes.md | 10 ++++++++++ docs/web_api.md | 21 +++++++++++++-------- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9b01822..487d1c9 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,4 @@ Users:\ [user_changes.md](/docs/user_changes.md) - December 31st 2020 Developers:\ -[api_changes.md](/docs/api_changes.md) - January 4th 2021 +[api_changes.md](/docs/api_changes.md) - January 22nd 2021 diff --git a/docs/api_changes.md b/docs/api_changes.md index ac00431..bcc751a 100644 --- a/docs/api_changes.md +++ b/docs/api_changes.md @@ -1,5 +1,15 @@ This document keeps a record of all changes to Moonraker's web APIs. +### January 22nd 2021 +- The `POST /machine/update/client` endpoint now requires a `name` + argument. This change added multiple client support +- The response to `GET /machine/update/status` no longer returns a + `client` field. Instead it will add fields matching the `name` of + each configured client. Keep in mind that the client object could + have a different set of fields depending on the type of a client. The + easy way to check for this is to see if a `branch` field is present. + If so, this client is a `git repo`. Otherwise it is a `web` client. + ### January 4th 2021 - A `notify_update_refreshed` notification has been added. Moonraker now auto-refreshes the update status at roughly a 2 hour interval. When diff --git a/docs/web_api.md b/docs/web_api.md index 430c493..d753030 100644 --- a/docs/web_api.md +++ b/docs/web_api.md @@ -868,7 +868,7 @@ In these cases the current status will be returned immediately. detached: , debug_enabled: }, - 'client': { + 'client_name_1': { name: , version: , remote_version: @@ -909,10 +909,13 @@ In these cases the current status will be returned immediately. - `debug_enabled`: True when "enable_repo_debug" has been configured. This will bypass repo validation, allowing detached updates, and updates from a remote/origin other than "origin/master". - - The `client` object has the following fields: + - Multiple `client` fields may be present. Web clients have the following + fields: - `name`: Name of the configured client - `version`: version of the installed client. - `remote_version`: version of the latest release published to GitHub + A `git_repo` client will have fields that match that of `klipper` and + `moonraker` - The `system` object has the following fields: - `package_count`: The number of system packages available for update - `package_list`: An array containing the names of packages available @@ -967,17 +970,19 @@ then this request will return an error. `ok` when complete ### Update Client -If `client_repo` and `client_path` have been configured in `[update_manager]` -this endpoint can be used to install the most recently publish release -of the client. If an update is requested while a print is in progress -then this request will return an error. +If one more more `[update_manager client client_name]` sections have +been configured this endpoint can be used to install the most recently +published release of the client. If an update is requested while a +print is in progress then this request will return an error. The +`name` argument is requred, it's value should match the `client_name` +of the configured section. - HTTP command:\ - `POST /machine/update/client` + `POST /machine/update/client?name=client_name` - Websocket command:\ `{jsonrpc: "2.0", method: "machine.update.client", - id: }` + params: {name: "client_name"}, id: }` - Returns:\ `ok` when complete