From db4ae0408c8b18fd82ee64d3525a3923b0ecdfa8 Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Wed, 8 Nov 2023 11:21:20 -0500 Subject: [PATCH] Fix admin endpoint names in documentation --- docs/user/admin/config.md | 6 +++--- docs/user/admin/privileges.md | 8 ++++---- docs/user/admin/proc.md | 4 ++-- docs/user/admin/stats.md | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/user/admin/config.md b/docs/user/admin/config.md index 8394f7b..6c18a03 100644 --- a/docs/user/admin/config.md +++ b/docs/user/admin/config.md @@ -8,7 +8,7 @@ update the configuration described in that document. ## API Endpoints -### **GET** `/_telodendria/admin/config` +### **GET** `/_telodendria/admin/v1/config` Retrieve the current configuration. @@ -20,7 +20,7 @@ Retrieve the current configuration. |---------------|-------------| | 200 | The current configuration was successfully retrieved.| -### **POST** `/_telodendria/admin/config` +### **POST** `/_telodendria/admin/v1/config` Installs a new configuration. This endpoint validates the request body, ensuring it is a proper configuration, then it replaces the existing @@ -40,7 +40,7 @@ configuration with the new one. |-------|------|-------------| | `restart_required` | `Boolean` | Whether or not the process needs to be restarted to finish applying the configuration. If this is `true`, then the restart endpoint should be used at a convenient time to apply the configuration. -### **PUT** `/_telodendria/admin/config` +### **PUT** `/_telodendria/admin/v1/config` Update the currently installed configuration instead of completely replacing it. This endpoint validates the request body, merges it on top of the current configuration, validates the resulting diff --git a/docs/user/admin/privileges.md b/docs/user/admin/privileges.md index 8bbf143..9a8da06 100644 --- a/docs/user/admin/privileges.md +++ b/docs/user/admin/privileges.md @@ -41,7 +41,7 @@ this privilege level. The following API endpoints are implemented for managing privileges. -### **GET** `/_telodendria/admin/privileges/[localpart]` +### **GET** `/_telodendria/admin/v1/privileges/[localpart]` Retrieve the permissions for a user. If the localpart is omitted, then retrieve the privileges for the user that owns the access token being @@ -62,7 +62,7 @@ used. Note that the owner of the access token must have the |-------|------|-------------| | `privileges` | `Array` | An array of privileges, as described above. The privileges are encoded as JSON strings.| -### **POST** `/_telodendria/admin/privileges/[localpart]` +### **POST** `/_telodendria/admin/v1/privileges/[localpart]` Update the privileges of a local user by replacing the privileges array with the one specified in the request. Like the **GET** version of this @@ -89,7 +89,7 @@ owns the access token. |-------|------|-------------| | `privileges` | `Array` | An array of privileges, as described above. The privileges are encoded as JSON strings.| -### **PUT** `/_telodendria/admin/privileges/[localpart]` +### **PUT** `/_telodendria/admin/v1/privileges/[localpart]` Update the privileges of a local user by adding the privileges specified in the request to the users existing privileges. @@ -114,7 +114,7 @@ specified in the request to the users existing privileges. |-------|------|-------------| | `privileges` | `Array` | An array of privileges, as described above. The privileges are encoded as JSON strings.| -### **DELETE** `/_telodendria/admin/privileges/[localpart]` +### **DELETE** `/_telodendria/admin/v1/privileges/[localpart]` Update the privileges of a local user by removing the privileges specified in the request from the user's existing privileges. diff --git a/docs/user/admin/proc.md b/docs/user/admin/proc.md index 4db33ec..e4ad3d0 100644 --- a/docs/user/admin/proc.md +++ b/docs/user/admin/proc.md @@ -5,7 +5,7 @@ administrator to manage the Telodendria process itself. ## API Endpoints -### **POST** `/_telodendria/admin/restart` +### **POST** `/_telodendria/admin/v1/restart` Restart the Telodendria daemon cleanly. This endpoint will respond immediately after signaling to the daemon that it should be restarted @@ -26,7 +26,7 @@ starts over. On success, this endpoint simply returns an empty JSON object. -### **POST** `/_telodendria/admin/shutdown` +### **POST** `/_telodendria/admin/v1/shutdown` Shut down the Telodendria process cleanly. This endpoint will respond immediately after signalling to the daemon that it should be shut diff --git a/docs/user/admin/stats.md b/docs/user/admin/stats.md index bbebb7f..dc951a8 100644 --- a/docs/user/admin/stats.md +++ b/docs/user/admin/stats.md @@ -5,7 +5,7 @@ information about how the server process is performing. ## API Endpoints -### **GET** `/_telodendria/admin/stats` +### **GET** `/_telodendria/admin/v1/stats` Retrieve basic statistics about the currently running Telodendria process.