From d931fc21c99f8214519669047afa26409efd746a Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 14 Jan 2025 16:39:42 +0900 Subject: [PATCH 01/21] fix: Let the vfolder REST API accept vfolder UUIDs as intended --- src/ai/backend/manager/api/vfolder.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ai/backend/manager/api/vfolder.py b/src/ai/backend/manager/api/vfolder.py index bd8fe36eccc..69cf8e88875 100644 --- a/src/ai/backend/manager/api/vfolder.py +++ b/src/ai/backend/manager/api/vfolder.py @@ -294,9 +294,17 @@ def _wrapper( ) -> Callable[Concatenate[web.Request, P], Awaitable[web.Response]]: @functools.wraps(handler) async def _wrapped(request: web.Request, *args: P.args, **kwargs: P.kwargs) -> web.Response: - folder_name = request.match_info["name"] + folder_name_or_id: str | uuid.UUID + piece = request.match_info["name"] + try: + folder_name_or_id = uuid.UUID(piece) + except ValueError: + folder_name_or_id = piece return await handler( - request, await resolve_vfolder_rows(request, perm, folder_name), *args, **kwargs + request, + await resolve_vfolder_rows(request, perm, folder_name_or_id), + *args, + **kwargs, ) return _wrapped From f998b8b62b47098e5eff78b03dfa822475691db4 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 14 Jan 2025 17:56:49 +0900 Subject: [PATCH 02/21] doc: Add news fragment --- changes/3451.fix.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/3451.fix.md diff --git a/changes/3451.fix.md b/changes/3451.fix.md new file mode 100644 index 00000000000..7c73f4205a4 --- /dev/null +++ b/changes/3451.fix.md @@ -0,0 +1 @@ +Fix a mis-implementation that has prevented using UUIDs to indicate an exact vfolder when invoking the vfolder REST API From 80170d9690b7129b177fa0a865e7dba66d403a9b Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 14 Jan 2025 08:59:12 +0000 Subject: [PATCH 03/21] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 204 +++++++++++------------ 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 6b888d1ea35..925a6a6d3ac 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -1445,7 +1445,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/events/session": { @@ -1515,7 +1515,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/auth": { @@ -2099,7 +2099,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_by_id", @@ -2155,7 +2155,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_by_name", @@ -2255,7 +2255,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/all-hosts": { @@ -2275,7 +2275,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/allowed-types": { @@ -2295,7 +2295,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/all_hosts": { @@ -2315,7 +2315,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/allowed_types": { @@ -2335,7 +2335,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/perf-metric": { @@ -2364,7 +2364,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename": { @@ -2521,7 +2521,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/request-upload": { @@ -2572,7 +2572,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/request-download": { @@ -2623,7 +2623,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/move-file": { @@ -2674,7 +2674,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename-file": { @@ -2729,7 +2729,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/delete-files": { @@ -2783,7 +2783,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_files.2", @@ -2829,7 +2829,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename_file": { @@ -2884,7 +2884,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/delete_files": { @@ -2932,7 +2932,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/files": { @@ -2969,7 +2969,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/invite": { @@ -3402,7 +3402,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/list_sent": { @@ -3422,7 +3422,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/update/{inv_id}": { @@ -3494,7 +3494,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/accept": { @@ -3627,7 +3627,7 @@ "in": "query" } ], - "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.update_shared_vfolder", @@ -3743,7 +3743,7 @@ "in": "query" } ], - "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/mounts": { @@ -3763,7 +3763,7 @@ } ], "parameters": [], - "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.mount_host", @@ -4001,7 +4001,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.update_quota", @@ -4086,7 +4086,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/used-bytes": { @@ -4124,7 +4124,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "//graphql": { @@ -4312,7 +4312,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "services.create", @@ -4409,7 +4409,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}": { @@ -4445,7 +4445,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "services.delete", @@ -4479,7 +4479,7 @@ } } ], - "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/errors": { @@ -4515,7 +4515,7 @@ } } ], - "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/errors/clear": { @@ -4544,7 +4544,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/scale": { @@ -4589,7 +4589,7 @@ } } ], - "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/sync": { @@ -4625,7 +4625,7 @@ } } ], - "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/routings/{route_id}": { @@ -4678,7 +4678,7 @@ } } ], - "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "services.delete_route", @@ -4720,7 +4720,7 @@ } } ], - "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/token": { @@ -4765,7 +4765,7 @@ } } ], - "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session": { @@ -5381,7 +5381,7 @@ "in": "query" } ], - "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/_/sync-agent-registry": { @@ -5484,7 +5484,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "session.restart", @@ -5527,7 +5527,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "session.destroy", @@ -5580,7 +5580,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "session.execute", @@ -5607,7 +5607,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/_/logs": { @@ -5646,7 +5646,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "session.get_task_logs.2", @@ -5674,7 +5674,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/direct-access-info": { @@ -5703,7 +5703,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/logs": { @@ -5741,7 +5741,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/rename": { @@ -5818,7 +5818,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/complete": { @@ -5847,7 +5847,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/shutdown-service": { @@ -5894,7 +5894,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/upload": { @@ -5923,7 +5923,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/download": { @@ -5995,7 +5995,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/download_single": { @@ -6064,7 +6064,7 @@ } } ], - "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/files": { @@ -6093,7 +6093,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/start-service": { @@ -6154,7 +6154,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/commit": { @@ -6348,7 +6348,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/pty": { @@ -6377,7 +6377,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/execute": { @@ -6406,7 +6406,7 @@ } } ], - "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/apps": { @@ -6435,7 +6435,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/httpproxy": { @@ -6498,7 +6498,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/tcpproxy": { @@ -6561,7 +6561,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/manager/status": { @@ -6884,7 +6884,7 @@ } }, "parameters": [], - "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/recalculate-usage": { @@ -6904,7 +6904,7 @@ } ], "parameters": [], - "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/usage/month": { @@ -6945,7 +6945,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/usage/period": { @@ -6992,7 +6992,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/stats/user/month": { @@ -7012,7 +7012,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/stats/admin/month": { @@ -7032,7 +7032,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher": { @@ -7061,7 +7061,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/start": { @@ -7099,7 +7099,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/stop": { @@ -7137,7 +7137,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/restart": { @@ -7175,7 +7175,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/scaling-groups": { @@ -7212,7 +7212,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/scaling-groups/{scaling_group}/wsproxy-version": { @@ -7257,7 +7257,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/cluster": { @@ -7308,7 +7308,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "template/cluster.list_template", @@ -7351,7 +7351,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/cluster/{template_id}": { @@ -7401,7 +7401,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "put": { "operationId": "template/cluster.put", @@ -7449,7 +7449,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "template/cluster.delete", @@ -7484,7 +7484,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/session": { @@ -7535,7 +7535,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "template/session.list_template", @@ -7578,7 +7578,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/session/{template_id}": { @@ -7628,7 +7628,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "put": { "operationId": "template/session.put", @@ -7686,7 +7686,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "template/session.delete", @@ -7721,7 +7721,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/user-config/dotfiles": { @@ -7771,7 +7771,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "user-config.list_or_get", @@ -7806,7 +7806,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "user-config.update", @@ -7854,7 +7854,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "user-config.delete", @@ -7889,7 +7889,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/user-config/bootstrap-script": { @@ -7927,7 +7927,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "user-config.get_bootstrap_script", @@ -7945,7 +7945,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/domain-config/dotfiles": { @@ -7996,7 +7996,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "domain-config.list_or_get", @@ -8031,7 +8031,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "domain-config.update", @@ -8080,7 +8080,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "domain-config.delete", @@ -8115,7 +8115,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" } }, "/group-config/dotfiles": { @@ -8177,7 +8177,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "group-config.list_or_get", @@ -8228,7 +8228,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "group-config.update", @@ -8288,7 +8288,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "group-config.delete", @@ -8339,7 +8339,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" } }, "/logs/error": { @@ -8411,7 +8411,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "logs/error.list_logs", @@ -8456,7 +8456,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/logs/error/{log_id}/clear": { @@ -8485,7 +8485,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } } } From 48b7b2bbfdc812ebbceb176a262d4cd977357ad3 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 14 Jan 2025 09:01:01 +0000 Subject: [PATCH 04/21] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 204 +++++++++++------------ 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 925a6a6d3ac..6b888d1ea35 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -1445,7 +1445,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/events/session": { @@ -1515,7 +1515,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/auth": { @@ -2099,7 +2099,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_by_id", @@ -2155,7 +2155,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_by_name", @@ -2255,7 +2255,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/all-hosts": { @@ -2275,7 +2275,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/allowed-types": { @@ -2295,7 +2295,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/all_hosts": { @@ -2315,7 +2315,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/allowed_types": { @@ -2335,7 +2335,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/perf-metric": { @@ -2364,7 +2364,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename": { @@ -2521,7 +2521,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/request-upload": { @@ -2572,7 +2572,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/request-download": { @@ -2623,7 +2623,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/move-file": { @@ -2674,7 +2674,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename-file": { @@ -2729,7 +2729,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/delete-files": { @@ -2783,7 +2783,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_files.2", @@ -2829,7 +2829,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename_file": { @@ -2884,7 +2884,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/delete_files": { @@ -2932,7 +2932,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/files": { @@ -2969,7 +2969,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/invite": { @@ -3402,7 +3402,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/list_sent": { @@ -3422,7 +3422,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/update/{inv_id}": { @@ -3494,7 +3494,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/accept": { @@ -3627,7 +3627,7 @@ "in": "query" } ], - "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.update_shared_vfolder", @@ -3743,7 +3743,7 @@ "in": "query" } ], - "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/mounts": { @@ -3763,7 +3763,7 @@ } ], "parameters": [], - "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.mount_host", @@ -4001,7 +4001,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.update_quota", @@ -4086,7 +4086,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/used-bytes": { @@ -4124,7 +4124,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "//graphql": { @@ -4312,7 +4312,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "services.create", @@ -4409,7 +4409,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}": { @@ -4445,7 +4445,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "services.delete", @@ -4479,7 +4479,7 @@ } } ], - "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/errors": { @@ -4515,7 +4515,7 @@ } } ], - "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/errors/clear": { @@ -4544,7 +4544,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/scale": { @@ -4589,7 +4589,7 @@ } } ], - "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/sync": { @@ -4625,7 +4625,7 @@ } } ], - "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/routings/{route_id}": { @@ -4678,7 +4678,7 @@ } } ], - "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "services.delete_route", @@ -4720,7 +4720,7 @@ } } ], - "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/token": { @@ -4765,7 +4765,7 @@ } } ], - "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session": { @@ -5381,7 +5381,7 @@ "in": "query" } ], - "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/_/sync-agent-registry": { @@ -5484,7 +5484,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "session.restart", @@ -5527,7 +5527,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "session.destroy", @@ -5580,7 +5580,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "session.execute", @@ -5607,7 +5607,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/_/logs": { @@ -5646,7 +5646,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "session.get_task_logs.2", @@ -5674,7 +5674,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/direct-access-info": { @@ -5703,7 +5703,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/logs": { @@ -5741,7 +5741,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/rename": { @@ -5818,7 +5818,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/complete": { @@ -5847,7 +5847,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/shutdown-service": { @@ -5894,7 +5894,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/upload": { @@ -5923,7 +5923,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/download": { @@ -5995,7 +5995,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/download_single": { @@ -6064,7 +6064,7 @@ } } ], - "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/files": { @@ -6093,7 +6093,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/start-service": { @@ -6154,7 +6154,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/commit": { @@ -6348,7 +6348,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/pty": { @@ -6377,7 +6377,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/execute": { @@ -6406,7 +6406,7 @@ } } ], - "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/apps": { @@ -6435,7 +6435,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/httpproxy": { @@ -6498,7 +6498,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/tcpproxy": { @@ -6561,7 +6561,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/manager/status": { @@ -6884,7 +6884,7 @@ } }, "parameters": [], - "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/recalculate-usage": { @@ -6904,7 +6904,7 @@ } ], "parameters": [], - "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/usage/month": { @@ -6945,7 +6945,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/usage/period": { @@ -6992,7 +6992,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/stats/user/month": { @@ -7012,7 +7012,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/stats/admin/month": { @@ -7032,7 +7032,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher": { @@ -7061,7 +7061,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/start": { @@ -7099,7 +7099,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/stop": { @@ -7137,7 +7137,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/restart": { @@ -7175,7 +7175,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/scaling-groups": { @@ -7212,7 +7212,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/scaling-groups/{scaling_group}/wsproxy-version": { @@ -7257,7 +7257,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/cluster": { @@ -7308,7 +7308,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "template/cluster.list_template", @@ -7351,7 +7351,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/cluster/{template_id}": { @@ -7401,7 +7401,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "put": { "operationId": "template/cluster.put", @@ -7449,7 +7449,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "template/cluster.delete", @@ -7484,7 +7484,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/session": { @@ -7535,7 +7535,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "template/session.list_template", @@ -7578,7 +7578,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/session/{template_id}": { @@ -7628,7 +7628,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "put": { "operationId": "template/session.put", @@ -7686,7 +7686,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "template/session.delete", @@ -7721,7 +7721,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/user-config/dotfiles": { @@ -7771,7 +7771,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "user-config.list_or_get", @@ -7806,7 +7806,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "user-config.update", @@ -7854,7 +7854,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "user-config.delete", @@ -7889,7 +7889,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/user-config/bootstrap-script": { @@ -7927,7 +7927,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "user-config.get_bootstrap_script", @@ -7945,7 +7945,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/domain-config/dotfiles": { @@ -7996,7 +7996,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "domain-config.list_or_get", @@ -8031,7 +8031,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "domain-config.update", @@ -8080,7 +8080,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "domain-config.delete", @@ -8115,7 +8115,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" } }, "/group-config/dotfiles": { @@ -8177,7 +8177,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "group-config.list_or_get", @@ -8228,7 +8228,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "group-config.update", @@ -8288,7 +8288,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "group-config.delete", @@ -8339,7 +8339,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" } }, "/logs/error": { @@ -8411,7 +8411,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "logs/error.list_logs", @@ -8456,7 +8456,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/logs/error/{log_id}/clear": { @@ -8485,7 +8485,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } } } From a33a898caedbe94a5916a238422428620d6ee454 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 14 Jan 2025 18:16:14 +0900 Subject: [PATCH 05/21] fix: Add test case --- tests/manager/api/test_vfolder.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/manager/api/test_vfolder.py diff --git a/tests/manager/api/test_vfolder.py b/tests/manager/api/test_vfolder.py new file mode 100644 index 00000000000..bac843fbf1a --- /dev/null +++ b/tests/manager/api/test_vfolder.py @@ -0,0 +1,29 @@ +from unittest.mock import AsyncMock, MagicMock +from uuid import UUID + +import pytest + +from ai.backend.manager.api import vfolder +from ai.backend.manager.api.vfolder import with_vfolder_rows_resolved +from ai.backend.manager.models.vfolder import VFolderPermissionSetAlias + + +@pytest.mark.asyncio +async def test_uuid_or_name_resolution(monkeypatch: pytest.MonkeyPatch) -> None: + mock_resolver = AsyncMock() + monkeypatch.setattr(vfolder, "resolve_vfolder_rows", mock_resolver) + + @with_vfolder_rows_resolved(VFolderPermissionSetAlias.READABLE) # type: ignore + async def dummy_handler(request, row): + return + + mock_request = MagicMock() + mock_request.match_info = {"name": "8e33ca7f-9aa3-4f59-8bbb-526c212da98b"} + await dummy_handler(mock_request) + call = mock_resolver.await_args_list[0] + assert isinstance(call.args[2], UUID) + + mock_request.match_info = {"name": "hello"} + await dummy_handler(mock_request) + call = mock_resolver.await_args_list[1] + assert isinstance(call.args[2], str) From 9b395ac157203b950f9e0fa3c65ab0c1b96f31b8 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 14 Jan 2025 09:19:54 +0000 Subject: [PATCH 06/21] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 204 +++++++++++------------ 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 6b888d1ea35..925a6a6d3ac 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -1445,7 +1445,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/events/session": { @@ -1515,7 +1515,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/auth": { @@ -2099,7 +2099,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_by_id", @@ -2155,7 +2155,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_by_name", @@ -2255,7 +2255,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/all-hosts": { @@ -2275,7 +2275,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/allowed-types": { @@ -2295,7 +2295,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/all_hosts": { @@ -2315,7 +2315,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/allowed_types": { @@ -2335,7 +2335,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/perf-metric": { @@ -2364,7 +2364,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename": { @@ -2521,7 +2521,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/request-upload": { @@ -2572,7 +2572,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/request-download": { @@ -2623,7 +2623,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/move-file": { @@ -2674,7 +2674,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename-file": { @@ -2729,7 +2729,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/delete-files": { @@ -2783,7 +2783,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_files.2", @@ -2829,7 +2829,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename_file": { @@ -2884,7 +2884,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/delete_files": { @@ -2932,7 +2932,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/files": { @@ -2969,7 +2969,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/invite": { @@ -3402,7 +3402,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/list_sent": { @@ -3422,7 +3422,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/update/{inv_id}": { @@ -3494,7 +3494,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/accept": { @@ -3627,7 +3627,7 @@ "in": "query" } ], - "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.update_shared_vfolder", @@ -3743,7 +3743,7 @@ "in": "query" } ], - "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/mounts": { @@ -3763,7 +3763,7 @@ } ], "parameters": [], - "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.mount_host", @@ -4001,7 +4001,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.update_quota", @@ -4086,7 +4086,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/used-bytes": { @@ -4124,7 +4124,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "//graphql": { @@ -4312,7 +4312,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "services.create", @@ -4409,7 +4409,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}": { @@ -4445,7 +4445,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "services.delete", @@ -4479,7 +4479,7 @@ } } ], - "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/errors": { @@ -4515,7 +4515,7 @@ } } ], - "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/errors/clear": { @@ -4544,7 +4544,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/scale": { @@ -4589,7 +4589,7 @@ } } ], - "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/sync": { @@ -4625,7 +4625,7 @@ } } ], - "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/routings/{route_id}": { @@ -4678,7 +4678,7 @@ } } ], - "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "services.delete_route", @@ -4720,7 +4720,7 @@ } } ], - "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/token": { @@ -4765,7 +4765,7 @@ } } ], - "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session": { @@ -5381,7 +5381,7 @@ "in": "query" } ], - "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/_/sync-agent-registry": { @@ -5484,7 +5484,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "session.restart", @@ -5527,7 +5527,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "session.destroy", @@ -5580,7 +5580,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "session.execute", @@ -5607,7 +5607,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/_/logs": { @@ -5646,7 +5646,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "session.get_task_logs.2", @@ -5674,7 +5674,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/direct-access-info": { @@ -5703,7 +5703,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/logs": { @@ -5741,7 +5741,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/rename": { @@ -5818,7 +5818,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/complete": { @@ -5847,7 +5847,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/shutdown-service": { @@ -5894,7 +5894,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/upload": { @@ -5923,7 +5923,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/download": { @@ -5995,7 +5995,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/download_single": { @@ -6064,7 +6064,7 @@ } } ], - "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/files": { @@ -6093,7 +6093,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/start-service": { @@ -6154,7 +6154,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/commit": { @@ -6348,7 +6348,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/pty": { @@ -6377,7 +6377,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/execute": { @@ -6406,7 +6406,7 @@ } } ], - "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/apps": { @@ -6435,7 +6435,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/httpproxy": { @@ -6498,7 +6498,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/tcpproxy": { @@ -6561,7 +6561,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/manager/status": { @@ -6884,7 +6884,7 @@ } }, "parameters": [], - "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/recalculate-usage": { @@ -6904,7 +6904,7 @@ } ], "parameters": [], - "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/usage/month": { @@ -6945,7 +6945,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/usage/period": { @@ -6992,7 +6992,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/stats/user/month": { @@ -7012,7 +7012,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/stats/admin/month": { @@ -7032,7 +7032,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher": { @@ -7061,7 +7061,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/start": { @@ -7099,7 +7099,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/stop": { @@ -7137,7 +7137,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/restart": { @@ -7175,7 +7175,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/scaling-groups": { @@ -7212,7 +7212,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/scaling-groups/{scaling_group}/wsproxy-version": { @@ -7257,7 +7257,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/cluster": { @@ -7308,7 +7308,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "template/cluster.list_template", @@ -7351,7 +7351,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/cluster/{template_id}": { @@ -7401,7 +7401,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "put": { "operationId": "template/cluster.put", @@ -7449,7 +7449,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "template/cluster.delete", @@ -7484,7 +7484,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/session": { @@ -7535,7 +7535,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "template/session.list_template", @@ -7578,7 +7578,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/session/{template_id}": { @@ -7628,7 +7628,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "put": { "operationId": "template/session.put", @@ -7686,7 +7686,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "template/session.delete", @@ -7721,7 +7721,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/user-config/dotfiles": { @@ -7771,7 +7771,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "user-config.list_or_get", @@ -7806,7 +7806,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "user-config.update", @@ -7854,7 +7854,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "user-config.delete", @@ -7889,7 +7889,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/user-config/bootstrap-script": { @@ -7927,7 +7927,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "user-config.get_bootstrap_script", @@ -7945,7 +7945,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/domain-config/dotfiles": { @@ -7996,7 +7996,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "domain-config.list_or_get", @@ -8031,7 +8031,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "domain-config.update", @@ -8080,7 +8080,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "domain-config.delete", @@ -8115,7 +8115,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" } }, "/group-config/dotfiles": { @@ -8177,7 +8177,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "group-config.list_or_get", @@ -8228,7 +8228,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "group-config.update", @@ -8288,7 +8288,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "group-config.delete", @@ -8339,7 +8339,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" } }, "/logs/error": { @@ -8411,7 +8411,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "logs/error.list_logs", @@ -8456,7 +8456,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/logs/error/{log_id}/clear": { @@ -8485,7 +8485,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } } } From 96b8c9f6a029564c6af6add93c32cc0878189551 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 14 Jan 2025 09:21:38 +0000 Subject: [PATCH 07/21] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 204 +++++++++++------------ 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 925a6a6d3ac..6b888d1ea35 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -1445,7 +1445,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/events/session": { @@ -1515,7 +1515,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/auth": { @@ -2099,7 +2099,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_by_id", @@ -2155,7 +2155,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_by_name", @@ -2255,7 +2255,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/all-hosts": { @@ -2275,7 +2275,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/allowed-types": { @@ -2295,7 +2295,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/all_hosts": { @@ -2315,7 +2315,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/allowed_types": { @@ -2335,7 +2335,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/perf-metric": { @@ -2364,7 +2364,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename": { @@ -2521,7 +2521,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/request-upload": { @@ -2572,7 +2572,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/request-download": { @@ -2623,7 +2623,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/move-file": { @@ -2674,7 +2674,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename-file": { @@ -2729,7 +2729,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/delete-files": { @@ -2783,7 +2783,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_files.2", @@ -2829,7 +2829,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename_file": { @@ -2884,7 +2884,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/delete_files": { @@ -2932,7 +2932,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/files": { @@ -2969,7 +2969,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/invite": { @@ -3402,7 +3402,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/list_sent": { @@ -3422,7 +3422,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/update/{inv_id}": { @@ -3494,7 +3494,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/accept": { @@ -3627,7 +3627,7 @@ "in": "query" } ], - "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.update_shared_vfolder", @@ -3743,7 +3743,7 @@ "in": "query" } ], - "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/mounts": { @@ -3763,7 +3763,7 @@ } ], "parameters": [], - "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.mount_host", @@ -4001,7 +4001,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.update_quota", @@ -4086,7 +4086,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/used-bytes": { @@ -4124,7 +4124,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "//graphql": { @@ -4312,7 +4312,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "services.create", @@ -4409,7 +4409,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}": { @@ -4445,7 +4445,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "services.delete", @@ -4479,7 +4479,7 @@ } } ], - "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/errors": { @@ -4515,7 +4515,7 @@ } } ], - "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/errors/clear": { @@ -4544,7 +4544,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/scale": { @@ -4589,7 +4589,7 @@ } } ], - "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/sync": { @@ -4625,7 +4625,7 @@ } } ], - "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/routings/{route_id}": { @@ -4678,7 +4678,7 @@ } } ], - "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "services.delete_route", @@ -4720,7 +4720,7 @@ } } ], - "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/token": { @@ -4765,7 +4765,7 @@ } } ], - "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session": { @@ -5381,7 +5381,7 @@ "in": "query" } ], - "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/_/sync-agent-registry": { @@ -5484,7 +5484,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "session.restart", @@ -5527,7 +5527,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "session.destroy", @@ -5580,7 +5580,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "session.execute", @@ -5607,7 +5607,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/_/logs": { @@ -5646,7 +5646,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "session.get_task_logs.2", @@ -5674,7 +5674,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/direct-access-info": { @@ -5703,7 +5703,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/logs": { @@ -5741,7 +5741,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/rename": { @@ -5818,7 +5818,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/complete": { @@ -5847,7 +5847,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/shutdown-service": { @@ -5894,7 +5894,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/upload": { @@ -5923,7 +5923,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/download": { @@ -5995,7 +5995,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/download_single": { @@ -6064,7 +6064,7 @@ } } ], - "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/files": { @@ -6093,7 +6093,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/start-service": { @@ -6154,7 +6154,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/commit": { @@ -6348,7 +6348,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/pty": { @@ -6377,7 +6377,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/execute": { @@ -6406,7 +6406,7 @@ } } ], - "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/apps": { @@ -6435,7 +6435,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/httpproxy": { @@ -6498,7 +6498,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/tcpproxy": { @@ -6561,7 +6561,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/manager/status": { @@ -6884,7 +6884,7 @@ } }, "parameters": [], - "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/recalculate-usage": { @@ -6904,7 +6904,7 @@ } ], "parameters": [], - "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/usage/month": { @@ -6945,7 +6945,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/usage/period": { @@ -6992,7 +6992,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/stats/user/month": { @@ -7012,7 +7012,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/stats/admin/month": { @@ -7032,7 +7032,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher": { @@ -7061,7 +7061,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/start": { @@ -7099,7 +7099,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/stop": { @@ -7137,7 +7137,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/restart": { @@ -7175,7 +7175,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/scaling-groups": { @@ -7212,7 +7212,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/scaling-groups/{scaling_group}/wsproxy-version": { @@ -7257,7 +7257,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/cluster": { @@ -7308,7 +7308,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "template/cluster.list_template", @@ -7351,7 +7351,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/cluster/{template_id}": { @@ -7401,7 +7401,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "put": { "operationId": "template/cluster.put", @@ -7449,7 +7449,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "template/cluster.delete", @@ -7484,7 +7484,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/session": { @@ -7535,7 +7535,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "template/session.list_template", @@ -7578,7 +7578,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/session/{template_id}": { @@ -7628,7 +7628,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "put": { "operationId": "template/session.put", @@ -7686,7 +7686,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "template/session.delete", @@ -7721,7 +7721,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/user-config/dotfiles": { @@ -7771,7 +7771,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "user-config.list_or_get", @@ -7806,7 +7806,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "user-config.update", @@ -7854,7 +7854,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "user-config.delete", @@ -7889,7 +7889,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/user-config/bootstrap-script": { @@ -7927,7 +7927,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "user-config.get_bootstrap_script", @@ -7945,7 +7945,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/domain-config/dotfiles": { @@ -7996,7 +7996,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "domain-config.list_or_get", @@ -8031,7 +8031,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "domain-config.update", @@ -8080,7 +8080,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "domain-config.delete", @@ -8115,7 +8115,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" } }, "/group-config/dotfiles": { @@ -8177,7 +8177,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "group-config.list_or_get", @@ -8228,7 +8228,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "group-config.update", @@ -8288,7 +8288,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "group-config.delete", @@ -8339,7 +8339,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" } }, "/logs/error": { @@ -8411,7 +8411,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "logs/error.list_logs", @@ -8456,7 +8456,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/logs/error/{log_id}/clear": { @@ -8485,7 +8485,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } } } From d0007dbb8005bc982ec72b1b73d832ca3b273fb8 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 14 Jan 2025 09:23:34 +0000 Subject: [PATCH 08/21] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 204 +++++++++++------------ 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 6b888d1ea35..925a6a6d3ac 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -1445,7 +1445,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/events/session": { @@ -1515,7 +1515,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/auth": { @@ -2099,7 +2099,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_by_id", @@ -2155,7 +2155,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_by_name", @@ -2255,7 +2255,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/all-hosts": { @@ -2275,7 +2275,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/allowed-types": { @@ -2295,7 +2295,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/all_hosts": { @@ -2315,7 +2315,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/allowed_types": { @@ -2335,7 +2335,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/perf-metric": { @@ -2364,7 +2364,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename": { @@ -2521,7 +2521,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/request-upload": { @@ -2572,7 +2572,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/request-download": { @@ -2623,7 +2623,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/move-file": { @@ -2674,7 +2674,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename-file": { @@ -2729,7 +2729,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/delete-files": { @@ -2783,7 +2783,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_files.2", @@ -2829,7 +2829,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename_file": { @@ -2884,7 +2884,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/delete_files": { @@ -2932,7 +2932,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/files": { @@ -2969,7 +2969,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/invite": { @@ -3402,7 +3402,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/list_sent": { @@ -3422,7 +3422,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/update/{inv_id}": { @@ -3494,7 +3494,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/accept": { @@ -3627,7 +3627,7 @@ "in": "query" } ], - "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.update_shared_vfolder", @@ -3743,7 +3743,7 @@ "in": "query" } ], - "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/mounts": { @@ -3763,7 +3763,7 @@ } ], "parameters": [], - "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.mount_host", @@ -4001,7 +4001,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.update_quota", @@ -4086,7 +4086,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/used-bytes": { @@ -4124,7 +4124,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "//graphql": { @@ -4312,7 +4312,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "services.create", @@ -4409,7 +4409,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}": { @@ -4445,7 +4445,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "services.delete", @@ -4479,7 +4479,7 @@ } } ], - "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/errors": { @@ -4515,7 +4515,7 @@ } } ], - "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/errors/clear": { @@ -4544,7 +4544,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/scale": { @@ -4589,7 +4589,7 @@ } } ], - "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/sync": { @@ -4625,7 +4625,7 @@ } } ], - "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/routings/{route_id}": { @@ -4678,7 +4678,7 @@ } } ], - "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "services.delete_route", @@ -4720,7 +4720,7 @@ } } ], - "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/token": { @@ -4765,7 +4765,7 @@ } } ], - "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session": { @@ -5381,7 +5381,7 @@ "in": "query" } ], - "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/_/sync-agent-registry": { @@ -5484,7 +5484,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "session.restart", @@ -5527,7 +5527,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "session.destroy", @@ -5580,7 +5580,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "session.execute", @@ -5607,7 +5607,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/_/logs": { @@ -5646,7 +5646,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "session.get_task_logs.2", @@ -5674,7 +5674,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/direct-access-info": { @@ -5703,7 +5703,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/logs": { @@ -5741,7 +5741,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/rename": { @@ -5818,7 +5818,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/complete": { @@ -5847,7 +5847,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/shutdown-service": { @@ -5894,7 +5894,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/upload": { @@ -5923,7 +5923,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/download": { @@ -5995,7 +5995,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/download_single": { @@ -6064,7 +6064,7 @@ } } ], - "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/files": { @@ -6093,7 +6093,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/start-service": { @@ -6154,7 +6154,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/commit": { @@ -6348,7 +6348,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/pty": { @@ -6377,7 +6377,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/execute": { @@ -6406,7 +6406,7 @@ } } ], - "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/apps": { @@ -6435,7 +6435,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/httpproxy": { @@ -6498,7 +6498,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/tcpproxy": { @@ -6561,7 +6561,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/manager/status": { @@ -6884,7 +6884,7 @@ } }, "parameters": [], - "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/recalculate-usage": { @@ -6904,7 +6904,7 @@ } ], "parameters": [], - "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/usage/month": { @@ -6945,7 +6945,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/usage/period": { @@ -6992,7 +6992,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/stats/user/month": { @@ -7012,7 +7012,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/stats/admin/month": { @@ -7032,7 +7032,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher": { @@ -7061,7 +7061,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/start": { @@ -7099,7 +7099,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/stop": { @@ -7137,7 +7137,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/restart": { @@ -7175,7 +7175,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/scaling-groups": { @@ -7212,7 +7212,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/scaling-groups/{scaling_group}/wsproxy-version": { @@ -7257,7 +7257,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/cluster": { @@ -7308,7 +7308,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "template/cluster.list_template", @@ -7351,7 +7351,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/cluster/{template_id}": { @@ -7401,7 +7401,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "put": { "operationId": "template/cluster.put", @@ -7449,7 +7449,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "template/cluster.delete", @@ -7484,7 +7484,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/session": { @@ -7535,7 +7535,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "template/session.list_template", @@ -7578,7 +7578,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/session/{template_id}": { @@ -7628,7 +7628,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "put": { "operationId": "template/session.put", @@ -7686,7 +7686,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "template/session.delete", @@ -7721,7 +7721,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/user-config/dotfiles": { @@ -7771,7 +7771,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "user-config.list_or_get", @@ -7806,7 +7806,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "user-config.update", @@ -7854,7 +7854,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "user-config.delete", @@ -7889,7 +7889,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/user-config/bootstrap-script": { @@ -7927,7 +7927,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "user-config.get_bootstrap_script", @@ -7945,7 +7945,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/domain-config/dotfiles": { @@ -7996,7 +7996,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "domain-config.list_or_get", @@ -8031,7 +8031,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "domain-config.update", @@ -8080,7 +8080,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "domain-config.delete", @@ -8115,7 +8115,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" } }, "/group-config/dotfiles": { @@ -8177,7 +8177,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "group-config.list_or_get", @@ -8228,7 +8228,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "group-config.update", @@ -8288,7 +8288,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "group-config.delete", @@ -8339,7 +8339,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" } }, "/logs/error": { @@ -8411,7 +8411,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "logs/error.list_logs", @@ -8456,7 +8456,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/logs/error/{log_id}/clear": { @@ -8485,7 +8485,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } } } From a7e12d3f0a7397cfe1a0e1f4b9fa1dede59cb7a2 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Wed, 15 Jan 2025 12:42:23 +0900 Subject: [PATCH 09/21] fix: API handlers should use the name-or-id resolve vfolder records instead of directly reading request.match_info --- src/ai/backend/manager/api/vfolder.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/ai/backend/manager/api/vfolder.py b/src/ai/backend/manager/api/vfolder.py index 69cf8e88875..f84a1afe991 100644 --- a/src/ai/backend/manager/api/vfolder.py +++ b/src/ai/backend/manager/api/vfolder.py @@ -943,7 +943,7 @@ async def list_allowed_types(request: web.Request) -> web.Response: async def get_info(request: web.Request, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] resp: Dict[str, Any] = {} - folder_name = request.match_info["name"] + folder_name = row["name"] access_key = request["keypair"]["access_key"] log.info( "VFOLDER.GETINFO (email:{}, ak:{}, vf:{})", @@ -1210,13 +1210,14 @@ class RenameRequestModel(BaseModel): @server_status_required(ALL_ALLOWED) @pydantic_params_api_handler(RenameRequestModel) @with_vfolder_rows_resolved(VFolderPermission.OWNER_PERM) +@with_vfolder_status_checked(VFolderStatusSet.READABLE) async def rename_vfolder( request: web.Request, - row: Sequence[VFolderRow], + row: VFolderRow, params: RenameRequestModel, ) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - old_name = request.match_info["name"] + old_name = row["name"] access_key = request["keypair"]["access_key"] domain_name = request["user"]["domain_name"] user_role = request["user"]["role"] @@ -1330,7 +1331,7 @@ async def mkdir(request: web.Request, params: Any, row: VFolderRow) -> web.Respo if isinstance(params["path"], list) and len(params["path"]) > 50: raise InvalidAPIParameters("Too many directories specified.") root_ctx: RootContext = request.app["_root.context"] - folder_name = request.match_info["name"] + folder_name = row["name"] access_key = request["keypair"]["access_key"] log.info( "VFOLDER.MKDIR (email:{}, ak:{}, vf:{}, paths:{})", @@ -1432,7 +1433,7 @@ async def create_download_session( ) async def create_upload_session(request: web.Request, params: Any, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - folder_name = request.match_info["name"] + folder_name = row["name"] access_key = request["keypair"]["access_key"] log_fmt = "VFOLDER.CREATE_UPLOAD_SESSION (email:{}, ak:{}, vf:{}, path:{})" log_args = (request["user"]["email"], access_key, folder_name, params["path"]) @@ -1485,7 +1486,7 @@ async def create_upload_session(request: web.Request, params: Any, row: VFolderR ) async def rename_file(request: web.Request, params: Any, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - folder_name = request.match_info["name"] + folder_name = row["name"] access_key = request["keypair"]["access_key"] user_uuid = request["user"]["uuid"] domain_name = request["user"]["domain_name"] @@ -1538,7 +1539,7 @@ async def rename_file(request: web.Request, params: Any, row: VFolderRow) -> web ) async def move_file(request: web.Request, params: Any, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - folder_name = request.match_info["name"] + folder_name = row["name"] access_key = request["keypair"]["access_key"] log.info( "VFOLDER.MOVE_FILE (email:{}, ak:{}, vf:{}, src:{}, dst:{})", @@ -1576,7 +1577,7 @@ async def move_file(request: web.Request, params: Any, row: VFolderRow) -> web.R ) async def delete_files(request: web.Request, params: Any, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - folder_name = request.match_info["name"] + folder_name = row["name"] access_key = request["keypair"]["access_key"] recursive = params["recursive"] log.info( @@ -1616,7 +1617,7 @@ async def list_files(request: web.Request, params: Any, row: VFolderRow) -> web. # we can skip check_vfolder_status() guard here since the status is already verified by # vfolder_permission_required() decorator root_ctx: RootContext = request.app["_root.context"] - folder_name = request.match_info["name"] + folder_name = row["name"] access_key = request["keypair"]["access_key"] log.info( "VFOLDER.LIST_FILES (email:{}, ak:{}, vf:{}, path:{})", @@ -1751,7 +1752,7 @@ async def update_invitation(request: web.Request, params: Any) -> web.Response: ) async def invite(request: web.Request, params: Any, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - folder_name = request.match_info["name"] + folder_name = row["name"] access_key = request["keypair"]["access_key"] user_uuid = request["user"]["uuid"] perm = params["perm"] @@ -2079,7 +2080,7 @@ async def share(request: web.Request, params: Any, row: VFolderRow) -> web.Respo """ root_ctx: RootContext = request.app["_root.context"] access_key = request["keypair"]["access_key"] - folder_name = request.match_info["name"] + folder_name = row["name"] log.info( "VFOLDER.SHARE (email:{}, ak:{}, vf:{}, perm:{}, users:{})", request["user"]["email"], @@ -2199,7 +2200,7 @@ async def unshare(request: web.Request, params: Any, row: VFolderRow) -> web.Res """ root_ctx: RootContext = request.app["_root.context"] access_key = request["keypair"]["access_key"] - folder_name = request.match_info["name"] + folder_name = row["name"] log.info( "VFOLDER.UNSHARE (email:{}, ak:{}, vf:{}, users:{})", request["user"]["email"], From 8bc4b489549f83cf7a6c3c325d63e2607e16c32b Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Wed, 15 Jan 2025 15:45:39 +0900 Subject: [PATCH 10/21] fix: Explicitly log the requested vfolder name-or-id and the resolved vfolder ID --- src/ai/backend/manager/api/vfolder.py | 319 +++++++++++--------------- 1 file changed, 136 insertions(+), 183 deletions(-) diff --git a/src/ai/backend/manager/api/vfolder.py b/src/ai/backend/manager/api/vfolder.py index f84a1afe991..103ad136401 100644 --- a/src/ai/backend/manager/api/vfolder.py +++ b/src/ai/backend/manager/api/vfolder.py @@ -689,10 +689,12 @@ async def create(request: web.Request, params: CreateRequestModel) -> web.Respon async def list_folders(request: web.Request, params: Any) -> web.Response: resp = [] root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] domain_name = request["user"]["domain_name"] - - log.info("VFOLDER.LIST (email:{}, ak:{})", request["user"]["email"], access_key) + log.info( + "VFOLDER.LIST (email:{}, ak:{})", + request["user"]["email"], + request["keypair"]["access_key"], + ) entries: List[Mapping[str, Any]] | Sequence[Mapping[str, Any]] owner_user_uuid, owner_user_role = await get_user_scopes(request, params) async with root_ctx.db.begin_readonly() as conn: @@ -814,11 +816,10 @@ async def fetch_exposed_volume_fields( ) async def list_hosts(request: web.Request, params: Any) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] log.info( "VFOLDER.LIST_HOSTS (emai:{}, ak:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], ) domain_name = request["user"]["domain_name"] group_id = params["group_id"] @@ -876,11 +877,10 @@ async def list_hosts(request: web.Request, params: Any) -> web.Response: @server_status_required(READ_ALLOWED) async def list_all_hosts(request: web.Request) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] log.info( "VFOLDER.LIST_ALL_HOSTS (email:{}, ak:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], ) all_volumes = await root_ctx.storage_manager.get_all_volumes() all_hosts = {f"{proxy_name}:{volume_data['name']}" for proxy_name, volume_data in all_volumes} @@ -903,11 +903,10 @@ async def list_all_hosts(request: web.Request) -> web.Response: ) async def get_volume_perf_metric(request: web.Request, params: Any) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] log.info( "VFOLDER.VOLUME_PERF_METRIC (email:{}, ak:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], ) proxy_name, volume_name = root_ctx.storage_manager.split_host(params["folder_host"]) async with root_ctx.storage_manager.request( @@ -926,11 +925,10 @@ async def get_volume_perf_metric(request: web.Request, params: Any) -> web.Respo @server_status_required(READ_ALLOWED) async def list_allowed_types(request: web.Request) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] log.info( "VFOLDER.LIST_ALLOWED_TYPES (email:{}, ak:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], ) allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() return web.json_response(allowed_vfolder_types, status=200) @@ -943,13 +941,12 @@ async def list_allowed_types(request: web.Request) -> web.Response: async def get_info(request: web.Request, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] resp: Dict[str, Any] = {} - folder_name = row["name"] - access_key = request["keypair"]["access_key"] log.info( - "VFOLDER.GETINFO (email:{}, ak:{}, vf:{})", + "VFOLDER.GETINFO (email:{}, ak:{}, vf:{} (resolved-from:{!r}))", request["user"]["email"], - access_key, - folder_name, + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], ) if row["permission"] is None: is_owner = True @@ -1217,19 +1214,19 @@ async def rename_vfolder( params: RenameRequestModel, ) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - old_name = row["name"] - access_key = request["keypair"]["access_key"] domain_name = request["user"]["domain_name"] user_role = request["user"]["role"] user_uuid = request["user"]["uuid"] resource_policy = request["keypair"]["resource_policy"] + old_name = row["name"] new_name = params.new_name allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() log.info( - "VFOLDER.RENAME (email:{}, ak:{}, vf.old:{}, vf.new:{})", + "VFOLDER.RENAME (email:{}, ak:{}, vf:{} (resolved-from:{!r}), new-name:{})", request["user"]["email"], - access_key, - old_name, + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], new_name, ) async with root_ctx.db.begin() as conn: @@ -1286,6 +1283,13 @@ async def update_vfolder_options( domain_name = request["user"]["domain_name"] resource_policy = request["keypair"]["resource_policy"] allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() + log.info( + "VFOLDER.UPDATE_OPTIONS (email:{}, ak:{}, vf:{} (resolved-from:{!r}))", + request["user"]["email"], + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], + ) async with root_ctx.db.begin_readonly() as conn: query = sa.select([vfolders.c.host]).select_from(vfolders).where(vfolders.c.id == row["id"]) folder_host = await conn.scalar(query) @@ -1331,13 +1335,12 @@ async def mkdir(request: web.Request, params: Any, row: VFolderRow) -> web.Respo if isinstance(params["path"], list) and len(params["path"]) > 50: raise InvalidAPIParameters("Too many directories specified.") root_ctx: RootContext = request.app["_root.context"] - folder_name = row["name"] - access_key = request["keypair"]["access_key"] log.info( - "VFOLDER.MKDIR (email:{}, ak:{}, vf:{}, paths:{})", + "VFOLDER.MKDIR (email:{}, ak:{}, vf:{} (resolved-from:{!r}), paths:{})", request["user"]["email"], - access_key, - folder_name, + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], params["path"], ) proxy_name, volume_name = root_ctx.storage_manager.split_host(row["host"]) @@ -1376,14 +1379,14 @@ async def create_download_session( request: web.Request, params: Any, row: VFolderRow ) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - log_fmt = "VFOLDER.CREATE_DOWNLOAD_SESSION(email:{}, ak:{}, vf:{}, path:{})" - log_args = ( + log.info( + "VFOLDER.CREATE_DOWNLOAD_SESSION(email:{}, ak:{}, vf:{} (resolved-from:{!r}), path:{})", request["user"]["email"], request["keypair"]["access_key"], - row["name"], + row["id"], + request.match_info["name"], params["path"], ) - log.info(log_fmt, *log_args) unmanaged_path = row["unmanaged_path"] user_uuid = request["user"]["uuid"] folder_host = row["host"] @@ -1433,11 +1436,14 @@ async def create_download_session( ) async def create_upload_session(request: web.Request, params: Any, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - folder_name = row["name"] - access_key = request["keypair"]["access_key"] - log_fmt = "VFOLDER.CREATE_UPLOAD_SESSION (email:{}, ak:{}, vf:{}, path:{})" - log_args = (request["user"]["email"], access_key, folder_name, params["path"]) - log.info(log_fmt, *log_args) + log.info( + "VFOLDER.CREATE_UPLOAD_SESSION (email:{}, ak:{}, vf:{} (resolved-from:{!r}), path:{})", + request["user"]["email"], + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], + params["path"], + ) user_uuid = request["user"]["uuid"] domain_name = request["user"]["domain_name"] folder_host = row["host"] @@ -1486,8 +1492,6 @@ async def create_upload_session(request: web.Request, params: Any, row: VFolderR ) async def rename_file(request: web.Request, params: Any, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - folder_name = row["name"] - access_key = request["keypair"]["access_key"] user_uuid = request["user"]["uuid"] domain_name = request["user"]["domain_name"] folder_host = row["host"] @@ -1504,10 +1508,11 @@ async def rename_file(request: web.Request, params: Any, row: VFolderRow) -> web permission=VFolderHostPermission.MODIFY, ) log.info( - "VFOLDER.RENAME_FILE (email:{}, ak:{}, vf:{}, target_path:{}, new_name:{})", + "VFOLDER.RENAME_FILE (email:{}, ak:{}, vf:{} (resolved-from:{!r}), target_path:{}, new_name:{})", request["user"]["email"], - access_key, - folder_name, + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], params["target_path"], params["new_name"], ) @@ -1539,13 +1544,12 @@ async def rename_file(request: web.Request, params: Any, row: VFolderRow) -> web ) async def move_file(request: web.Request, params: Any, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - folder_name = row["name"] - access_key = request["keypair"]["access_key"] log.info( - "VFOLDER.MOVE_FILE (email:{}, ak:{}, vf:{}, src:{}, dst:{})", + "VFOLDER.MOVE_FILE (email:{}, ak:{}, vf:{} (resolved-from:{!r}), src:{}, dst:{})", request["user"]["email"], - access_key, - folder_name, + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], params["src"], params["dst"], ) @@ -1577,14 +1581,13 @@ async def move_file(request: web.Request, params: Any, row: VFolderRow) -> web.R ) async def delete_files(request: web.Request, params: Any, row: VFolderRow) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - folder_name = row["name"] - access_key = request["keypair"]["access_key"] recursive = params["recursive"] log.info( - "VFOLDER.DELETE_FILES (email:{}, ak:{}, vf:{}, path:{}, recursive:{})", + "VFOLDER.DELETE_FILES (email:{}, ak:{}, vf:{} (resolved-from:{!r}), path:{}, recursive:{})", request["user"]["email"], - access_key, - folder_name, + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], params["files"], recursive, ) @@ -1617,13 +1620,12 @@ async def list_files(request: web.Request, params: Any, row: VFolderRow) -> web. # we can skip check_vfolder_status() guard here since the status is already verified by # vfolder_permission_required() decorator root_ctx: RootContext = request.app["_root.context"] - folder_name = row["name"] - access_key = request["keypair"]["access_key"] log.info( - "VFOLDER.LIST_FILES (email:{}, ak:{}, vf:{}, path:{})", + "VFOLDER.LIST_FILES (email:{}, ak:{}, vf:{} (resolved-from:{!r}), path:{})", request["user"]["email"], - access_key, - folder_name, + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], params["path"], ) proxy_name, volume_name = root_ctx.storage_manager.split_host(row["host"]) @@ -1669,11 +1671,10 @@ async def list_files(request: web.Request, params: Any, row: VFolderRow) -> web. @server_status_required(READ_ALLOWED) async def list_sent_invitations(request: web.Request) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] log.info( "VFOLDER.LIST_SENT_INVITATIONS (email:{}, ak:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], ) async with root_ctx.db.begin() as conn: j = sa.join(vfolders, vfolder_invitations, vfolders.c.id == vfolder_invitations.c.vfolder) @@ -1716,13 +1717,12 @@ async def update_invitation(request: web.Request, params: Any) -> web.Response: Update sent invitation's permission. Other fields are not allowed to be updated. """ root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] inv_id = request.match_info["inv_id"] perm = params["perm"] log.info( "VFOLDER.UPDATE_INVITATION (email:{}, ak:{}, inv:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], inv_id, ) async with root_ctx.db.begin() as conn: @@ -1758,10 +1758,11 @@ async def invite(request: web.Request, params: Any, row: VFolderRow) -> web.Resp perm = params["perm"] invitee_emails = params["emails"] log.info( - "VFOLDER.INVITE (email:{}, ak:{}, vf:{}, inv.users:{})", + "VFOLDER.INVITE (email:{}, ak:{}, vf:{} (resolved-from:{!r}), inv.users:{})", request["user"]["email"], access_key, - folder_name, + row["id"], + request.match_info["name"], ",".join(invitee_emails), ) domain_name = request["user"]["domain_name"] @@ -1877,11 +1878,10 @@ async def invite(request: web.Request, params: Any, row: VFolderRow) -> web.Resp @server_status_required(READ_ALLOWED) async def invitations(request: web.Request) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] log.info( "VFOLDER.INVITATIONS (email:{}, ak:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], ) async with root_ctx.db.begin() as conn: j = sa.join(vfolders, vfolder_invitations, vfolders.c.id == vfolder_invitations.c.vfolder) @@ -1928,13 +1928,12 @@ async def accept_invitation(request: web.Request, params: Any) -> web.Response: :param inv_id: ID of vfolder_invitations row. """ root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] user_uuid = request["user"]["uuid"] inv_id = params["inv_id"] log.info( "VFOLDER.ACCEPT_INVITATION (email:{}, ak:{}, inv:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], inv_id, ) async with root_ctx.db.begin() as conn: @@ -2013,13 +2012,12 @@ async def accept_invitation(request: web.Request, params: Any) -> web.Response: ) async def delete_invitation(request: web.Request, params: Any) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] request_email = request["user"]["email"] inv_id = params["inv_id"] log.info( "VFOLDER.DELETE_INVITATION (email:{}, ak:{}, inv:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], inv_id, ) try: @@ -2062,7 +2060,7 @@ async def delete_invitation(request: web.Request, params: Any) -> web.Response: @admin_required @server_status_required(ALL_ALLOWED) -@with_vfolder_rows_resolved(VFolderPermission.OWNER_PERM) +@with_vfolder_rows_resolved(VFolderPermission.READ_ONLY) @with_vfolder_status_checked(VFolderStatusSet.UPDATABLE) @check_api_params( t.Dict({ @@ -2079,42 +2077,27 @@ async def share(request: web.Request, params: Any, row: VFolderRow) -> web.Respo be shared directly. """ root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] - folder_name = row["name"] log.info( - "VFOLDER.SHARE (email:{}, ak:{}, vf:{}, perm:{}, users:{})", + "VFOLDER.SHARE (email:{}, ak:{}, vf:{} (resolved-from:{!r}), perm:{}, users:{})", request["user"]["email"], - access_key, - folder_name, + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], params["permission"], ",".join(params["emails"]), ) user_uuid = request["user"]["uuid"] domain_name = request["user"]["domain_name"] resource_policy = request["keypair"]["resource_policy"] + if row["ownership_type"] != VFolderOwnershipType.GROUP: + raise VFolderNotFound("Only project folders are directly sharable.") async with root_ctx.db.begin() as conn: from ..models import association_groups_users as agus - # Get the group-type virtual folder. - query = ( - sa.select([vfolders.c.id, vfolders.c.host, vfolders.c.ownership_type, vfolders.c.group]) - .select_from(vfolders) - .where( - (vfolders.c.ownership_type == VFolderOwnershipType.GROUP) - & (vfolders.c.name == folder_name), - ) - ) - result = await conn.execute(query) - vf_infos = result.fetchall() - if len(vf_infos) < 1: - raise VFolderNotFound("Only project folders are directly sharable.") - if len(vf_infos) > 1: - raise InternalServerError(f"Multiple project folders found: {folder_name}") - vf_info = vf_infos[0] allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() await ensure_host_permission_allowed( conn, - vf_info["host"], + row["host"], allowed_vfolder_types=allowed_vfolder_types, user_uuid=user_uuid, resource_policy=resource_policy, @@ -2130,7 +2113,7 @@ async def share(request: web.Request, params: Any, row: VFolderRow) -> web.Respo .where( (users.c.email.in_(params["emails"])) & (users.c.email != request["user"]["email"]) - & (agus.c.group_id == vf_info["group"]) + & (agus.c.group_id == row["group"]) & (users.c.status.in_(ACTIVE_USER_STATUSES)), ) ) @@ -2154,7 +2137,7 @@ async def share(request: web.Request, params: Any, row: VFolderRow) -> web.Respo .select_from(vfolder_permissions) .where( (vfolder_permissions.c.user.in_(users_to_share)) - & (vfolder_permissions.c.vfolder == vf_info["id"]), + & (vfolder_permissions.c.vfolder == row["id"]), ) ) result = await conn.execute(query) @@ -2167,7 +2150,7 @@ async def share(request: web.Request, params: Any, row: VFolderRow) -> web.Respo vfolder_permissions, { "permission": params["permission"], - "vfolder": vf_info["id"], + "vfolder": row["id"], "user": _user, }, ) @@ -2177,7 +2160,7 @@ async def share(request: web.Request, params: Any, row: VFolderRow) -> web.Respo query = ( sa.update(vfolder_permissions) .values(permission=params["permission"]) - .where(vfolder_permissions.c.vfolder == vf_info["id"]) + .where(vfolder_permissions.c.vfolder == row["id"]) .where(vfolder_permissions.c.user == _user) ) await conn.execute(query) @@ -2187,7 +2170,7 @@ async def share(request: web.Request, params: Any, row: VFolderRow) -> web.Respo @admin_required @server_status_required(ALL_ALLOWED) -@with_vfolder_rows_resolved(VFolderPermission.OWNER_PERM) +@with_vfolder_rows_resolved(VFolderPermission.READ_ONLY) @with_vfolder_status_checked(VFolderStatusSet.UPDATABLE) @check_api_params( t.Dict({ @@ -2199,39 +2182,24 @@ async def unshare(request: web.Request, params: Any, row: VFolderRow) -> web.Res Unshare a group folder from users. """ root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] - folder_name = row["name"] log.info( - "VFOLDER.UNSHARE (email:{}, ak:{}, vf:{}, users:{})", + "VFOLDER.UNSHARE (email:{}, ak:{}, vf:{} (resolved-from:{!r}), users:{})", request["user"]["email"], - access_key, - folder_name, + request["keypair"]["access_key"], + row["id"], + request.match_info["name"], ",".join(params["emails"]), ) user_uuid = request["user"]["uuid"] domain_name = request["user"]["domain_name"] resource_policy = request["keypair"]["resource_policy"] + if row["ownership_type"] != VFolderOwnershipType.GROUP: + raise VFolderNotFound("Only project folders are directly unsharable.") async with root_ctx.db.begin() as conn: - # Get the group-type virtual folder. - query = ( - sa.select([vfolders.c.id, vfolders.c.host]) - .select_from(vfolders) - .where( - (vfolders.c.ownership_type == VFolderOwnershipType.GROUP) - & (vfolders.c.name == folder_name), - ) - ) - result = await conn.execute(query) - vf_infos = result.fetchall() - if len(vf_infos) < 1: - raise VFolderNotFound("Only project folders are directly unsharable.") - if len(vf_infos) > 1: - raise InternalServerError(f"Multiple project folders found: {folder_name}") - vf_info = vf_infos[0] allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() await ensure_host_permission_allowed( conn, - vf_info["host"], + row["host"], allowed_vfolder_types=allowed_vfolder_types, user_uuid=user_uuid, resource_policy=resource_policy, @@ -2250,7 +2218,7 @@ async def unshare(request: web.Request, params: Any, row: VFolderRow) -> web.Res # Delete vfolder_permission(s). query = sa.delete(vfolder_permissions).where( - (vfolder_permissions.c.vfolder == vf_info["id"]) + (vfolder_permissions.c.vfolder == row["id"]) & (vfolder_permissions.c.user.in_(users_to_unshare)), ) await conn.execute(query) @@ -2259,7 +2227,7 @@ async def unshare(request: web.Request, params: Any, row: VFolderRow) -> web.Res async def _delete( root_ctx: RootContext, - condition: sa.sql.BinaryExpression, + vfolder_row: VFolderRow, user_uuid: uuid.UUID, user_role: UserRole, domain_name: str, @@ -2267,39 +2235,20 @@ async def _delete( resource_policy: Mapping[str, Any], ) -> None: async with root_ctx.db.begin_readonly_session() as db_session: - db_conn = db_session.bind - entries = await query_accessible_vfolders( - db_conn, - user_uuid, - allow_privileged_access=True, - user_role=user_role, - domain_name=domain_name, - allowed_vfolder_types=allowed_vfolder_types, - extra_vf_conds=condition, - ) - if len(entries) > 1: - raise TooManyVFoldersFound( - extra_msg="Multiple folders with the same name.", - extra_data=[entry["host"] for entry in entries], - ) - elif len(entries) == 0: - raise InvalidAPIParameters("No such vfolder.") - # query_accesible_vfolders returns list - entry = entries[0] # Folder owner OR user who have DELETE permission can delete folder. - if not entry["is_owner"] and entry["permission"] != VFolderPermission.RW_DELETE: + if not vfolder_row["is_owner"] and vfolder_row["permission"] != VFolderPermission.RW_DELETE: raise InvalidAPIParameters("Cannot delete the vfolder that is not owned by myself.") # perform extra check to make sure records of alive model service not removed by foreign key rule - if entry["usage_mode"] == VFolderUsageMode.MODEL: - live_endpoints = await EndpointRow.list_by_model(db_session, entry["id"]) + if vfolder_row["usage_mode"] == VFolderUsageMode.MODEL: + live_endpoints = await EndpointRow.list_by_model(db_session, vfolder_row["id"]) if ( len([e for e in live_endpoints if e.lifecycle_stage == EndpointLifecycle.CREATED]) > 0 ): raise ModelServiceDependencyNotCleared - folder_host = entry["host"] + folder_host = vfolder_row["host"] await ensure_host_permission_allowed( - db_conn, + db_session.bind, folder_host, allowed_vfolder_types=allowed_vfolder_types, user_uuid=user_uuid, @@ -2308,7 +2257,7 @@ async def _delete( permission=VFolderHostPermission.DELETE, ) - vfolder_row_ids = (entry["id"],) + vfolder_row_ids = (vfolder_row["id"],) async with root_ctx.db.connect() as db_conn: await delete_vfolder_relation_rows(db_conn, root_ctx.db.begin_session, vfolder_row_ids) await update_vfolder_status( @@ -2354,7 +2303,7 @@ async def delete_by_id(request: web.Request, params: DeleteRequestModel) -> web. try: await _delete( root_ctx, - (vfolders.c.id == folder_id), + row, user_uuid, user_role, domain_name, @@ -2378,20 +2327,12 @@ async def delete_by_name(request: web.Request) -> web.Response: root_ctx: RootContext = request.app["_root.context"] folder_name = request.match_info["name"] - access_key = request["keypair"]["access_key"] domain_name = request["user"]["domain_name"] user_role = request["user"]["role"] user_uuid = request["user"]["uuid"] allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() resource_policy = request["keypair"]["resource_policy"] - log.info( - "VFOLDER.DELETE (email:{}, ak:{}, vf:{})", - request["user"]["email"], - access_key, - folder_name, - ) - rows = await resolve_vfolder_rows( request, VFolderPermission.OWNER_PERM, folder_name, allow_privileged_access=True ) @@ -2404,9 +2345,16 @@ async def delete_by_name(request: web.Request) -> web.Response: else: raise VFolderFilterStatusFailed + log.info( + "VFOLDER.DELETE_BY_NAME (email:{}, ak:{}, vf:{} (resolved-from:{!r}))", + request["user"]["email"], + request["keypair"]["access_key"], + row["id"], + folder_name, + ) await _delete( root_ctx, - (vfolders.c.id == row["id"]), + row, user_uuid, user_role, domain_name, @@ -2442,7 +2390,7 @@ async def get_vfolder_id(request: web.Request, params: IDRequestModel) -> Compac allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() log.info( - "VFOLDER.GET_ID (email:{}, ak:{}, vf:{})", + "VFOLDER.GET_ID (email:{}, ak:{}, name:{})", request["user"]["email"], access_key, folder_name, @@ -2493,17 +2441,20 @@ async def delete_from_trash_bin( root_ctx: RootContext = request.app["_root.context"] app_ctx: PrivateContext = request.app["folders.context"] folder_id = params.vfolder_id - access_key = request["keypair"]["access_key"] domain_name = request["user"]["domain_name"] user_role = request["user"]["role"] user_uuid = request["user"]["uuid"] allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() + log.info( "VFOLDER.DELETE_FROM_TRASH_BIN (email:{}, ak:{}, vf:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], folder_id, ) + + # TODO: replace with @with_vfolder_rows_resolved + @with_vfolder_status_checked + # --- from here --- row = ( await resolve_vfolder_rows( request, VFolderPermission.OWNER_PERM, folder_id, allow_privileged_access=True @@ -2521,8 +2472,6 @@ async def delete_from_trash_bin( allowed_vfolder_types=allowed_vfolder_types, extra_vf_conds=(vfolders.c.id == folder_id), ) - # FIXME: For now, deleting multiple VFolders at once will raise an error. - # This behavior should be fixed in 24.03 if len(entries) > 1: log.error( "VFOLDER.DELETE_FROM_TRASH_BIN(folder id:{}, hosts:{}", @@ -2535,14 +2484,13 @@ async def delete_from_trash_bin( ) elif len(entries) == 0: raise InvalidAPIParameters("No such vfolder.") - # query_accesible_vfolders returns list - entry = entries[0] + row = entries[0] + # --- until here --- - folder_host = entry["host"] # fs-level deletion may fail or take longer time await initiate_vfolder_deletion( root_ctx.db, - [VFolderDeletionInfo(VFolderID.from_row(entry), folder_host)], + [VFolderDeletionInfo(VFolderID.from_row(row), row["host"])], root_ctx.storage_manager, app_ctx.storage_ptask_group, ) @@ -2565,11 +2513,10 @@ async def purge(request: web.Request, params: PurgeRequestModel) -> web.Response """ root_ctx: RootContext = request.app["_root.context"] folder_id = params.vfolder_id - access_key = request["keypair"]["access_key"] log.info( "VFOLDER.PURGE (email:{}, ak:{}, vf:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], folder_id, ) if request["user"]["role"] not in ( @@ -2606,7 +2553,6 @@ async def restore(request: web.Request, params: RestoreRequestModel) -> web.Resp """ root_ctx: RootContext = request.app["_root.context"] folder_id = params.vfolder_id - access_key = request["keypair"]["access_key"] domain_name = request["user"]["domain_name"] user_role = request["user"]["role"] user_uuid = request["user"]["uuid"] @@ -2614,10 +2560,12 @@ async def restore(request: web.Request, params: RestoreRequestModel) -> web.Resp log.info( "VFOLDER.RESTORE (email: {}, ak:{}, vf:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], folder_id, ) + # TODO: replace with @with_vfolder_rows_resolved + @with_vfolder_status_checked + # --- from here --- row = ( await resolve_vfolder_rows( request, VFolderPermission.OWNER_PERM, folder_id, allow_privileged_access=True @@ -2635,7 +2583,6 @@ async def restore(request: web.Request, params: RestoreRequestModel) -> web.Resp allowed_vfolder_types=allowed_vfolder_types, extra_vf_conds=(vfolders.c.id == folder_id), ) - # FIXME: For now, multiple entries on restore vfolder will raise an error. if len(restore_targets) > 1: log.error( "VFOLDER.RESTORE(email:{}, folder id:{}, hosts:{})", @@ -2650,15 +2597,16 @@ async def restore(request: web.Request, params: RestoreRequestModel) -> web.Resp elif len(restore_targets) == 0: raise InvalidAPIParameters("No such vfolder.") - # query_accesible_vfolders returns list - entry = restore_targets[0] - # Folder owner OR user who have DELETE permission can restore folder. - if not entry["is_owner"] and entry["permission"] != VFolderPermission.RW_DELETE: - raise InvalidAPIParameters("Cannot restore the vfolder that is not owned by myself.") + row = restore_targets[0] + # --- until here --- + + # Folder owner OR user who have DELETE permission can restore folder. + if not row["is_owner"] and row["permission"] != VFolderPermission.RW_DELETE: + raise InvalidAPIParameters("Cannot restore the vfolder that is not owned by myself.") # fs-level mv may fail or take longer time # but let's complete the db transaction to reflect that it's deleted. - await update_vfolder_status(root_ctx.db, (entry["id"],), VFolderOperationStatus.READY) + await update_vfolder_status(root_ctx.db, (row["id"],), VFolderOperationStatus.READY) return web.Response(status=204) @@ -2699,10 +2647,11 @@ async def leave(request: web.Request, params: Any, row: VFolderRow) -> web.Respo user_uuid = rqst_user_uuid log.info( - "VFOLDER.LEAVE(email:{}, ak:{}, vfid:{}, uid:{}, perm:{})", + "VFOLDER.LEAVE(email:{}, ak:{}, vf:{} (resolved-from:{!r}), uid:{}, perm:{})", request["user"]["email"], access_key, vfolder_id, + request.match_info["name"], user_uuid, perm, ) @@ -2739,10 +2688,11 @@ async def clone(request: web.Request, params: Any, row: VFolderRow) -> web.Respo resource_policy = request["keypair"]["resource_policy"] domain_name = request["user"]["domain_name"] log.info( - "VFOLDER.CLONE (email:{}, ak:{}, vf:{}, vft:{}, vfh:{}, umod:{}, perm:{})", + "VFOLDER.CLONE (email:{}, ak:{}, vf:{} (resolved-from:{!r}), vft:{}, vfh:{}, umod:{}, perm:{})", request["user"]["email"], access_key, - row["name"], + row["id"], + request.match_info["name"], params["target_name"], params["folder_host"], params["usage_mode"].value, @@ -2905,12 +2855,12 @@ async def list_shared_vfolders(request: web.Request, params: Any) -> web.Respons Not available for group vfolders. """ root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] target_vfid = params["vfolder_id"] log.info( - "VFOLDER.LIST_SHARED_VFOLDERS (email:{}, ak:{})", + "VFOLDER.LIST_SHARED_VFOLDERS (email:{}, ak:{}, vf:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], + target_vfid, ) async with root_ctx.db.begin() as conn: j = vfolder_permissions.join(vfolders, vfolders.c.id == vfolder_permissions.c.vfolder).join( @@ -2970,7 +2920,7 @@ async def update_shared_vfolder(request: web.Request, params: Any) -> web.Respon user_uuid = params["user"] perm = params["perm"] log.info( - "VFOLDER.UPDATE_SHARED_VFOLDER(email:{}, ak:{}, vfid:{}, uid:{}, perm:{})", + "VFOLDER.UPDATE_SHARED_VFOLDER(email:{}, ak:{}, vf:{}, uid:{}, perm:{})", request["user"]["email"], access_key, vfolder_id, @@ -3049,7 +2999,7 @@ async def update_vfolder_sharing_status( vfolder_id = params.vfolder_id user_perm_list = params.user_perm_list log.info( - "VFOLDER.UPDATE_VFOLDER_SHARING_STATUS(email:{}, ak:{}, vfid:{}, data:{})", + "VFOLDER.UPDATE_VFOLDER_SHARING_STATUS(email:{}, ak:{}, vf:{}, data:{})", request["user"]["email"], access_key, vfolder_id, @@ -3173,7 +3123,10 @@ async def list_mounts(request: web.Request) -> web.Response: """ root_ctx: RootContext = request.app["_root.context"] access_key = request["keypair"]["access_key"] - log.info("VFOLDER.LIST_MOUNTS(ak:{})", access_key) + log.info( + "VFOLDER.LIST_MOUNTS(ak:{})", + access_key, + ) mount_prefix = await root_ctx.shared_config.get_raw("volumes/_mount") if mount_prefix is None: mount_prefix = "/mnt" From 2213b4f12920cbecbaf328a5093d66dd17c29f49 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Wed, 15 Jan 2025 15:52:34 +0900 Subject: [PATCH 11/21] fix: Revive multi-match check in delete_by_name() --- src/ai/backend/manager/api/vfolder.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/ai/backend/manager/api/vfolder.py b/src/ai/backend/manager/api/vfolder.py index 103ad136401..fbc0992834f 100644 --- a/src/ai/backend/manager/api/vfolder.py +++ b/src/ai/backend/manager/api/vfolder.py @@ -2336,14 +2336,13 @@ async def delete_by_name(request: web.Request) -> web.Response: rows = await resolve_vfolder_rows( request, VFolderPermission.OWNER_PERM, folder_name, allow_privileged_access=True ) - for row in rows: - try: - await check_vfolder_status(row, VFolderStatusSet.DELETABLE) - break - except VFolderFilterStatusFailed: - continue - else: - raise VFolderFilterStatusFailed + if len(rows) > 1: + raise TooManyVFoldersFound( + extra_msg="Multiple folders with the same name.", + extra_data=[row["host"] for row in rows], + ) + row = rows[0] + await check_vfolder_status(row, VFolderStatusSet.DELETABLE) log.info( "VFOLDER.DELETE_BY_NAME (email:{}, ak:{}, vf:{} (resolved-from:{!r}))", From c136dab81bd2e8fb8d5c74711146d5fb873f8fc0 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Wed, 15 Jan 2025 19:53:52 +0900 Subject: [PATCH 12/21] refactor: We can live a more simpler life. --- src/ai/backend/manager/api/vfolder.py | 117 +++++++++----------------- 1 file changed, 42 insertions(+), 75 deletions(-) diff --git a/src/ai/backend/manager/api/vfolder.py b/src/ai/backend/manager/api/vfolder.py index fbc0992834f..21522d07b1e 100644 --- a/src/ai/backend/manager/api/vfolder.py +++ b/src/ai/backend/manager/api/vfolder.py @@ -2231,13 +2231,13 @@ async def _delete( user_uuid: uuid.UUID, user_role: UserRole, domain_name: str, - allowed_vfolder_types: Sequence[str], resource_policy: Mapping[str, Any], ) -> None: + # Only the effective folder owner can delete the folder. + if not vfolder_row["is_owner"]: + raise InvalidAPIParameters("Cannot delete the vfolder that is not owned by myself.") + await check_vfolder_status(vfolder_row, VFolderStatusSet.DELETABLE) async with root_ctx.db.begin_readonly_session() as db_session: - # Folder owner OR user who have DELETE permission can delete folder. - if not vfolder_row["is_owner"] and vfolder_row["permission"] != VFolderPermission.RW_DELETE: - raise InvalidAPIParameters("Cannot delete the vfolder that is not owned by myself.") # perform extra check to make sure records of alive model service not removed by foreign key rule if vfolder_row["usage_mode"] == VFolderUsageMode.MODEL: live_endpoints = await EndpointRow.list_by_model(db_session, vfolder_row["id"]) @@ -2247,6 +2247,7 @@ async def _delete( ): raise ModelServiceDependencyNotCleared folder_host = vfolder_row["host"] + allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() await ensure_host_permission_allowed( db_session.bind, folder_host, @@ -2280,44 +2281,33 @@ class DeleteRequestModel(BaseModel): async def delete_by_id(request: web.Request, params: DeleteRequestModel) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - access_key = request["keypair"]["access_key"] + domain_name = request["user"]["domain_name"] user_uuid = request["user"]["uuid"] user_role = request["user"]["role"] - domain_name = request["user"]["domain_name"] resource_policy = request["keypair"]["resource_policy"] - allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() folder_id = params.vfolder_id + + rows = await resolve_vfolder_rows( + request, + VFolderPermissionSetAlias.READABLE, + folder_id, + ) + assert len(rows) == 1 + row = rows[0] log.info( "VFOLDER.DELETE_BY_ID (email:{}, ak:{}, vf:{})", request["user"]["email"], - access_key, + request["keypair"]["access_key"], folder_id, ) - - row = ( - await resolve_vfolder_rows( - request, VFolderPermission.OWNER_PERM, folder_id, allow_privileged_access=True - ) - )[0] - await check_vfolder_status(row, VFolderStatusSet.DELETABLE) - try: - await _delete( - root_ctx, - row, - user_uuid, - user_role, - domain_name, - allowed_vfolder_types, - resource_policy, - ) - except TooManyVFoldersFound as e: - log.error( - "VFOLDER.DELETE_BY_ID(email: {}, folder id:{}, hosts:{}", - request["user"]["email"], - folder_id, - e.extra_data, - ) - raise + await _delete( + root_ctx, + row, + user_uuid, + user_role, + domain_name, + resource_policy, + ) return web.Response(status=204) @@ -2326,15 +2316,16 @@ async def delete_by_id(request: web.Request, params: DeleteRequestModel) -> web. async def delete_by_name(request: web.Request) -> web.Response: root_ctx: RootContext = request.app["_root.context"] - folder_name = request.match_info["name"] domain_name = request["user"]["domain_name"] user_role = request["user"]["role"] user_uuid = request["user"]["uuid"] - allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() resource_policy = request["keypair"]["resource_policy"] + folder_name = request.match_info["name"] rows = await resolve_vfolder_rows( - request, VFolderPermission.OWNER_PERM, folder_name, allow_privileged_access=True + request, + VFolderPermissionSetAlias.READABLE, + folder_name, ) if len(rows) > 1: raise TooManyVFoldersFound( @@ -2342,8 +2333,6 @@ async def delete_by_name(request: web.Request) -> web.Response: extra_data=[row["host"] for row in rows], ) row = rows[0] - await check_vfolder_status(row, VFolderStatusSet.DELETABLE) - log.info( "VFOLDER.DELETE_BY_NAME (email:{}, ak:{}, vf:{} (resolved-from:{!r}))", request["user"]["email"], @@ -2357,7 +2346,6 @@ async def delete_by_name(request: web.Request) -> web.Response: user_uuid, user_role, domain_name, - allowed_vfolder_types, resource_policy, ) return web.Response(status=204) @@ -2379,47 +2367,26 @@ class CompactVFolderInfoModel(BaseResponseModel): @server_status_required(ALL_ALLOWED) @pydantic_params_api_handler(IDRequestModel) async def get_vfolder_id(request: web.Request, params: IDRequestModel) -> CompactVFolderInfoModel: - root_ctx: RootContext = request.app["_root.context"] - folder_name = params.name - access_key = request["keypair"]["access_key"] - domain_name = request["user"]["domain_name"] - user_role = request["user"]["role"] - user_uuid = request["user"]["uuid"] - allowed_vfolder_types = await root_ctx.shared_config.get_vfolder_types() - + rows = await resolve_vfolder_rows( + request, + VFolderPermissionSetAlias.READABLE, + folder_name, + ) + if len(rows) > 1: + raise TooManyVFoldersFound( + extra_msg="Multiple folders with the same name.", + extra_data=None, + ) + row = rows[0] log.info( - "VFOLDER.GET_ID (email:{}, ak:{}, name:{})", + "VFOLDER.GET_ID (email:{}, ak:{}, vf:{} (resolved-from:{!r}))", request["user"]["email"], - access_key, + request["keypair"]["access_key"], + row["id"], folder_name, ) - async with root_ctx.db.begin_readonly_session() as db_session: - entries = await query_accessible_vfolders( - db_session.bind, - user_uuid, - allow_privileged_access=True, - user_role=user_role, - domain_name=domain_name, - allowed_vfolder_types=allowed_vfolder_types, - extra_vf_conds=(vfolders.c.name == folder_name), - allowed_status_set=VFolderStatusSet.ALL, - ) - if len(entries) > 1: - log.error( - "VFOLDER.GET_ID(folder name:{}, hosts:{}", - folder_name, - [entry["host"] for entry in entries], - ) - raise TooManyVFoldersFound( - extra_msg="Multiple folders with the same name.", - extra_data=None, - ) - elif len(entries) == 0: - raise InvalidAPIParameters(f"No such vfolder (name: {folder_name})") - # query_accesible_vfolders returns list - entry = entries[0] - return CompactVFolderInfoModel(id=entry["id"], name=folder_name) + return CompactVFolderInfoModel(id=row["id"], name=folder_name) class DeleteFromTrashRequestModel(BaseModel): From 2a8dede448c79f145207abdda58402e8a82dc4c0 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Wed, 15 Jan 2025 10:56:07 +0000 Subject: [PATCH 13/21] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 204 +++++++++++------------ 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 925a6a6d3ac..6b888d1ea35 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -1445,7 +1445,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/events/session": { @@ -1515,7 +1515,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/auth": { @@ -2099,7 +2099,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_by_id", @@ -2155,7 +2155,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_by_name", @@ -2255,7 +2255,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/all-hosts": { @@ -2275,7 +2275,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/allowed-types": { @@ -2295,7 +2295,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/all_hosts": { @@ -2315,7 +2315,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/allowed_types": { @@ -2335,7 +2335,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/perf-metric": { @@ -2364,7 +2364,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename": { @@ -2521,7 +2521,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/request-upload": { @@ -2572,7 +2572,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/request-download": { @@ -2623,7 +2623,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/move-file": { @@ -2674,7 +2674,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename-file": { @@ -2729,7 +2729,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/delete-files": { @@ -2783,7 +2783,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_files.2", @@ -2829,7 +2829,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename_file": { @@ -2884,7 +2884,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/delete_files": { @@ -2932,7 +2932,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/files": { @@ -2969,7 +2969,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/invite": { @@ -3402,7 +3402,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/list_sent": { @@ -3422,7 +3422,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/update/{inv_id}": { @@ -3494,7 +3494,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/accept": { @@ -3627,7 +3627,7 @@ "in": "query" } ], - "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.update_shared_vfolder", @@ -3743,7 +3743,7 @@ "in": "query" } ], - "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/mounts": { @@ -3763,7 +3763,7 @@ } ], "parameters": [], - "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.mount_host", @@ -4001,7 +4001,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.update_quota", @@ -4086,7 +4086,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/used-bytes": { @@ -4124,7 +4124,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "//graphql": { @@ -4312,7 +4312,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "services.create", @@ -4409,7 +4409,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}": { @@ -4445,7 +4445,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "services.delete", @@ -4479,7 +4479,7 @@ } } ], - "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/errors": { @@ -4515,7 +4515,7 @@ } } ], - "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/errors/clear": { @@ -4544,7 +4544,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/scale": { @@ -4589,7 +4589,7 @@ } } ], - "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/sync": { @@ -4625,7 +4625,7 @@ } } ], - "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/routings/{route_id}": { @@ -4678,7 +4678,7 @@ } } ], - "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "services.delete_route", @@ -4720,7 +4720,7 @@ } } ], - "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/token": { @@ -4765,7 +4765,7 @@ } } ], - "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session": { @@ -5381,7 +5381,7 @@ "in": "query" } ], - "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/_/sync-agent-registry": { @@ -5484,7 +5484,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "session.restart", @@ -5527,7 +5527,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "session.destroy", @@ -5580,7 +5580,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "session.execute", @@ -5607,7 +5607,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/_/logs": { @@ -5646,7 +5646,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "session.get_task_logs.2", @@ -5674,7 +5674,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/direct-access-info": { @@ -5703,7 +5703,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/logs": { @@ -5741,7 +5741,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/rename": { @@ -5818,7 +5818,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/complete": { @@ -5847,7 +5847,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/shutdown-service": { @@ -5894,7 +5894,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/upload": { @@ -5923,7 +5923,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/download": { @@ -5995,7 +5995,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/download_single": { @@ -6064,7 +6064,7 @@ } } ], - "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/files": { @@ -6093,7 +6093,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/start-service": { @@ -6154,7 +6154,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/commit": { @@ -6348,7 +6348,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/pty": { @@ -6377,7 +6377,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/execute": { @@ -6406,7 +6406,7 @@ } } ], - "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/apps": { @@ -6435,7 +6435,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/httpproxy": { @@ -6498,7 +6498,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/tcpproxy": { @@ -6561,7 +6561,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/manager/status": { @@ -6884,7 +6884,7 @@ } }, "parameters": [], - "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/recalculate-usage": { @@ -6904,7 +6904,7 @@ } ], "parameters": [], - "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/usage/month": { @@ -6945,7 +6945,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/usage/period": { @@ -6992,7 +6992,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/stats/user/month": { @@ -7012,7 +7012,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/stats/admin/month": { @@ -7032,7 +7032,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher": { @@ -7061,7 +7061,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/start": { @@ -7099,7 +7099,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/stop": { @@ -7137,7 +7137,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/restart": { @@ -7175,7 +7175,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/scaling-groups": { @@ -7212,7 +7212,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/scaling-groups/{scaling_group}/wsproxy-version": { @@ -7257,7 +7257,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/cluster": { @@ -7308,7 +7308,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "template/cluster.list_template", @@ -7351,7 +7351,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/cluster/{template_id}": { @@ -7401,7 +7401,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "put": { "operationId": "template/cluster.put", @@ -7449,7 +7449,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "template/cluster.delete", @@ -7484,7 +7484,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/session": { @@ -7535,7 +7535,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "template/session.list_template", @@ -7578,7 +7578,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/session/{template_id}": { @@ -7628,7 +7628,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "put": { "operationId": "template/session.put", @@ -7686,7 +7686,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "template/session.delete", @@ -7721,7 +7721,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/user-config/dotfiles": { @@ -7771,7 +7771,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "user-config.list_or_get", @@ -7806,7 +7806,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "user-config.update", @@ -7854,7 +7854,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "user-config.delete", @@ -7889,7 +7889,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/user-config/bootstrap-script": { @@ -7927,7 +7927,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "user-config.get_bootstrap_script", @@ -7945,7 +7945,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/domain-config/dotfiles": { @@ -7996,7 +7996,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "domain-config.list_or_get", @@ -8031,7 +8031,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "domain-config.update", @@ -8080,7 +8080,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "domain-config.delete", @@ -8115,7 +8115,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" } }, "/group-config/dotfiles": { @@ -8177,7 +8177,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "group-config.list_or_get", @@ -8228,7 +8228,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "group-config.update", @@ -8288,7 +8288,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "group-config.delete", @@ -8339,7 +8339,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" } }, "/logs/error": { @@ -8411,7 +8411,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "logs/error.list_logs", @@ -8456,7 +8456,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/logs/error/{log_id}/clear": { @@ -8485,7 +8485,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } } } From 812c5526a711e5e454df472ee5fa67fb55d7eb53 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Wed, 15 Jan 2025 10:57:59 +0000 Subject: [PATCH 14/21] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 204 +++++++++++------------ 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 6b888d1ea35..925a6a6d3ac 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -1445,7 +1445,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/events/session": { @@ -1515,7 +1515,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/auth": { @@ -2099,7 +2099,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_by_id", @@ -2155,7 +2155,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_by_name", @@ -2255,7 +2255,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/all-hosts": { @@ -2275,7 +2275,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/allowed-types": { @@ -2295,7 +2295,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/all_hosts": { @@ -2315,7 +2315,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/allowed_types": { @@ -2335,7 +2335,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/perf-metric": { @@ -2364,7 +2364,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename": { @@ -2521,7 +2521,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/request-upload": { @@ -2572,7 +2572,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/request-download": { @@ -2623,7 +2623,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/move-file": { @@ -2674,7 +2674,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename-file": { @@ -2729,7 +2729,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/delete-files": { @@ -2783,7 +2783,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_files.2", @@ -2829,7 +2829,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename_file": { @@ -2884,7 +2884,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/delete_files": { @@ -2932,7 +2932,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/files": { @@ -2969,7 +2969,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/invite": { @@ -3402,7 +3402,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/list_sent": { @@ -3422,7 +3422,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/update/{inv_id}": { @@ -3494,7 +3494,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/accept": { @@ -3627,7 +3627,7 @@ "in": "query" } ], - "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.update_shared_vfolder", @@ -3743,7 +3743,7 @@ "in": "query" } ], - "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/mounts": { @@ -3763,7 +3763,7 @@ } ], "parameters": [], - "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.mount_host", @@ -4001,7 +4001,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.update_quota", @@ -4086,7 +4086,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/used-bytes": { @@ -4124,7 +4124,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "//graphql": { @@ -4312,7 +4312,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "services.create", @@ -4409,7 +4409,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}": { @@ -4445,7 +4445,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "services.delete", @@ -4479,7 +4479,7 @@ } } ], - "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/errors": { @@ -4515,7 +4515,7 @@ } } ], - "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/errors/clear": { @@ -4544,7 +4544,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/scale": { @@ -4589,7 +4589,7 @@ } } ], - "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/sync": { @@ -4625,7 +4625,7 @@ } } ], - "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/routings/{route_id}": { @@ -4678,7 +4678,7 @@ } } ], - "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "services.delete_route", @@ -4720,7 +4720,7 @@ } } ], - "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/token": { @@ -4765,7 +4765,7 @@ } } ], - "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session": { @@ -5381,7 +5381,7 @@ "in": "query" } ], - "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/_/sync-agent-registry": { @@ -5484,7 +5484,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "session.restart", @@ -5527,7 +5527,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "session.destroy", @@ -5580,7 +5580,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "session.execute", @@ -5607,7 +5607,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/_/logs": { @@ -5646,7 +5646,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "session.get_task_logs.2", @@ -5674,7 +5674,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/direct-access-info": { @@ -5703,7 +5703,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/logs": { @@ -5741,7 +5741,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/rename": { @@ -5818,7 +5818,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/complete": { @@ -5847,7 +5847,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/shutdown-service": { @@ -5894,7 +5894,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/upload": { @@ -5923,7 +5923,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/download": { @@ -5995,7 +5995,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/download_single": { @@ -6064,7 +6064,7 @@ } } ], - "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/files": { @@ -6093,7 +6093,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/start-service": { @@ -6154,7 +6154,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/commit": { @@ -6348,7 +6348,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/pty": { @@ -6377,7 +6377,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/execute": { @@ -6406,7 +6406,7 @@ } } ], - "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/apps": { @@ -6435,7 +6435,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/httpproxy": { @@ -6498,7 +6498,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/tcpproxy": { @@ -6561,7 +6561,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/manager/status": { @@ -6884,7 +6884,7 @@ } }, "parameters": [], - "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/recalculate-usage": { @@ -6904,7 +6904,7 @@ } ], "parameters": [], - "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/usage/month": { @@ -6945,7 +6945,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/usage/period": { @@ -6992,7 +6992,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/stats/user/month": { @@ -7012,7 +7012,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/stats/admin/month": { @@ -7032,7 +7032,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher": { @@ -7061,7 +7061,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/start": { @@ -7099,7 +7099,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/stop": { @@ -7137,7 +7137,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/restart": { @@ -7175,7 +7175,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/scaling-groups": { @@ -7212,7 +7212,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/scaling-groups/{scaling_group}/wsproxy-version": { @@ -7257,7 +7257,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/cluster": { @@ -7308,7 +7308,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "template/cluster.list_template", @@ -7351,7 +7351,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/cluster/{template_id}": { @@ -7401,7 +7401,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "put": { "operationId": "template/cluster.put", @@ -7449,7 +7449,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "template/cluster.delete", @@ -7484,7 +7484,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/session": { @@ -7535,7 +7535,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "template/session.list_template", @@ -7578,7 +7578,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/session/{template_id}": { @@ -7628,7 +7628,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "put": { "operationId": "template/session.put", @@ -7686,7 +7686,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "template/session.delete", @@ -7721,7 +7721,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/user-config/dotfiles": { @@ -7771,7 +7771,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "user-config.list_or_get", @@ -7806,7 +7806,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "user-config.update", @@ -7854,7 +7854,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "user-config.delete", @@ -7889,7 +7889,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/user-config/bootstrap-script": { @@ -7927,7 +7927,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "user-config.get_bootstrap_script", @@ -7945,7 +7945,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/domain-config/dotfiles": { @@ -7996,7 +7996,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "domain-config.list_or_get", @@ -8031,7 +8031,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "domain-config.update", @@ -8080,7 +8080,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "domain-config.delete", @@ -8115,7 +8115,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" } }, "/group-config/dotfiles": { @@ -8177,7 +8177,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "group-config.list_or_get", @@ -8228,7 +8228,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "group-config.update", @@ -8288,7 +8288,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "group-config.delete", @@ -8339,7 +8339,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" } }, "/logs/error": { @@ -8411,7 +8411,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "logs/error.list_logs", @@ -8456,7 +8456,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/logs/error/{log_id}/clear": { @@ -8485,7 +8485,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } } } From 9f9275bb0e2077b1aff788491e5c816c244d656c Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Wed, 15 Jan 2025 10:59:49 +0000 Subject: [PATCH 15/21] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 204 +++++++++++------------ 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 925a6a6d3ac..6b888d1ea35 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -1445,7 +1445,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/events/session": { @@ -1515,7 +1515,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/auth": { @@ -2099,7 +2099,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_by_id", @@ -2155,7 +2155,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_by_name", @@ -2255,7 +2255,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/all-hosts": { @@ -2275,7 +2275,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/allowed-types": { @@ -2295,7 +2295,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/all_hosts": { @@ -2315,7 +2315,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/allowed_types": { @@ -2335,7 +2335,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/perf-metric": { @@ -2364,7 +2364,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename": { @@ -2521,7 +2521,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/request-upload": { @@ -2572,7 +2572,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/request-download": { @@ -2623,7 +2623,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/move-file": { @@ -2674,7 +2674,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename-file": { @@ -2729,7 +2729,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/delete-files": { @@ -2783,7 +2783,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "folders.delete_files.2", @@ -2829,7 +2829,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/rename_file": { @@ -2884,7 +2884,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/delete_files": { @@ -2932,7 +2932,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/files": { @@ -2969,7 +2969,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/{name}/invite": { @@ -3402,7 +3402,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/list_sent": { @@ -3422,7 +3422,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/update/{inv_id}": { @@ -3494,7 +3494,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/invitations/accept": { @@ -3627,7 +3627,7 @@ "in": "query" } ], - "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.update_shared_vfolder", @@ -3743,7 +3743,7 @@ "in": "query" } ], - "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/mounts": { @@ -3763,7 +3763,7 @@ } ], "parameters": [], - "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.mount_host", @@ -4001,7 +4001,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "folders.update_quota", @@ -4086,7 +4086,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/folders/_/used-bytes": { @@ -4124,7 +4124,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "//graphql": { @@ -4312,7 +4312,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "services.create", @@ -4409,7 +4409,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}": { @@ -4445,7 +4445,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "services.delete", @@ -4479,7 +4479,7 @@ } } ], - "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/errors": { @@ -4515,7 +4515,7 @@ } } ], - "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/errors/clear": { @@ -4544,7 +4544,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/scale": { @@ -4589,7 +4589,7 @@ } } ], - "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/sync": { @@ -4625,7 +4625,7 @@ } } ], - "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/routings/{route_id}": { @@ -4678,7 +4678,7 @@ } } ], - "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "services.delete_route", @@ -4720,7 +4720,7 @@ } } ], - "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/services/{service_id}/token": { @@ -4765,7 +4765,7 @@ } } ], - "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session": { @@ -5381,7 +5381,7 @@ "in": "query" } ], - "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/_/sync-agent-registry": { @@ -5484,7 +5484,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "session.restart", @@ -5527,7 +5527,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "session.destroy", @@ -5580,7 +5580,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "post": { "operationId": "session.execute", @@ -5607,7 +5607,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/_/logs": { @@ -5646,7 +5646,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "session.get_task_logs.2", @@ -5674,7 +5674,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/direct-access-info": { @@ -5703,7 +5703,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/logs": { @@ -5741,7 +5741,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/rename": { @@ -5818,7 +5818,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/complete": { @@ -5847,7 +5847,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/shutdown-service": { @@ -5894,7 +5894,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/upload": { @@ -5923,7 +5923,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/download": { @@ -5995,7 +5995,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/download_single": { @@ -6064,7 +6064,7 @@ } } ], - "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/files": { @@ -6093,7 +6093,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/start-service": { @@ -6154,7 +6154,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/session/{session_name}/commit": { @@ -6348,7 +6348,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/pty": { @@ -6377,7 +6377,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/execute": { @@ -6406,7 +6406,7 @@ } } ], - "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/apps": { @@ -6435,7 +6435,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/httpproxy": { @@ -6498,7 +6498,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/stream/session/{session_name}/tcpproxy": { @@ -6561,7 +6561,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/manager/status": { @@ -6884,7 +6884,7 @@ } }, "parameters": [], - "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/recalculate-usage": { @@ -6904,7 +6904,7 @@ } ], "parameters": [], - "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/usage/month": { @@ -6945,7 +6945,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/usage/period": { @@ -6992,7 +6992,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/stats/user/month": { @@ -7012,7 +7012,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/stats/admin/month": { @@ -7032,7 +7032,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher": { @@ -7061,7 +7061,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/start": { @@ -7099,7 +7099,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/stop": { @@ -7137,7 +7137,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/resource/watcher/agent/restart": { @@ -7175,7 +7175,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" } }, "/scaling-groups": { @@ -7212,7 +7212,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/scaling-groups/{scaling_group}/wsproxy-version": { @@ -7257,7 +7257,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/cluster": { @@ -7308,7 +7308,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "template/cluster.list_template", @@ -7351,7 +7351,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/cluster/{template_id}": { @@ -7401,7 +7401,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "put": { "operationId": "template/cluster.put", @@ -7449,7 +7449,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "template/cluster.delete", @@ -7484,7 +7484,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/session": { @@ -7535,7 +7535,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "template/session.list_template", @@ -7578,7 +7578,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/template/session/{template_id}": { @@ -7628,7 +7628,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "put": { "operationId": "template/session.put", @@ -7686,7 +7686,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "template/session.delete", @@ -7721,7 +7721,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/user-config/dotfiles": { @@ -7771,7 +7771,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "user-config.list_or_get", @@ -7806,7 +7806,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "user-config.update", @@ -7854,7 +7854,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "user-config.delete", @@ -7889,7 +7889,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/user-config/bootstrap-script": { @@ -7927,7 +7927,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "user-config.get_bootstrap_script", @@ -7945,7 +7945,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/domain-config/dotfiles": { @@ -7996,7 +7996,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "domain-config.list_or_get", @@ -8031,7 +8031,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "domain-config.update", @@ -8080,7 +8080,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "domain-config.delete", @@ -8115,7 +8115,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" } }, "/group-config/dotfiles": { @@ -8177,7 +8177,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "group-config.list_or_get", @@ -8228,7 +8228,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "patch": { "operationId": "group-config.update", @@ -8288,7 +8288,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" }, "delete": { "operationId": "group-config.delete", @@ -8339,7 +8339,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" } }, "/logs/error": { @@ -8411,7 +8411,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" }, "get": { "operationId": "logs/error.list_logs", @@ -8456,7 +8456,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } }, "/logs/error/{log_id}/clear": { @@ -8485,7 +8485,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" } } } From eaa477387ec6497a910f00e373b06316c6d98cd9 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Wed, 15 Jan 2025 20:08:16 +0900 Subject: [PATCH 16/21] fix: (Super)admins should be able to get-id and delete other users' vfolders --- src/ai/backend/manager/api/vfolder.py | 3 +++ src/ai/backend/manager/models/vfolder.py | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ai/backend/manager/api/vfolder.py b/src/ai/backend/manager/api/vfolder.py index 21522d07b1e..a225511c545 100644 --- a/src/ai/backend/manager/api/vfolder.py +++ b/src/ai/backend/manager/api/vfolder.py @@ -2291,6 +2291,7 @@ async def delete_by_id(request: web.Request, params: DeleteRequestModel) -> web. request, VFolderPermissionSetAlias.READABLE, folder_id, + allow_privileged_access=True, ) assert len(rows) == 1 row = rows[0] @@ -2326,6 +2327,7 @@ async def delete_by_name(request: web.Request) -> web.Response: request, VFolderPermissionSetAlias.READABLE, folder_name, + allow_privileged_access=True, ) if len(rows) > 1: raise TooManyVFoldersFound( @@ -2372,6 +2374,7 @@ async def get_vfolder_id(request: web.Request, params: IDRequestModel) -> Compac request, VFolderPermissionSetAlias.READABLE, folder_name, + allow_privileged_access=True, ) if len(rows) > 1: raise TooManyVFoldersFound( diff --git a/src/ai/backend/manager/models/vfolder.py b/src/ai/backend/manager/models/vfolder.py index 43ab4a34be2..1a70cc04023 100644 --- a/src/ai/backend/manager/models/vfolder.py +++ b/src/ai/backend/manager/models/vfolder.py @@ -616,9 +616,7 @@ async def _append_entries(_query, _is_owner=True): query = query.where( vfolders.c.status.not_in(vfolder_status_map[VFolderStatusSet.INACCESSIBLE]) ) - if not allow_privileged_access or ( - user_role != UserRole.ADMIN and user_role != UserRole.SUPERADMIN - ): + if not allow_privileged_access or user_role not in (UserRole.ADMIN, UserRole.SUPERADMIN): query = query.where(vfolders.c.user == user_uuid) await _append_entries(query) From 3fca72730498a211778c1fe746e9986941e5b8be Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Thu, 16 Jan 2025 11:31:57 +0900 Subject: [PATCH 17/21] fix: Let TooManyVFoldersFound contain consistent matched-vfolder list as extra_data --- src/ai/backend/manager/api/exceptions.py | 27 +++++++++++++++++++++--- src/ai/backend/manager/api/vfolder.py | 20 ++++-------------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/src/ai/backend/manager/api/exceptions.py b/src/ai/backend/manager/api/exceptions.py index 23f381d30b4..ab10f59ea0a 100644 --- a/src/ai/backend/manager/api/exceptions.py +++ b/src/ai/backend/manager/api/exceptions.py @@ -12,7 +12,8 @@ from __future__ import annotations import json -from typing import Any, Dict, Mapping, Optional, Union, cast +from collections.abc import Mapping, Sequence +from typing import TYPE_CHECKING, Any, Optional, Union, cast from aiohttp import web @@ -21,6 +22,9 @@ from ..exceptions import AgentError +if TYPE_CHECKING: + from ai.backend.manager.api.vfolder import VFolderRow + class BackendError(web.HTTPError): """ @@ -247,7 +251,10 @@ class TooManySessionsMatched(BackendError, web.HTTPNotFound): error_title = "Too many sessions matched." def __init__( - self, extra_msg: Optional[str] = None, extra_data: Optional[Dict[str, Any]] = None, **kwargs + self, + extra_msg: Optional[str] = None, + extra_data: Optional[dict[str, Any]] = None, + **kwargs, ): if extra_data is not None and (matches := extra_data.get("matches", None)) is not None: serializable_matches = [ @@ -288,7 +295,21 @@ class VFolderCreationFailed(BackendError, web.HTTPBadRequest): class TooManyVFoldersFound(BackendError, web.HTTPNotFound): error_type = "https://api.backend.ai/probs/too-many-vfolders" - error_title = "There are two or more matching vfolders." + error_title = "Multiple vfolders found for the operation for a single vfolder." + + def __init__(self, matched_rows: Sequence[VFolderRow]) -> None: + serialized_matches = [ + { + "id": row["id"], + "host": row["host"], + "user": row["user_email"], + "user_id": row["user"], + "group": row["group_name"], + "group_id": row["group"], + } + for row in matched_rows + ] + super().__init__(extra_data={"matches": serialized_matches}) class VFolderNotFound(ObjectNotFound): diff --git a/src/ai/backend/manager/api/vfolder.py b/src/ai/backend/manager/api/vfolder.py index a225511c545..ff935c0a3d2 100644 --- a/src/ai/backend/manager/api/vfolder.py +++ b/src/ai/backend/manager/api/vfolder.py @@ -2330,10 +2330,7 @@ async def delete_by_name(request: web.Request) -> web.Response: allow_privileged_access=True, ) if len(rows) > 1: - raise TooManyVFoldersFound( - extra_msg="Multiple folders with the same name.", - extra_data=[row["host"] for row in rows], - ) + raise TooManyVFoldersFound(rows) row = rows[0] log.info( "VFOLDER.DELETE_BY_NAME (email:{}, ak:{}, vf:{} (resolved-from:{!r}))", @@ -2377,10 +2374,7 @@ async def get_vfolder_id(request: web.Request, params: IDRequestModel) -> Compac allow_privileged_access=True, ) if len(rows) > 1: - raise TooManyVFoldersFound( - extra_msg="Multiple folders with the same name.", - extra_data=None, - ) + raise TooManyVFoldersFound(rows) row = rows[0] log.info( "VFOLDER.GET_ID (email:{}, ak:{}, vf:{} (resolved-from:{!r}))", @@ -2447,10 +2441,7 @@ async def delete_from_trash_bin( folder_id, [entry["host"] for entry in entries], ) - raise TooManyVFoldersFound( - extra_msg="Multiple folders with the same id.", - extra_data=None, - ) + raise TooManyVFoldersFound(entries) elif len(entries) == 0: raise InvalidAPIParameters("No such vfolder.") row = entries[0] @@ -2559,10 +2550,7 @@ async def restore(request: web.Request, params: RestoreRequestModel) -> web.Resp folder_id, [entry["host"] for entry in restore_targets], ) - raise TooManyVFoldersFound( - extra_msg="Multiple folders with the same name.", - extra_data=None, - ) + raise TooManyVFoldersFound(restore_targets) elif len(restore_targets) == 0: raise InvalidAPIParameters("No such vfolder.") From 95106861a6657b7486abac513a2c3476c87d4e76 Mon Sep 17 00:00:00 2001 From: Sanghun Lee Date: Thu, 16 Jan 2025 13:41:22 +0900 Subject: [PATCH 18/21] fix: Allow the VFolder resolver decorator to conditionally query all accessible VFolders --- src/ai/backend/manager/api/vfolder.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ai/backend/manager/api/vfolder.py b/src/ai/backend/manager/api/vfolder.py index ff935c0a3d2..60a7fe32fe7 100644 --- a/src/ai/backend/manager/api/vfolder.py +++ b/src/ai/backend/manager/api/vfolder.py @@ -275,6 +275,8 @@ async def resolve_vfolder_rows( def with_vfolder_rows_resolved( perm: VFolderPermissionSetAlias | VFolderPermission, + *, + allow_privileged_access: bool = False, ) -> Callable[ [Callable[Concatenate[web.Request, Sequence[VFolderRow], P], Awaitable[web.Response]]], Callable[Concatenate[web.Request, P], Awaitable[web.Response]], @@ -302,7 +304,12 @@ async def _wrapped(request: web.Request, *args: P.args, **kwargs: P.kwargs) -> w folder_name_or_id = piece return await handler( request, - await resolve_vfolder_rows(request, perm, folder_name_or_id), + await resolve_vfolder_rows( + request, + perm, + folder_name_or_id, + allow_privileged_access=allow_privileged_access, + ), *args, **kwargs, ) @@ -2569,7 +2576,7 @@ async def restore(request: web.Request, params: RestoreRequestModel) -> web.Resp @auth_required @server_status_required(ALL_ALLOWED) -@with_vfolder_rows_resolved(VFolderPermissionSetAlias.READABLE) +@with_vfolder_rows_resolved(VFolderPermissionSetAlias.READABLE, allow_privileged_access=True) @with_vfolder_status_checked(VFolderStatusSet.UPDATABLE) @check_api_params( t.Dict({ From c5cd917a3ed066fd2c2599338ad6fb906b7445df Mon Sep 17 00:00:00 2001 From: Sanghun Lee Date: Thu, 16 Jan 2025 04:43:35 +0000 Subject: [PATCH 19/21] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 204 +++++++++++------------ 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 6b888d1ea35..925a6a6d3ac 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -1445,7 +1445,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/events/session": { @@ -1515,7 +1515,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/auth": { @@ -2099,7 +2099,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_by_id", @@ -2155,7 +2155,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_by_name", @@ -2255,7 +2255,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/all-hosts": { @@ -2275,7 +2275,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/allowed-types": { @@ -2295,7 +2295,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/all_hosts": { @@ -2315,7 +2315,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/allowed_types": { @@ -2335,7 +2335,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/perf-metric": { @@ -2364,7 +2364,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename": { @@ -2521,7 +2521,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/request-upload": { @@ -2572,7 +2572,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/request-download": { @@ -2623,7 +2623,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/move-file": { @@ -2674,7 +2674,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename-file": { @@ -2729,7 +2729,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/delete-files": { @@ -2783,7 +2783,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "folders.delete_files.2", @@ -2829,7 +2829,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/rename_file": { @@ -2884,7 +2884,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/delete_files": { @@ -2932,7 +2932,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/files": { @@ -2969,7 +2969,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/{name}/invite": { @@ -3402,7 +3402,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/list_sent": { @@ -3422,7 +3422,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/update/{inv_id}": { @@ -3494,7 +3494,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/invitations/accept": { @@ -3627,7 +3627,7 @@ "in": "query" } ], - "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.update_shared_vfolder", @@ -3743,7 +3743,7 @@ "in": "query" } ], - "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/mounts": { @@ -3763,7 +3763,7 @@ } ], "parameters": [], - "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.mount_host", @@ -4001,7 +4001,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "folders.update_quota", @@ -4086,7 +4086,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/folders/_/used-bytes": { @@ -4124,7 +4124,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "//graphql": { @@ -4312,7 +4312,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "services.create", @@ -4409,7 +4409,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}": { @@ -4445,7 +4445,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "services.delete", @@ -4479,7 +4479,7 @@ } } ], - "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/errors": { @@ -4515,7 +4515,7 @@ } } ], - "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/errors/clear": { @@ -4544,7 +4544,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/scale": { @@ -4589,7 +4589,7 @@ } } ], - "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/sync": { @@ -4625,7 +4625,7 @@ } } ], - "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/routings/{route_id}": { @@ -4678,7 +4678,7 @@ } } ], - "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "services.delete_route", @@ -4720,7 +4720,7 @@ } } ], - "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/services/{service_id}/token": { @@ -4765,7 +4765,7 @@ } } ], - "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session": { @@ -5381,7 +5381,7 @@ "in": "query" } ], - "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/_/sync-agent-registry": { @@ -5484,7 +5484,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "session.restart", @@ -5527,7 +5527,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "session.destroy", @@ -5580,7 +5580,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "post": { "operationId": "session.execute", @@ -5607,7 +5607,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/_/logs": { @@ -5646,7 +5646,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "session.get_task_logs.2", @@ -5674,7 +5674,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/direct-access-info": { @@ -5703,7 +5703,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/logs": { @@ -5741,7 +5741,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/rename": { @@ -5818,7 +5818,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/complete": { @@ -5847,7 +5847,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/shutdown-service": { @@ -5894,7 +5894,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/upload": { @@ -5923,7 +5923,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/download": { @@ -5995,7 +5995,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/download_single": { @@ -6064,7 +6064,7 @@ } } ], - "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/files": { @@ -6093,7 +6093,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/start-service": { @@ -6154,7 +6154,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/session/{session_name}/commit": { @@ -6348,7 +6348,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/pty": { @@ -6377,7 +6377,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/execute": { @@ -6406,7 +6406,7 @@ } } ], - "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/apps": { @@ -6435,7 +6435,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/httpproxy": { @@ -6498,7 +6498,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/stream/session/{session_name}/tcpproxy": { @@ -6561,7 +6561,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/manager/status": { @@ -6884,7 +6884,7 @@ } }, "parameters": [], - "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/recalculate-usage": { @@ -6904,7 +6904,7 @@ } ], "parameters": [], - "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/usage/month": { @@ -6945,7 +6945,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/usage/period": { @@ -6992,7 +6992,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/stats/user/month": { @@ -7012,7 +7012,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/stats/admin/month": { @@ -7032,7 +7032,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher": { @@ -7061,7 +7061,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/start": { @@ -7099,7 +7099,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/stop": { @@ -7137,7 +7137,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/resource/watcher/agent/restart": { @@ -7175,7 +7175,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: RUNNING\n" } }, "/scaling-groups": { @@ -7212,7 +7212,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/scaling-groups/{scaling_group}/wsproxy-version": { @@ -7257,7 +7257,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/cluster": { @@ -7308,7 +7308,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "template/cluster.list_template", @@ -7351,7 +7351,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/cluster/{template_id}": { @@ -7401,7 +7401,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "put": { "operationId": "template/cluster.put", @@ -7449,7 +7449,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "template/cluster.delete", @@ -7484,7 +7484,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/session": { @@ -7535,7 +7535,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "template/session.list_template", @@ -7578,7 +7578,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/template/session/{template_id}": { @@ -7628,7 +7628,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "put": { "operationId": "template/session.put", @@ -7686,7 +7686,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "template/session.delete", @@ -7721,7 +7721,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/user-config/dotfiles": { @@ -7771,7 +7771,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "user-config.list_or_get", @@ -7806,7 +7806,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "user-config.update", @@ -7854,7 +7854,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "user-config.delete", @@ -7889,7 +7889,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/user-config/bootstrap-script": { @@ -7927,7 +7927,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "user-config.get_bootstrap_script", @@ -7945,7 +7945,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/domain-config/dotfiles": { @@ -7996,7 +7996,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "domain-config.list_or_get", @@ -8031,7 +8031,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "domain-config.update", @@ -8080,7 +8080,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "domain-config.delete", @@ -8115,7 +8115,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" } }, "/group-config/dotfiles": { @@ -8177,7 +8177,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "group-config.list_or_get", @@ -8228,7 +8228,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "patch": { "operationId": "group-config.update", @@ -8288,7 +8288,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" }, "delete": { "operationId": "group-config.delete", @@ -8339,7 +8339,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: RUNNING\n" } }, "/logs/error": { @@ -8411,7 +8411,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" }, "get": { "operationId": "logs/error.list_logs", @@ -8456,7 +8456,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } }, "/logs/error/{log_id}/clear": { @@ -8485,7 +8485,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: RUNNING\n" } } } From 5bdc0973064f1c455eb08e52f2c769fc651f07bd Mon Sep 17 00:00:00 2001 From: Sion Kang Date: Thu, 16 Jan 2025 15:43:43 +0900 Subject: [PATCH 20/21] fix(BA-514): the required state output logic in the openopi reference doc (#3460) Co-authored-by: octodog Co-authored-by: Sanghun Lee --- changes/3460.fix.md | 1 + docs/manager/rest-reference/openapi.json | 208 +++++++++++------------ src/ai/backend/manager/openapi.py | 8 +- 3 files changed, 110 insertions(+), 107 deletions(-) create mode 100644 changes/3460.fix.md diff --git a/changes/3460.fix.md b/changes/3460.fix.md new file mode 100644 index 00000000000..a051433478f --- /dev/null +++ b/changes/3460.fix.md @@ -0,0 +1 @@ +Fix the required state output logic in the openopi reference documentation correctly diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 6b888d1ea35..7f4b35afc17 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -1445,7 +1445,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/events/session": { @@ -1515,7 +1515,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/auth": { @@ -2099,7 +2099,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "folders.delete_by_id", @@ -2155,7 +2155,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "folders.delete_by_name", @@ -2255,7 +2255,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/_/all-hosts": { @@ -2275,7 +2275,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/_/allowed-types": { @@ -2295,7 +2295,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/_/all_hosts": { @@ -2315,7 +2315,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/_/allowed_types": { @@ -2335,7 +2335,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/_/perf-metric": { @@ -2364,7 +2364,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/{name}/rename": { @@ -2521,7 +2521,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/{name}/request-upload": { @@ -2572,7 +2572,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/{name}/request-download": { @@ -2623,7 +2623,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/{name}/move-file": { @@ -2674,7 +2674,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/{name}/rename-file": { @@ -2729,7 +2729,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/{name}/delete-files": { @@ -2783,7 +2783,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "folders.delete_files.2", @@ -2829,7 +2829,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/{name}/rename_file": { @@ -2884,7 +2884,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/{name}/delete_files": { @@ -2932,7 +2932,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/{name}/files": { @@ -2969,7 +2969,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/{name}/invite": { @@ -3402,7 +3402,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/invitations/list_sent": { @@ -3422,7 +3422,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/invitations/update/{inv_id}": { @@ -3494,7 +3494,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/invitations/accept": { @@ -3627,7 +3627,7 @@ "in": "query" } ], - "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList shared vfolders.\n\nNot available for group vfolders.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "post": { "operationId": "folders.update_shared_vfolder", @@ -3743,7 +3743,7 @@ "in": "query" } ], - "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn the contents of `/etc/fstab` file.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/_/mounts": { @@ -3763,7 +3763,7 @@ } ], "parameters": [], - "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList all mounted vfolder hosts in vfroot.\n\nAll mounted hosts from connected (ALIVE) agents are also gathered.\nGenerally, agents should be configured to have same hosts structure,\nbut newly introduced one may not.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "post": { "operationId": "folders.mount_host", @@ -4001,7 +4001,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "post": { "operationId": "folders.update_quota", @@ -4086,7 +4086,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/folders/_/used-bytes": { @@ -4124,7 +4124,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "//graphql": { @@ -4312,7 +4312,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "post": { "operationId": "services.create", @@ -4409,7 +4409,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/services/{service_id}": { @@ -4445,7 +4445,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "services.delete", @@ -4479,7 +4479,7 @@ } } ], - "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nRemoves model service (and inference sessions for the service also).\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/services/{service_id}/errors": { @@ -4515,7 +4515,7 @@ } } ], - "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nList errors raised while trying to create the inference sessions. Backend.AI will\nstop trying to create an inference session for the model service if six (6) error stacks\nup. The only way to clear the error and retry spawning session is to call\n`clear_error` (POST /services/{service_id}/errors/clear) API.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/services/{service_id}/errors/clear": { @@ -4544,7 +4544,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/services/{service_id}/scale": { @@ -4589,7 +4589,7 @@ } } ], - "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates ideal inference session count manually. Based on the difference of this number,\ninference sessions will be created or removed automatically.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/services/{service_id}/sync": { @@ -4625,7 +4625,7 @@ } } ], - "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nForce syncs up-to-date model service information with AppProxy.\nIn normal situations this will be automatically handled by Backend.AI schedulers,\nbut this API is left open in case of unexpected restart of AppProxy process.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/services/{service_id}/routings/{route_id}": { @@ -4678,7 +4678,7 @@ } } ], - "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdates traffic bias of specific route.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "services.delete_route", @@ -4720,7 +4720,7 @@ } } ], - "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nScales down the service by removing specific inference session.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/services/{service_id}/token": { @@ -4765,7 +4765,7 @@ } } ], - "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nGenerates a token which acts as an API key to authenticate when calling model service endpoint.\nIf both duration and valid_until is not set then the AppProxy will determine appropriate lifetime of the token.\nduration and valid_until can't be both specified.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session": { @@ -4804,7 +4804,7 @@ }, "arch": { "type": "string", - "default": "x86_64" + "default": "aarch64" }, "type": { "type": "string", @@ -4969,7 +4969,7 @@ }, "arch": { "type": "string", - "default": "x86_64" + "default": "aarch64" }, "type": { "type": "string", @@ -5381,7 +5381,7 @@ "in": "query" } ], - "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nA quick session-ID matcher API for use with auto-completion in CLI.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/_/sync-agent-registry": { @@ -5484,7 +5484,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "patch": { "operationId": "session.restart", @@ -5527,7 +5527,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "session.destroy", @@ -5580,7 +5580,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "post": { "operationId": "session.execute", @@ -5607,7 +5607,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/_/logs": { @@ -5646,7 +5646,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "get": { "operationId": "session.get_task_logs.2", @@ -5674,7 +5674,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/direct-access-info": { @@ -5703,7 +5703,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/logs": { @@ -5741,7 +5741,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/rename": { @@ -5818,7 +5818,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/complete": { @@ -5847,7 +5847,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/shutdown-service": { @@ -5894,7 +5894,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/upload": { @@ -5923,7 +5923,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/download": { @@ -5995,7 +5995,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/download_single": { @@ -6064,7 +6064,7 @@ } } ], - "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nDownload a single file from the scratch root. Only for small files.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/files": { @@ -6093,7 +6093,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/start-service": { @@ -6154,7 +6154,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/session/{session_name}/commit": { @@ -6348,7 +6348,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/stream/session/{session_name}/pty": { @@ -6377,7 +6377,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/stream/session/{session_name}/execute": { @@ -6406,7 +6406,7 @@ } } ], - "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nWebSocket-version of gateway.kernel.execute().\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/stream/session/{session_name}/apps": { @@ -6435,7 +6435,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/stream/session/{session_name}/httpproxy": { @@ -6498,7 +6498,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/stream/session/{session_name}/tcpproxy": { @@ -6561,7 +6561,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/manager/status": { @@ -6884,7 +6884,7 @@ } }, "parameters": [], - "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturns the list of all resource presets in the current scaling group,\nwith additional information including allocatability of each preset,\namount of total remaining resources, and the current keypair resource limits.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/resource/recalculate-usage": { @@ -6904,7 +6904,7 @@ } ], "parameters": [], - "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nUpdate `keypair_resource_usages` in redis and `agents.c.occupied_slots`.\n\nThose two values are sometimes out of sync. In that case, calling this API\nre-calculates the values for running containers and updates them in DB.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/resource/usage/month": { @@ -6945,7 +6945,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers for a specified month.\nThe date/time comparison is done using the configured timezone.\n\n:param group_ids: If not None, query containers only in those groups.\n:param month: The year-month to query usage statistics. ex) \"202006\" to query for Jun 2020\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/resource/usage/period": { @@ -6992,7 +6992,7 @@ "in": "query" } ], - "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn usage statistics of terminated containers belonged to the given group for a specified\nperiod in dates.\nThe date/time comparison is done using the configured timezone.\n\n:param project_id: If not None, query containers only in the project.\n:param start_date str: \"yyyymmdd\" format.\n:param end_date str: \"yyyymmdd\" format.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/resource/stats/user/month": { @@ -7012,7 +7012,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for terminated user sessions\nover last 30 days.\n\n\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/resource/stats/admin/month": { @@ -7032,7 +7032,7 @@ } ], "parameters": [], - "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\nReturn time-binned (15 min) stats for all terminated sessions\nover last 30 days.\n\n\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/resource/watcher": { @@ -7061,7 +7061,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/resource/watcher/agent/start": { @@ -7099,7 +7099,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/resource/watcher/agent/stop": { @@ -7137,7 +7137,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/resource/watcher/agent/restart": { @@ -7175,7 +7175,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Superadmin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/scaling-groups": { @@ -7212,7 +7212,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/scaling-groups/{scaling_group}/wsproxy-version": { @@ -7257,7 +7257,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/template/cluster": { @@ -7308,7 +7308,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "get": { "operationId": "template/cluster.list_template", @@ -7351,7 +7351,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/template/cluster/{template_id}": { @@ -7401,7 +7401,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "put": { "operationId": "template/cluster.put", @@ -7449,7 +7449,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "template/cluster.delete", @@ -7484,7 +7484,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/template/session": { @@ -7535,7 +7535,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "get": { "operationId": "template/session.list_template", @@ -7578,7 +7578,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/template/session/{template_id}": { @@ -7628,7 +7628,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "put": { "operationId": "template/session.put", @@ -7686,7 +7686,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "template/session.delete", @@ -7721,7 +7721,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/user-config/dotfiles": { @@ -7771,7 +7771,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "get": { "operationId": "user-config.list_or_get", @@ -7806,7 +7806,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "patch": { "operationId": "user-config.update", @@ -7854,7 +7854,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "user-config.delete", @@ -7889,7 +7889,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/user-config/bootstrap-script": { @@ -7927,7 +7927,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "get": { "operationId": "user-config.get_bootstrap_script", @@ -7945,7 +7945,7 @@ } ], "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/domain-config/dotfiles": { @@ -7996,7 +7996,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "get": { "operationId": "domain-config.list_or_get", @@ -8031,7 +8031,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "patch": { "operationId": "domain-config.update", @@ -8080,7 +8080,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "domain-config.delete", @@ -8115,7 +8115,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/group-config/dotfiles": { @@ -8177,7 +8177,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "get": { "operationId": "group-config.list_or_get", @@ -8228,7 +8228,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "patch": { "operationId": "group-config.update", @@ -8288,7 +8288,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "delete": { "operationId": "group-config.delete", @@ -8339,7 +8339,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* Admin privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/logs/error": { @@ -8411,7 +8411,7 @@ } }, "parameters": [], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" }, "get": { "operationId": "logs/error.list_logs", @@ -8456,7 +8456,7 @@ "in": "query" } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } }, "/logs/error/{log_id}/clear": { @@ -8485,7 +8485,7 @@ } } ], - "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: FROZEN\n" + "description": "\n**Preconditions:**\n* User privilege required.\n* Manager status required: one of FROZEN, RUNNING\n" } } } diff --git a/src/ai/backend/manager/openapi.py b/src/ai/backend/manager/openapi.py index 7e6f563c89c..3f1fefb6944 100644 --- a/src/ai/backend/manager/openapi.py +++ b/src/ai/backend/manager/openapi.py @@ -5,7 +5,7 @@ import textwrap from collections import defaultdict from pathlib import Path -from typing import Any, List, get_args, get_type_hints +from typing import Any, List, cast, get_args, get_type_hints import aiohttp_cors import click @@ -17,6 +17,7 @@ import ai.backend.common.validators as tx from ai.backend.manager import __version__ +from ai.backend.manager.api import ManagerStatus from ai.backend.manager.api.session import UndefChecker from ai.backend.manager.api.utils import Undefined from ai.backend.manager.models.vfolder import VFolderPermissionValidator @@ -271,14 +272,15 @@ def generate_openapi(subapps: list[web.Application], verbose=False) -> dict[str, if auth_scope := handler_attrs.get("auth_scope"): preconds.append(f"{auth_scope.capitalize()} privilege required.") if manager_status := handler_attrs.get("required_server_statuses"): - if len(manager_status) > 0: + manager_status = cast(frozenset[ManagerStatus], manager_status) + if len(manager_status) == 1: preconds.append( f"Manager status required: {list(manager_status)[0].value.upper()}" ) else: preconds.append( "Manager status required: one of " - f"{', '.join([e.value.upper() for e in manager_status])}" + f"{', '.join([e.value.upper() for e in sorted(manager_status)])}" ) if preconds: description.append("\n**Preconditions:**") From 053571ff3c4d60cdca8f8bc9bf75affafbc2984c Mon Sep 17 00:00:00 2001 From: Sanghun Lee Date: Thu, 16 Jan 2025 07:30:34 +0000 Subject: [PATCH 21/21] chore: update api schema dump Co-authored-by: octodog --- docs/manager/rest-reference/openapi.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/manager/rest-reference/openapi.json b/docs/manager/rest-reference/openapi.json index 7f4b35afc17..f6205a85290 100644 --- a/docs/manager/rest-reference/openapi.json +++ b/docs/manager/rest-reference/openapi.json @@ -4804,7 +4804,7 @@ }, "arch": { "type": "string", - "default": "aarch64" + "default": "x86_64" }, "type": { "type": "string", @@ -4969,7 +4969,7 @@ }, "arch": { "type": "string", - "default": "aarch64" + "default": "x86_64" }, "type": { "type": "string",