From c52b9bf5214c7bb00519d190f5f5960df01f63e8 Mon Sep 17 00:00:00 2001 From: ann0see <20726856+ann0see@users.noreply.github.com> Date: Sun, 26 Mar 2023 17:42:05 +0200 Subject: [PATCH 1/4] Document JSON-RPC API in user and server manuals Fixes: https://github.com/jamulussoftware/jamuluswebsite/issues/717 --- wiki/en/Running-a-Server.md | 7 ++++++- wiki/en/Software-Manual.md | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wiki/en/Running-a-Server.md b/wiki/en/Running-a-Server.md index a29ec3cc2..24b64c366 100644 --- a/wiki/en/Running-a-Server.md +++ b/wiki/en/Running-a-Server.md @@ -225,6 +225,10 @@ Start the Jamulus Server graphical user interface in the minimized window state. {% include_relative Include-Shared-Commands.md %} +### Controlling the Server via API + +Jamulus can be controlled via an experimental API which is subject to changes. You can find the [JSON-RPC API documented in the main repository](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md). JSON-RPC allows you to control some features like changing the welcome message or starting recordings in headless mode from authenticated external applications. It works while the server is running. + --- ## Recording @@ -246,7 +250,8 @@ Set server not to record by default when recording is configured. Recording starts once the first person connects to the Server, and stops when the last person leaves. -If the Server receives a SIGUSR1 signal during a recording, it will start a new recording in a new directory. SIGUSR2 will toggle recording on/off. +If the Server receives a SIGUSR1 signal during a recording, it will start a new recording in a new directory. SIGUSR2 will toggle recording on/off. If [JSON-RPC](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md) is enabled, you will also be able to manage the server in a more fine grained way comparable to the GUI. Please see the (experimental) [JSON-RPC documentation on the recorder](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md#jamulusserverstartrecording). + To send these signals using systemd, create the following two `.service` files in `/etc/systemd/system`, calling them something appropriate (e.g. `jamulusTogglerec.service`). diff --git a/wiki/en/Software-Manual.md b/wiki/en/Software-Manual.md index 1a66a24f6..67d24e1a7 100644 --- a/wiki/en/Software-Manual.md +++ b/wiki/en/Software-Manual.md @@ -302,5 +302,6 @@ For macOS, start a Terminal window and run Jamulus with the desired options like {% include_relative Include-Shared-Commands.md %} +# Controlling the Client via API - +In addition to the CLI, Jamulus can be controlled using an API. This is beneficial for advanced usecases - especially if there is no GUI or another application needs to interact with Jamulus. Please note that the API is still experimental. Information on the [JSON-RPC API can be found in the main repository](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md). From 9425fbedf5123a78114747845d1ad993ba0337fd Mon Sep 17 00:00:00 2001 From: ann0see <20726856+ann0see@users.noreply.github.com> Date: Sun, 26 Mar 2023 18:50:18 +0200 Subject: [PATCH 2/4] Remove "fine grained" Co-authored-by: Peter L Jones --- wiki/en/Running-a-Server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/en/Running-a-Server.md b/wiki/en/Running-a-Server.md index 24b64c366..712d3d973 100644 --- a/wiki/en/Running-a-Server.md +++ b/wiki/en/Running-a-Server.md @@ -250,7 +250,7 @@ Set server not to record by default when recording is configured. Recording starts once the first person connects to the Server, and stops when the last person leaves. -If the Server receives a SIGUSR1 signal during a recording, it will start a new recording in a new directory. SIGUSR2 will toggle recording on/off. If [JSON-RPC](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md) is enabled, you will also be able to manage the server in a more fine grained way comparable to the GUI. Please see the (experimental) [JSON-RPC documentation on the recorder](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md#jamulusserverstartrecording). +If the Server receives a SIGUSR1 signal during a recording, it will start a new recording in a new directory. SIGUSR2 will toggle recording on/off. If [JSON-RPC](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md) is enabled, you will also be able to manage the server in a way comparable to the GUI. Please see the (experimental) [JSON-RPC documentation on the recorder](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md#jamulusserverstartrecording). To send these signals using systemd, create the following two `.service` files in `/etc/systemd/system`, calling them something appropriate (e.g. `jamulusTogglerec.service`). From 190f72456665d8279cec1722e56ec0ddfe27d9da Mon Sep 17 00:00:00 2001 From: ann0see <20726856+ann0see@users.noreply.github.com> Date: Sun, 26 Mar 2023 18:53:10 +0200 Subject: [PATCH 3/4] Fix typo --- wiki/en/Software-Manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/en/Software-Manual.md b/wiki/en/Software-Manual.md index 67d24e1a7..14a6477bf 100644 --- a/wiki/en/Software-Manual.md +++ b/wiki/en/Software-Manual.md @@ -304,4 +304,4 @@ For macOS, start a Terminal window and run Jamulus with the desired options like # Controlling the Client via API -In addition to the CLI, Jamulus can be controlled using an API. This is beneficial for advanced usecases - especially if there is no GUI or another application needs to interact with Jamulus. Please note that the API is still experimental. Information on the [JSON-RPC API can be found in the main repository](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md). +In addition to the CLI, Jamulus can be controlled using an API. This is beneficial for advanced use cases - especially if there is no GUI or another application needs to interact with Jamulus. Please note that the API is still experimental. Information on the [JSON-RPC API can be found in the main repository](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md). From 55ea1fe2d0d9a5b8a7c27948a4ad46f89989a2ba Mon Sep 17 00:00:00 2001 From: ann0see <20726856+ann0see@users.noreply.github.com> Date: Sun, 26 Mar 2023 21:53:34 +0200 Subject: [PATCH 4/4] Rewording --- wiki/en/Software-Manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/en/Software-Manual.md b/wiki/en/Software-Manual.md index 14a6477bf..4a91375df 100644 --- a/wiki/en/Software-Manual.md +++ b/wiki/en/Software-Manual.md @@ -304,4 +304,4 @@ For macOS, start a Terminal window and run Jamulus with the desired options like # Controlling the Client via API -In addition to the CLI, Jamulus can be controlled using an API. This is beneficial for advanced use cases - especially if there is no GUI or another application needs to interact with Jamulus. Please note that the API is still experimental. Information on the [JSON-RPC API can be found in the main repository](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md). +In addition to the CLI, Jamulus can be controlled using an API. This is beneficial for advanced use cases - for example, where there is no GUI, or another application needs to interact with Jamulus. Please note that the API is still experimental. Information on the [JSON-RPC API can be found in the main repository](https://github.com/jamulussoftware/jamulus/blob/main/docs/JSON-RPC.md).