SealSkin
Server Referencerouters

admin

Administrator endpoints: users, groups, stores, installed apps, templates.

attributelogger
= logging.getLogger(__name__)
attributestatus_router
= APIRouter(route_class=EncryptedRoute)
attributerouter
= APIRouter(prefix='/api/admin', dependencies=[Depends(verify_admin)], route_class=EncryptedRoute)
func_gpu_list() -> list[GPUInfo]

Return the detected GPUs as API models.

Returns

list[app.models.GPUInfo]
funcadmin_status(user=Depends(verify_token)) -> dict[str, Any]

Return the caller's role, settings and host statistics.

paramuserdict[str, Any]
= Depends(verify_token)

Returns

dict[str, typing.Any]
funcget_management_data() -> dict[str, Any]

Return users, groups and server details for the dashboard.

Returns

dict[str, typing.Any]
func_require_safe_name(name, kind) -> str

Validate a store or template name for use in file paths.

paramnamestr
paramkindstr

Returns

str
funcget_app_stores() -> list[AppStore]

List configured app stores.

Returns

list[app.models.AppStore]
funcadd_app_store(decrypted_body=Depends(get_decrypted_request_body)) -> AppStore

Add an app store.

paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

app.models.AppStore
funcdelete_app_store(store_name) -> Response

Remove an app store.

paramstore_namestr

Returns

fastapi.Response
funcget_available_apps(url, store_name, refresh=False) -> list[dict[str, Any]]

Return the apps published by a store (cached unless refresh).

paramurlstr
paramstore_namestr
paramrefreshbool
= False

Returns

list[dict[str, typing.Any]]
func_save_logo(app_id, logo) -> str | None

Persist a base64 logo as a PNG icon and return the icon URL.

paramapp_idstr

App the icon belongs to.

paramlogostr | None

Base64 image data, an existing URL, or None.

Returns

str | None

/api/app_icon/<id> when data was saved, otherwise logo unchanged.

func_normalise_scripts(provider_config) -> None

Turn empty autostart script strings into None in place.

paramprovider_configdict[str, Any]

Returns

None
func_with_status(app) -> InstalledAppWithStatus

Attach image metadata to an installed app.

paramappInstalledApp

Returns

app.models.InstalledAppWithStatus
funclist_installed_apps() -> list[InstalledAppWithStatus]

List installed apps with image status.

Returns

list[app.models.InstalledAppWithStatus]
funcinstall_app(decrypted_body=Depends(get_decrypted_request_body)) -> InstalledApp

Install an app from a store entry sent by the admin UI.

paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

app.models.InstalledApp
funcupdate_installed_app(app_id, decrypted_body=Depends(get_decrypted_request_body)) -> InstalledApp

Replace an installed app with a full definition.

paramapp_idstr
paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

app.models.InstalledApp
funcpatch_installed_app(app_id, decrypted_body=Depends(get_decrypted_request_body)) -> InstalledApp

Partially update an installed app.

Record fields (users, groups, app_template, auto_update, home_directories) are applied directly; any other InstalledApp field is merged into the record's overrides.

paramapp_idstr
paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

app.models.InstalledApp
funcdelete_installed_app(app_id) -> Response

Uninstall an app (and purge a meta-app's icon and home template).

paramapp_idstr

Returns

fastapi.Response
funccheck_app_update(app_id) -> ImageUpdateCheckResponse

Compare the local image digest with the registry.

paramapp_idstr

Returns

app.models.ImageUpdateCheckResponse
funcpull_latest_app_image(app_id) -> ImagePullResponse

Pull the latest image of an app and refresh its autostart cache.

paramapp_idstr

Returns

app.models.ImagePullResponse
funccreate_meta_app(decrypted_body=Depends(get_decrypted_request_body)) -> InstalledApp

Create a meta-app: a copy of an installed app with its own home template.

paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

app.models.InstalledApp
funclaunch_meta_for_customization(decrypted_body=Depends(get_decrypted_request_body), auth_user=Depends(verify_admin)) -> dict[str, str]

Launch a meta-app with its home template mounted read-write.

paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)
paramauth_userdict[str, Any]
= Depends(verify_admin)

Returns

dict[str, str]
funcget_app_templates() -> list[dict[str, Any]]

List app templates.

Returns

list[dict[str, typing.Any]]
funcsave_app_template(decrypted_body=Depends(get_decrypted_request_body)) -> AppTemplate

Create or replace a template.

paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

app.models.AppTemplate
funcdelete_app_template(template_name) -> Response

Delete a user template.

paramtemplate_namestr

Returns

fastapi.Response
funcget_all_sessions() -> list[UserSessionList]

List every session grouped by user.

Returns

list[app.models.UserSessionList]
funcstop_any_session(session_id) -> Response

Stop any user's session.

paramsession_idstr

Returns

fastapi.Response
funccreate_admin(decrypted_body=Depends(get_decrypted_request_body)) -> dict[str, Any]

Create an administrator.

paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

dict[str, typing.Any]
funcdelete_admin(username) -> Response

Delete an administrator.

paramusernamestr

Returns

fastapi.Response
funccreate_user(decrypted_body=Depends(get_decrypted_request_body)) -> dict[str, Any]

Create a user.

paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

dict[str, typing.Any]
funcupdate_user(username, decrypted_body=Depends(get_decrypted_request_body)) -> dict[str, Any]

Replace a user's settings.

paramusernamestr
paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

dict[str, typing.Any]
funcdelete_user(username) -> Response

Delete a user and their storage.

paramusernamestr

Returns

fastapi.Response
func_require_storage_user(username) -> None

Ensure a user exists and has persistent storage enabled.

paramusernamestr

Returns

None
func_require_admin_user(username) -> None

Ensure username is an administrator.

paramusernamestr

Returns

None
funclist_user_home_dirs(username) -> dict[str, list[str]]

List a user's home directories.

paramusernamestr

Returns

dict[str, list[str]]
funccreate_user_home_dir(username, decrypted_body=Depends(get_decrypted_request_body)) -> dict[str, str]

Create a home directory for a user.

paramusernamestr
paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

dict[str, str]
funcdelete_user_home_dir(username, home_name) -> Response

Delete a user's home directory.

paramusernamestr
paramhome_namestr

Returns

fastapi.Response
funclist_admin_home_dirs(username) -> dict[str, list[str]]

List an administrator's home directories.

paramusernamestr

Returns

dict[str, list[str]]
funccreate_admin_home_dir(username, decrypted_body=Depends(get_decrypted_request_body)) -> dict[str, str]

Create a home directory for an administrator.

paramusernamestr
paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

dict[str, str]
funcdelete_admin_home_dir(username, home_name) -> Response

Delete an administrator's home directory.

paramusernamestr
paramhome_namestr

Returns

fastapi.Response
funccreate_group(decrypted_body=Depends(get_decrypted_request_body)) -> dict[str, Any]

Create a group.

paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

dict[str, typing.Any]
funcupdate_group(group_name, decrypted_body=Depends(get_decrypted_request_body)) -> dict[str, Any]

Replace a group's settings.

paramgroup_namestr
paramdecrypted_bodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

dict[str, typing.Any]
funcdelete_group(group_name) -> Response

Delete a group.

paramgroup_namestr

Returns

fastapi.Response