summaryrefslogtreecommitdiffstats
path: root/src/rest.h
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2023-11-23 16:51:51 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-11-23 22:08:49 +0100
commit56e4a01af0b22d7e629fd4db419ae5d6a3a5be50 (patch)
tree80186b8d291eb1bb26b1a7ea474f1adaae483b94 /src/rest.h
parentf8eca04841725180fc78a1dd8bbf6435e02d554a (diff)
rest: revisit logging
Skip logging for the following REST API invocations: - GET /scopes - GET /clients - POST /clients (for legacy web console only) The web front-end generated very frequent requests for this. Update logging format to: 127.0.0.1:54637 POST /wol clients=192.168.2.130 to include client IP address.
Diffstat (limited to 'src/rest.h')
-rw-r--r--src/rest.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/rest.h b/src/rest.h
index 6120a4e..5e21b39 100644
--- a/src/rest.h
+++ b/src/rest.h
@@ -84,6 +84,59 @@ static inline int og_client_socket(const struct og_client *cli)
int og_client_state_process_payload_rest(struct og_client *cli);
+enum og_rest_uri {
+ OG_URI_UNKNOWN = 0,
+ OG_URI_CLIENTS,
+ OG_URI_CLIENT_REPO,
+ OG_URI_CLIENT_SETUP,
+ OG_URI_CLIENT_SERVER,
+ OG_URI_CLIENT_INFO,
+ OG_URI_CLIENT_ADD,
+ OG_URI_CLIENT_UPDATE,
+ OG_URI_CLIENT_DELETE,
+ OG_URI_WOL,
+ OG_URI_SHELL_RUN,
+ OG_URI_SHELL_OUTPUT,
+ OG_URI_SESSION,
+ OG_URI_SCOPES,
+ OG_URI_POWEROFF,
+ OG_URI_REBOOT,
+ OG_URI_BOOT_MODE,
+ OG_URI_STOP,
+ OG_URI_REFRESH,
+ OG_URI_HARDWARE,
+ OG_URI_SOFTWARE,
+ OG_URI_REPO,
+ OG_URI_REPO_ADD,
+ OG_URI_REPO_DELETE,
+ OG_URI_IMAGES,
+ OG_URI_IMAGE_CREATE,
+ OG_URI_IMAGE_RESTORE,
+ OG_URI_IMAGE_DELETE,
+ OG_URI_PART_SETUP,
+ OG_URI_RUN_SCHEDULE,
+ OG_URI_TASK_RUN,
+ OG_URI_SCHEDULE_CREATE,
+ OG_URI_SCHEDULE_DELETE,
+ OG_URI_SCHEDULE_UPDATE,
+ OG_URI_SCHEDULE_GET,
+ OG_URI_OGLIVE_LIST,
+ OG_URI_OGLIVE_SET,
+ OG_URI_CENTER_ADD,
+ OG_URI_CENTER_DELETE,
+ OG_URI_ROOM_ADD,
+ OG_URI_ROOM_DELETE,
+ OG_URI_PROC_ADD,
+ OG_URI_PROC_UPDATE,
+ OG_URI_PROC_RUN,
+ OG_URI_SCHEDULE_RUN,
+ OG_URI_PROC_DEL,
+ OG_URI_TASK_ADD,
+ OG_URI_SERVER,
+ OG_URI_STATS,
+ OG_URI_MAX
+};
+
enum og_rest_method {
OG_METHOD_GET = 0,
OG_METHOD_POST,