Problem
The admin app endpoints (lnvps_api_admin/src/admin/apps.rs) return unfiltered, unpaginated, deleted-hiding lists:
async fn admin_list_apps(auth, State(this)) -> ApiResult<Vec<AdminAppInfo>> // no Query at all
async fn admin_list_app_clusters(auth, State(this)) -> ApiResult<Vec<AdminAppClusterInfo>>
async fn admin_list_app_deployments(auth, State(this)) -> ApiResult<Vec<AdminAppDeploymentInfo>>
Three separate gaps:
1. No filters
GET /api/admin/v1/app-deployments takes no query parameters whatsoever. For support/oversight the obvious ones are missing:
user_id — "show me this customer's deployments" (today the admin dashboard can only link out to a user; it can't list a user's deployments)
app_id, cluster_id / region_id
status and desired_state (e.g. find everything in error / pending)
- free-text
search on name / hostname / custom_domain
Same for GET /api/admin/v1/apps (enabled, search) and /app_clusters (enabled, region_id).
2. No include_deleted
list_all_app_deployments is hardcoded to WHERE deleted = 0, and list_apps(false) / list_app_clusters(false) likewise hide disabled/deleted rows. Since deployment deletion is only a soft delete (see #234), a deleted deployment becomes completely invisible to admins — there's no way to inspect what a customer had, or to confirm teardown actually happened. Please add include_deleted: bool (default false) to all three, as other admin listings do.
3. Not paginated
All three return a plain ApiData<Vec<..>> ({ "data": [...] }) rather than the ApiPaginatedData envelope ({ data, total, limit, offset }) used by every other admin list endpoint, and they ignore limit/offset entirely. The admin dashboard's shared paginated table assumes the standard envelope, so these lists currently can't paginate and report no total. This will not scale once deployments grow, and it's inconsistent with the rest of the admin API.
Proposal
Bring the three list endpoints in line with the other admin listings:
- Accept a
Query struct with limit / offset (default 50, max 100) and return ApiPaginatedData.
- Add the filters above, pushed down into the DB queries (
list_all_app_deployments, list_apps, list_app_clusters) rather than filtered in the handler.
- Add
include_deleted (default false) to all three.
- Document the parameters in
ADMIN_API_ENDPOINTS.md (App Deployments — Catalog & Clusters) and add an API_CHANGELOG.md entry.
Related: #234 (hard delete / purge of app deployments and subscriptions).
Problem
The admin app endpoints (
lnvps_api_admin/src/admin/apps.rs) return unfiltered, unpaginated, deleted-hiding lists:Three separate gaps:
1. No filters
GET /api/admin/v1/app-deploymentstakes no query parameters whatsoever. For support/oversight the obvious ones are missing:user_id— "show me this customer's deployments" (today the admin dashboard can only link out to a user; it can't list a user's deployments)app_id,cluster_id/region_idstatusanddesired_state(e.g. find everything inerror/pending)searchonname/hostname/custom_domainSame for
GET /api/admin/v1/apps(enabled,search) and/app_clusters(enabled,region_id).2. No
include_deletedlist_all_app_deploymentsis hardcoded toWHERE deleted = 0, andlist_apps(false)/list_app_clusters(false)likewise hide disabled/deleted rows. Since deployment deletion is only a soft delete (see #234), a deleted deployment becomes completely invisible to admins — there's no way to inspect what a customer had, or to confirm teardown actually happened. Please addinclude_deleted: bool(defaultfalse) to all three, as other admin listings do.3. Not paginated
All three return a plain
ApiData<Vec<..>>({ "data": [...] }) rather than theApiPaginatedDataenvelope ({ data, total, limit, offset }) used by every other admin list endpoint, and they ignorelimit/offsetentirely. The admin dashboard's shared paginated table assumes the standard envelope, so these lists currently can't paginate and report no total. This will not scale once deployments grow, and it's inconsistent with the rest of the admin API.Proposal
Bring the three list endpoints in line with the other admin listings:
Querystruct withlimit/offset(default 50, max 100) and returnApiPaginatedData.list_all_app_deployments,list_apps,list_app_clusters) rather than filtered in the handler.include_deleted(defaultfalse) to all three.ADMIN_API_ENDPOINTS.md(App Deployments — Catalog & Clusters) and add anAPI_CHANGELOG.mdentry.Related: #234 (hard delete / purge of app deployments and subscriptions).