This is an automated email from the ASF dual-hosted git repository.

tenthe pushed a commit to branch 
4687-kiosk-mode-does-not-show-data-for-logged-out-users
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 46a9b2ca4dac37a332a58411363d03b42d386c51
Author: Philipp Zehnder <[email protected]>
AuthorDate: Mon Jul 6 14:25:17 2026 +0000

    fix: remove old kiosk data API
---
 .../datalake/KioskDashboardDataLakeResource.java   | 27 ---------------------
 .../service/core/UnauthenticatedInterfaces.java    |  3 +--
 .../src/lib/apis/dashboard-kiosk.service.ts        | 12 ----------
 .../lib/query/data-view-query-generator.service.ts | 28 ----------------------
 4 files changed, 1 insertion(+), 69 deletions(-)

diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/KioskDashboardDataLakeResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/KioskDashboardDataLakeResource.java
index b513405bff..401e3ac7af 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/KioskDashboardDataLakeResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/KioskDashboardDataLakeResource.java
@@ -71,33 +71,6 @@ public class KioskDashboardDataLakeResource extends 
AbstractAuthGuardedRestResou
     this.permissionStorage = resourceManager.managePermissions().getDb();
   }
 
-  @PostMapping(path = "/{dashboardId}/{widgetId}/data",
-      consumes = MediaType.APPLICATION_JSON_VALUE,
-      produces = MediaType.APPLICATION_JSON_VALUE)
-  @PreAuthorize("this.hasReadAuthorityOrAnonymous(#dashboardId) and 
hasPermission(#dashboardId, 'READ')")
-  public ResponseEntity<?> getData(@PathVariable("dashboardId") String 
dashboardId,
-                                   @PathVariable("widgetId") String widgetId,
-                                   @RequestBody Map<String, String> 
queryParams) {
-    var dashboard = dashboardStorage.getElementById(dashboardId);
-    if (dashboard.getWidgets().stream().noneMatch(w -> 
w.getDataViewElementId().equals(widgetId))) {
-      return badRequest(String.format("Widget with id %s not found in 
dashboard", widgetId));
-    }
-    var widget = dataExplorerWidgetStorage.getElementById(widgetId);
-    var measureName = queryParams.get("measureName");
-    if (!checkMeasureNameInWidget(widget, measureName)) {
-     return badRequest("Measure name not found in widget configuration");
-    } else {
-      ProvidedRestQueryParams sanitizedParams = new 
ProvidedRestQueryParams(measureName, queryParams);
-      try {
-        SpQueryResult result =
-            this.dataExplorerQueryManagement.getData(sanitizedParams, true);
-        return ok(result);
-      } catch (RuntimeException e) {
-        return badRequest(SpLogMessage.from(e));
-      }
-    }
-  }
-
   @PostMapping(path = "/{dashboardId}/data",
       consumes = MediaType.APPLICATION_JSON_VALUE,
       produces = MediaType.APPLICATION_JSON_VALUE)
diff --git 
a/streampipes-service-core/src/main/java/org/apache/streampipes/service/core/UnauthenticatedInterfaces.java
 
b/streampipes-service-core/src/main/java/org/apache/streampipes/service/core/UnauthenticatedInterfaces.java
index 9c10b17cb1..a151eca694 100644
--- 
a/streampipes-service-core/src/main/java/org/apache/streampipes/service/core/UnauthenticatedInterfaces.java
+++ 
b/streampipes-service-core/src/main/java/org/apache/streampipes/service/core/UnauthenticatedInterfaces.java
@@ -47,8 +47,7 @@ public class UnauthenticatedInterfaces {
         "/streampipes-backend/index.html",
         // anonymous dashboard access is allowed
         "/api/v3/datalake/dashboard/*/composite",
-        "/api/v3/datalake/dashboard/kiosk/*/data",
-        "/api/v3/datalake/dashboard/kiosk/*/*/data"
+        "/api/v3/datalake/dashboard/kiosk/*/data"
     );
   }
 }
diff --git 
a/ui/projects/streampipes/platform-services/src/lib/apis/dashboard-kiosk.service.ts
 
b/ui/projects/streampipes/platform-services/src/lib/apis/dashboard-kiosk.service.ts
index f1f2b3a0ef..a794ad579f 100644
--- 
a/ui/projects/streampipes/platform-services/src/lib/apis/dashboard-kiosk.service.ts
+++ 
b/ui/projects/streampipes/platform-services/src/lib/apis/dashboard-kiosk.service.ts
@@ -36,18 +36,6 @@ export class DashboardKioskRestService {
     private http = inject(HttpClient);
     private platformServicesCommons = inject(PlatformServicesCommons);
 
-    getData(
-        dashboardId: string,
-        widgetId: string,
-        queryParams: DatalakeQueryParameters,
-    ): Observable<SpQueryResult> {
-        const context = new HttpContext().set(NGX_LOADING_BAR_IGNORED, true);
-        const url = 
`${this.dashboardKioskBasePath}/${dashboardId}/${widgetId}/data`;
-        return this.http.post<SpQueryResult>(url, queryParams, {
-            context,
-        });
-    }
-
     performMultiQuery(
         dashboardId: string,
         requests: DashboardKioskDataQuery[],
diff --git 
a/ui/projects/streampipes/platform-services/src/lib/query/data-view-query-generator.service.ts
 
b/ui/projects/streampipes/platform-services/src/lib/query/data-view-query-generator.service.ts
index e68b52f966..86054d815b 100644
--- 
a/ui/projects/streampipes/platform-services/src/lib/query/data-view-query-generator.service.ts
+++ 
b/ui/projects/streampipes/platform-services/src/lib/query/data-view-query-generator.service.ts
@@ -26,7 +26,6 @@ import {
 import { SpQueryResult } from '../model/gen/streampipes-model';
 import { DatalakeQueryParameters } from 
'../model/datalake/DatalakeQueryParameters';
 import { DatalakeQueryParameterBuilder } from 
'./DatalakeQueryParameterBuilder';
-import { DashboardKioskRestService } from '../apis/dashboard-kiosk.service';
 import { DashboardDataRequestCoordinatorService } from 
'./dashboard-data-request-coordinator.service';
 
 @Injectable({
@@ -34,7 +33,6 @@ import { DashboardDataRequestCoordinatorService } from 
'./dashboard-data-request
 })
 export class DataViewQueryGeneratorService {
     protected dataLakeRestService = inject(DatalakeRestService);
-    protected dashboardKioskRestService = inject(DashboardKioskRestService);
     protected dashboardDataRequestCoordinator = inject(
         DashboardDataRequestCoordinatorService,
     );
@@ -62,32 +60,6 @@ export class DataViewQueryGeneratorService {
         });
     }
 
-    generateObservablesForKioskMode(
-        startTime: number,
-        endTime: number,
-        dataConfig: DataExplorerDataConfig,
-        dashboardId: string,
-        widgetId: string,
-        maximumResultingEvents = -1,
-    ): Observable<SpQueryResult>[] {
-        return dataConfig.sourceConfigs.map(sourceConfig => {
-            const dataLakeConfiguration = this.generateQuery(
-                startTime,
-                endTime,
-                sourceConfig,
-                dataConfig.ignoreMissingValues,
-                maximumResultingEvents,
-                true,
-            );
-
-            return this.dashboardKioskRestService.getData(
-                dashboardId,
-                widgetId,
-                dataLakeConfiguration,
-            );
-        });
-    }
-
     generateBatchedObservables(
         startTime: number,
         endTime: number,

Reply via email to