summaryrefslogtreecommitdiffstats
path: root/src/rest.h
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2024-07-17 14:19:39 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-07-17 17:15:27 +0200
commite9a8f467f1d805348df66c6a4bee1d145fdd85db (patch)
tree215b505fb5ad060eceb2524ccda25c262d38373a /src/rest.h
parente62a55ae37bfdb2aba86696dde5bc27555dd5cf8 (diff)
rest: add GET,POST /image/restrict
Allow to restrict image to scope: POST /image/restrict { "image" : 49, "scopes" : [ 1,3 ] } response: 200 OK This restricts image with ID 49 to scopes 1 and 3. You can also fetch the current list of restrictions: GET /image/restrict { "image" : 49 } response: 200 OK { "image" : 49, "scopes" : [ 1,3 ] } Existing limitations in this interface: - Only restriction of image to center is possible at this moment. - This is only used by ogCP to validate if this is possible, no existing code in the ogserver uses this to restrict POST image/restore. This is a usability feature.
Diffstat (limited to 'src/rest.h')
-rw-r--r--src/rest.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rest.h b/src/rest.h
index f70af75..61169fe 100644
--- a/src/rest.h
+++ b/src/rest.h
@@ -37,6 +37,7 @@ enum og_cmd_type {
OG_CMD_IMAGE_CREATE,
OG_CMD_IMAGE_UPDATE,
OG_CMD_IMAGE_RESTORE,
+ OG_CMD_IMAGE_RESTRICT,
OG_CMD_SETUP,
OG_CMD_RUN_SCHEDULE,
OG_CMD_IMAGES,
@@ -124,6 +125,7 @@ enum og_rest_uri {
OG_URI_IMAGE_UPDATE,
OG_URI_IMAGE_RESTORE,
OG_URI_IMAGE_DELETE,
+ OG_URI_IMAGE_RESTRICT,
OG_URI_CACHE_LIST,
OG_URI_CACHE_DELETE,
OG_URI_PART_SETUP,