docs: update API documentation for changes to update_manager

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-01-22 06:28:20 -05:00
parent 6a88df095e
commit 578ce740c5
3 changed files with 24 additions and 9 deletions

View File

@ -21,4 +21,4 @@ Users:\
[user_changes.md](/docs/user_changes.md) - December 31st 2020 [user_changes.md](/docs/user_changes.md) - December 31st 2020
Developers:\ Developers:\
[api_changes.md](/docs/api_changes.md) - January 4th 2021 [api_changes.md](/docs/api_changes.md) - January 22nd 2021

View File

@ -1,5 +1,15 @@
This document keeps a record of all changes to Moonraker's web APIs. 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 ### January 4th 2021
- A `notify_update_refreshed` notification has been added. Moonraker now - A `notify_update_refreshed` notification has been added. Moonraker now
auto-refreshes the update status at roughly a 2 hour interval. When auto-refreshes the update status at roughly a 2 hour interval. When

View File

@ -868,7 +868,7 @@ In these cases the current status will be returned immediately.
detached: <bool>, detached: <bool>,
debug_enabled: <bool> debug_enabled: <bool>
}, },
'client': { 'client_name_1': {
name: <string>, name: <string>,
version: <string>, version: <string>,
remote_version: <string> remote_version: <string>
@ -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 - `debug_enabled`: True when "enable_repo_debug" has been configured. This
will bypass repo validation, allowing detached updates, and updates from will bypass repo validation, allowing detached updates, and updates from
a remote/origin other than "origin/master". 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 - `name`: Name of the configured client
- `version`: version of the installed client. - `version`: version of the installed client.
- `remote_version`: version of the latest release published to GitHub - `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: - The `system` object has the following fields:
- `package_count`: The number of system packages available for update - `package_count`: The number of system packages available for update
- `package_list`: An array containing the names of packages available - `package_list`: An array containing the names of packages available
@ -967,17 +970,19 @@ then this request will return an error.
`ok` when complete `ok` when complete
### Update Client ### Update Client
If `client_repo` and `client_path` have been configured in `[update_manager]` If one more more `[update_manager client client_name]` sections have
this endpoint can be used to install the most recently publish release been configured this endpoint can be used to install the most recently
of the client. If an update is requested while a print is in progress published release of the client. If an update is requested while a
then this request will return an error. 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:\ - HTTP command:\
`POST /machine/update/client` `POST /machine/update/client?name=client_name`
- Websocket command:\ - Websocket command:\
`{jsonrpc: "2.0", method: "machine.update.client", `{jsonrpc: "2.0", method: "machine.update.client",
id: <request id>}` params: {name: "client_name"}, id: <request id>}`
- Returns:\ - Returns:\
`ok` when complete `ok` when complete